(nodes: Node[], title: string, labels?: Map<string, string>)
| 4585 | } |
| 4586 | |
| 4587 | private formatNodeList(nodes: Node[], title: string, labels?: Map<string, string>): string { |
| 4588 | const lines: string[] = [`**${title} (${nodes.length} found)**`, '']; |
| 4589 | |
| 4590 | for (const node of nodes) { |
| 4591 | const location = node.startLine ? `:${node.startLine}` : ''; |
| 4592 | // Compact: just name, kind, location — plus the relationship when it |
| 4593 | // isn't a plain call (callback registration, instantiation, …). |
| 4594 | const label = labels?.get(node.id); |
| 4595 | lines.push( |
| 4596 | `- ${node.name} (${node.kind}) - ${node.filePath}${location}${label ? ` — via ${label}` : ''}` |
| 4597 | ); |
| 4598 | } |
| 4599 | |
| 4600 | return lines.join('\n'); |
| 4601 | } |
| 4602 | |
| 4603 | /** |
| 4604 | * Relationship label for a non-`calls` edge in callers/callees lists. A |
no test coverage detected