From a5ff6b850be42acf7321781e6d886d5c1d2a373e Mon Sep 17 00:00:00 2001 From: "Vincent H." Date: Thu, 27 Feb 2025 10:43:59 -0800 Subject: [PATCH] ui: create-chat-window opens most recent directory (#1384) --- ui/desktop/src/main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/desktop/src/main.ts b/ui/desktop/src/main.ts index b4c9255d..8c64c088 100644 --- a/ui/desktop/src/main.ts +++ b/ui/desktop/src/main.ts @@ -530,6 +530,10 @@ app.whenReady().then(async () => { }); ipcMain.on('create-chat-window', (_, query, dir, version) => { + if (!dir?.trim()) { + const recentDirs = loadRecentDirs(); + dir = recentDirs.length > 0 ? recentDirs[0] : null; + } createChat(app, query, dir, version); });