@devries-cameron20 / composio Mirror · read-only / commits / a41a20593
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.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 09:30 UTC

fix(docs): Emit folder names as headings in llms.txt

walkPageTree was only emitting headings for separator nodes, causing folder sections (Providers, Troubleshooting, etc.) to collapse into flat URL lists without section headings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmithamallesh committed Feb 11, 2026 at 12:06 UTC a41a205936f979eba9fccae902aa03883a454fbb
1 file changed +5 -1
docs/app/llms.txt/route.ts
+5 -1
@@ -44,11 +44,15 @@ function walkPageTree(nodes: TreeNode[], depth = 2): string {
44 break;
45
46 case 'folder':
47 + // Emit folder name as a heading to preserve sidebar hierarchy
48 + if (node.name) {
49 + lines.push(`${'#'.repeat(depth)} ${String(node.name)}`, '');
50 + }
51 // If folder has an index page, include it
52 if (node.index) {
53 lines.push(`- https://docs.composio.dev${node.index.url}.md`);
54 }
51 - // Recurse into children
55 + // Recurse into children at deeper depth for hierarchy
56 if (node.children.length > 0) {
57 lines.push(walkPageTree(node.children, depth + 1));
58 }