spawn terminal panes in the open workspace root (T-381)
The shell spawned with Directory.current — $HOME for desktop-entry launches, and stale after a project switch since the process CWD never moves. Use the kernel project root, falling back to the process CWD only when no project is open. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -78,7 +78,9 @@ class _TerminalPaneState extends State<TerminalPane> {
|
||||
}
|
||||
|
||||
final shell = Platform.environment['SHELL'] ?? '/bin/bash';
|
||||
final cwd = Directory.current.path;
|
||||
// The open workspace, not Directory.current — a desktop launch starts
|
||||
// in $HOME and a project switch doesn't move the process CWD (T-381).
|
||||
final cwd = _kernel?.project.current?.path ?? Directory.current.path;
|
||||
|
||||
final response = await ipc.request(
|
||||
'pane.spawn',
|
||||
|
||||
Reference in New Issue
Block a user