| 8339 | |
| 8340 | // Symbol-map renderer — for symbolsOnly, the config fallback, and read errors. |
| 8341 | const symbolMap = (heading: string, limit = 200): string[] => { |
| 8342 | const lines: string[] = [heading]; |
| 8343 | for (const n of nodes.slice(0, limit)) { |
| 8344 | const sig = n.signature ? ` ${n.signature.replace(/\s+/g, ' ').trim()}` : ''; |
| 8345 | lines.push(`- \`${n.name}\` (${n.kind})${sig} — :${n.startLine}`); |
| 8346 | } |
| 8347 | if (nodes.length > limit) lines.push(`- … +${nodes.length - limit} more`); |
| 8348 | return lines; |
| 8349 | }; |
| 8350 | |
| 8351 | // symbolsOnly → the cheap structural overview, no source. |
| 8352 | if (opts.symbolsOnly) { |