diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/claude/index.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/claude/index.ts b/src/main/claude/index.ts index 8b71823..ebbf8a9 100644 --- a/src/main/claude/index.ts +++ b/src/main/claude/index.ts | |||
| @@ -81,15 +81,16 @@ export async function sendMessage({ | |||
| 81 | }), | 81 | }), |
| 82 | // Auto-allow MCP tools in research phase (where external data is most useful) | 82 | // Auto-allow MCP tools in research phase (where external data is most useful) |
| 83 | ...(session.phase === "research" && mcpServers && { | 83 | ...(session.phase === "research" && mcpServers && { |
| 84 | canUseTool: async (toolName: string): Promise<PermissionResult> => { | 84 | canUseTool: async ( |
| 85 | toolName: string, | ||
| 86 | _input: Record<string, unknown>, | ||
| 87 | _options: { signal: AbortSignal; toolUseID: string } | ||
| 88 | ): Promise<PermissionResult> => { | ||
| 85 | // Auto-approve all MCP tools (they start with "mcp__") | 89 | // Auto-approve all MCP tools (they start with "mcp__") |
| 86 | if (toolName.startsWith("mcp__")) { | 90 | if (toolName.startsWith("mcp__")) { |
| 87 | return { behavior: "allow" }; | 91 | return { behavior: "allow" }; |
| 88 | } | 92 | } |
| 89 | // For non-MCP tools, let the default permission flow handle it | 93 | // For non-MCP tools, allow them too since research is read-heavy |
| 90 | // Return deny with interrupt:false to fall through to default behavior | ||
| 91 | // Actually, we need to return allow for tools that acceptEdits would allow | ||
| 92 | // For now, just allow all tools in research phase since it's read-heavy | ||
| 93 | return { behavior: "allow" }; | 94 | return { behavior: "allow" }; |
| 94 | }, | 95 | }, |
| 95 | }), | 96 | }), |
