diff --git a/ui/desktop/src/components/bottom_menu/DirSwitcher.tsx b/ui/desktop/src/components/bottom_menu/DirSwitcher.tsx index 4bf199988d39..d5d0c824289b 100644 --- a/ui/desktop/src/components/bottom_menu/DirSwitcher.tsx +++ b/ui/desktop/src/components/bottom_menu/DirSwitcher.tsx @@ -13,13 +13,26 @@ export const DirSwitcher: React.FC = ({ className = '' }) => { window.electron.directoryChooser(true); }; + const handleDirectoryClick = async (event: React.MouseEvent) => { + const isCmdOrCtrlClick = event.metaKey || event.ctrlKey; + + if (isCmdOrCtrlClick) { + event.preventDefault(); + event.stopPropagation(); + const workingDir = window.appConfig.get('GOOSE_WORKING_DIR') as string; + await window.electron.openDirectoryInExplorer(workingDir); + } else { + await handleDirectoryChange(); + } + }; + return (