From 46e883db6e0bbf522d690ab3ceb6bc87743c9039 Mon Sep 17 00:00:00 2001 From: Douwe Osinga Date: Wed, 6 Aug 2025 10:46:27 +0200 Subject: [PATCH] Cmd click open finder (#3807) Co-authored-by: Douwe Osinga Co-authored-by: Michael Neale --- .../src/components/bottom_menu/DirSwitcher.tsx | 15 ++++++++++++++- ui/desktop/src/main.ts | 9 +++++++++ ui/desktop/src/preload.ts | 3 +++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ui/desktop/src/components/bottom_menu/DirSwitcher.tsx b/ui/desktop/src/components/bottom_menu/DirSwitcher.tsx index 4bf19998..d5d0c824 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 (