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
@@ -3,6 +3,7 @@ import { FolderDot } from 'lucide-react';
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/Tooltip';
import { updateWorkingDir } from '../../api';
import { toast } from 'react-toastify';
import { setCurrentWorkingDir } from '../../utils/workingDir';
interface DirSwitcherProps {
className: string;
@@ -42,6 +43,7 @@ export const DirSwitcher: React.FC<DirSwitcherProps> = ({
const newDir = result.filePaths[0];
window.electron.addRecentDir(newDir);
setCurrentWorkingDir(newDir);
if (sessionId) {
onWorkingDirChange?.(newDir);