fix(ui): preserve working directory when creating new chat (#6789)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Robert Mcgregor
2026-01-31 10:00:42 +11:00
committed by GitHub
parent 6f9eaddb66
commit 9f586cb161
2 changed files with 12 additions and 2 deletions
+10 -2
View File
@@ -1,3 +1,11 @@
export const getInitialWorkingDir = (): string => {
return (window.appConfig?.get('GOOSE_WORKING_DIR') as string) || '';
// 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) ?? '';
};