fix: per session working dir isolation (#6920)

This commit is contained in:
Zane
2026-02-03 10:20:02 -08:00
committed by GitHub
parent 8631caa890
commit aa356bd460
16 changed files with 143 additions and 68 deletions
+2 -9
View File
@@ -1,11 +1,4 @@
// Track the current working dir for this window (updated when user changes it)
let currentWorkingDir: string | null = null;
export const setCurrentWorkingDir = (dir: string): void => {
currentWorkingDir = dir;
};
export const getInitialWorkingDir = (): string => {
// Use the current dir if set, otherwise fall back to initial config
return currentWorkingDir ?? (window.appConfig?.get('GOOSE_WORKING_DIR') as string) ?? '';
// Fall back to initial config from app startup
return (window.appConfig?.get('GOOSE_WORKING_DIR') as string) ?? '';
};