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:
Andy
2026-02-06 18:21:37 +01:00
committed by GitHub
parent 152e540933
commit ac4fe4f423
@@ -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]);