* Pure dispatch over the read tools — the switch, with no gate, no notices, no * allowlist/validation (the caller owns those). `codegraph_status` is handled * on the main thread in execute and never reaches here. May throw * NotIndexed/PathRefusal, which executeReadTool clas
(toolName: string, args: Record<string, unknown>)
| 3347 | * NotIndexed/PathRefusal, which {@link executeReadTool} classifies. |
| 3348 | */ |
| 3349 | private async dispatchTool(toolName: string, args: Record<string, unknown>): Promise<ToolResult> { |
| 3350 | switch (toolName) { |
| 3351 | case 'codegraph_search': return await this.handleSearch(args); |
| 3352 | case 'codegraph_callers': return await this.handleCallers(args); |
| 3353 | case 'codegraph_callees': return await this.handleCallees(args); |
| 3354 | case 'codegraph_impact': return await this.handleImpact(args); |
| 3355 | case 'codegraph_explore': return await this.handleExplore(args); |
| 3356 | case 'codegraph_node': return await this.handleNode(args); |
| 3357 | case 'codegraph_files': return await this.handleFiles(args); |
| 3358 | default: return this.errorResult(`Unknown tool: ${toolName}`); |
| 3359 | } |
| 3360 | } |
| 3361 | |
| 3362 | /** |
| 3363 | * Handle codegraph_search |
no test coverage detected