Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(docs): Add blank lines between sections in llms.txt

Sushmithamalleshc230766beca2
diff --git a/docs/app/llms.txt/route.ts b/docs/app/llms.txt/route.ts
index eb5ea3c1a..5679bacc6 100644
--- a/docs/app/llms.txt/route.ts
+++ b/docs/app/llms.txt/route.ts
@@ -35,7 +35,7 @@ function walkPageTree(nodes: TreeNode[], depth = 2): string {
switch (node.type) {
case 'separator':
if (node.name) {
- lines.push(`${'#'.repeat(depth)} ${String(node.name)}`, '');
+ lines.push('', `${'#'.repeat(depth)} ${String(node.name)}`, '');
}
break;
@@ -46,7 +46,7 @@ function walkPageTree(nodes: TreeNode[], depth = 2): string {
case 'folder':
// Folders are sub-sections within separator sections, so one level deeper
if (node.name) {
- lines.push(`${'#'.repeat(depth + 1)} ${String(node.name)}`, '');
+ lines.push('', `${'#'.repeat(depth + 1)} ${String(node.name)}`, '');
}
// If folder has an index page, include it
if (node.index) {
@@ -60,7 +60,7 @@ function walkPageTree(nodes: TreeNode[], depth = 2): string {
}
}
- return lines.filter(Boolean).join('\n');
+ return lines.join('\n').replace(/\n{3,}/g, '\n\n').trim();
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any