@devries-cameron20 / composio-1 / commits / c230766be
Fork 0

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

Empty strings were being removed by filter(Boolean). Switch to join + collapse to preserve intentional blank lines around headings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmithamallesh committed Feb 11, 2026 at 12:09 UTC c230766beca2bbb128795914cac07ce81bcc016e
1 file changed +3 -3
docs/app/llms.txt/route.ts
+3 -3
@@ -35,7 +35,7 @@ function walkPageTree(nodes: TreeNode[], depth = 2): string {
35 switch (node.type) {
36 case 'separator':
37 if (node.name) {
38 - lines.push(`${'#'.repeat(depth)} ${String(node.name)}`, '');
38 + lines.push('', `${'#'.repeat(depth)} ${String(node.name)}`, '');
39 }
40 break;
41
@@ -46,7 +46,7 @@ function walkPageTree(nodes: TreeNode[], depth = 2): string {
46 case 'folder':
47 // Folders are sub-sections within separator sections, so one level deeper
48 if (node.name) {
49 - lines.push(`${'#'.repeat(depth + 1)} ${String(node.name)}`, '');
49 + lines.push('', `${'#'.repeat(depth + 1)} ${String(node.name)}`, '');
50 }
51 // If folder has an index page, include it
52 if (node.index) {
@@ -60,7 +60,7 @@ function walkPageTree(nodes: TreeNode[], depth = 2): string {
60 }
61 }
62
63 - return lines.filter(Boolean).join('\n');
63 + return lines.join('\n').replace(/\n{3,}/g, '\n\n').trim();
64 }
65
66 // eslint-disable-next-line @typescript-eslint/no-explicit-any