| 4806 | // ========================================================================= |
| 4807 | |
| 4808 | private formatSearchResults(results: SearchResult[]): string { |
| 4809 | const lines: string[] = [`**Search Results (${results.length} found)**`, '']; |
| 4810 | |
| 4811 | for (const result of results) { |
| 4812 | const { node } = result; |
| 4813 | const location = node.startLine ? `:${node.startLine}` : ''; |
| 4814 | // Compact format: one line per result with key info |
| 4815 | lines.push(`**${node.name}** (${node.kind})`); |
| 4816 | lines.push(`${node.filePath}${location}`); |
| 4817 | if (node.signature) lines.push(`\`${node.signature}\``); |
| 4818 | lines.push(''); |
| 4819 | } |
| 4820 | |
| 4821 | return lines.join('\n'); |
| 4822 | } |
| 4823 | |
| 4824 | private formatNodeList(nodes: Node[], title: string, labels?: Map<string, string>): string { |
| 4825 | const lines: string[] = [`**${title} (${nodes.length} found)**`, '']; |