* 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>)
| 2887 | * NotIndexed/PathRefusal, which {@link executeReadTool} classifies. |
| 2888 | */ |
| 2889 | private async dispatchTool(toolName: string, args: Record<string, unknown>): Promise<ToolResult> { |
| 2890 | switch (toolName) { |
| 2891 | case 'codegraph_search': return await this.handleSearch(args); |
| 2892 | case 'codegraph_callers': return await this.handleCallers(args); |
| 2893 | case 'codegraph_callees': return await this.handleCallees(args); |
| 2894 | case 'codegraph_impact': return await this.handleImpact(args); |
| 2895 | case 'codegraph_explore': return await this.handleExplore(args); |
| 2896 | case 'codegraph_node': return await this.handleNode(args); |
| 2897 | case 'codegraph_files': return await this.handleFiles(args); |
| 2898 | default: return this.errorResult(`Unknown tool: ${toolName}`); |
| 2899 | } |
| 2900 | } |
| 2901 | |
| 2902 | /** |
| 2903 | * Handle codegraph_search |
no test coverage detected