| 4569 | // ========================================================================= |
| 4570 | |
| 4571 | private formatSearchResults(results: SearchResult[]): string { |
| 4572 | const lines: string[] = [`**Search Results (${results.length} found)**`, '']; |
| 4573 | |
| 4574 | for (const result of results) { |
| 4575 | const { node } = result; |
| 4576 | const location = node.startLine ? `:${node.startLine}` : ''; |
| 4577 | // Compact format: one line per result with key info |
| 4578 | lines.push(`**${node.name}** (${node.kind})`); |
| 4579 | lines.push(`${node.filePath}${location}`); |
| 4580 | if (node.signature) lines.push(`\`${node.signature}\``); |
| 4581 | lines.push(''); |
| 4582 | } |
| 4583 | |
| 4584 | return lines.join('\n'); |
| 4585 | } |
| 4586 | |
| 4587 | private formatNodeList(nodes: Node[], title: string, labels?: Map<string, string>): string { |
| 4588 | const lines: string[] = [`**${title} (${nodes.length} found)**`, '']; |