Summary
The outline tool emits symbol-kind structure (classes, methods, fields) but does not detect language-level section markers: C# #region blocks, Python module-level docstrings, JS/TS JSDoc @module, or markdown # heading lines. For long files these markers are the human-authored structure that a "table of contents" call should surface — without them, outline of a 2000-line file is a flat list of 80 methods.
Where
src/CodeIndex/Mcp/McpToolHandlers.cs (outline handler)
src/CodeIndex/Indexer/Languages/* (per-language symbol extractors — region/heading detection would slot in here)
Suggested approach
(1) Extend per-language extractors to emit region/section pseudo-symbols with kind region or heading. (2) Surface them in the outline response with a distinct kind so clients can render them as collapsible sections. (3) For markdown / plain-text files, fall back to ^#+\s heading detection.
Summary
The
outlinetool emits symbol-kind structure (classes, methods, fields) but does not detect language-level section markers: C##regionblocks, Python module-level docstrings, JS/TS JSDoc@module, or markdown# headinglines. For long files these markers are the human-authored structure that a "table of contents" call should surface — without them, outline of a 2000-line file is a flat list of 80 methods.Where
src/CodeIndex/Mcp/McpToolHandlers.cs(outline handler)src/CodeIndex/Indexer/Languages/*(per-language symbol extractors — region/heading detection would slot in here)Suggested approach
(1) Extend per-language extractors to emit
region/sectionpseudo-symbols with kindregionorheading. (2) Surface them in the outline response with a distinct kind so clients can render them as collapsible sections. (3) For markdown / plain-text files, fall back to^#+\sheading detection.