| 8486 | |
| 8487 | // Symbol-map renderer — for symbolsOnly, the config fallback, and read errors. |
| 8488 | const symbolMap = (heading: string, limit = 200): string[] => { |
| 8489 | const lines: string[] = [heading]; |
| 8490 | for (const n of nodes.slice(0, limit)) { |
| 8491 | const sig = n.signature ? ` ${n.signature.replace(/\s+/g, ' ').trim()}` : ''; |
| 8492 | lines.push(`- \`${n.name}\` (${n.kind})${sig} — :${n.startLine}`); |
| 8493 | } |
| 8494 | if (nodes.length > limit) lines.push(`- … +${nodes.length - limit} more`); |
| 8495 | return lines; |
| 8496 | }; |
| 8497 | |
| 8498 | // symbolsOnly → the cheap structural overview, no source. |
| 8499 | if (opts.symbolsOnly) { |