fix(terminal): use each terminal's cwd for invoke Claude all button (#1756)
The "Invoke Claude All" button was passing projectPath (project root) to every terminal instead of respecting each terminal's current working directory. Now uses terminal.cwd with projectPath as fallback, matching the single-terminal invoke button behavior. Co-authored-by: Test User <test@example.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -263,7 +263,7 @@ export function TerminalGrid({ projectPath, onNewTaskClick, isActive = false }:
|
||||
terminals.forEach((terminal) => {
|
||||
if (terminal.status === 'running' && !terminal.isClaudeMode) {
|
||||
setClaudeMode(terminal.id, true);
|
||||
window.electronAPI.invokeClaudeInTerminal(terminal.id, projectPath);
|
||||
window.electronAPI.invokeClaudeInTerminal(terminal.id, terminal.cwd || projectPath);
|
||||
}
|
||||
});
|
||||
}, [terminals, setClaudeMode, projectPath]);
|
||||
|
||||
Reference in New Issue
Block a user