From 526bd2db709f59e0888e3ca7898ce7a0b196fac2 Mon Sep 17 00:00:00 2001 From: Mic Neale Date: Thu, 19 Dec 2024 16:35:54 +1100 Subject: [PATCH] tiny change to use most recent in stack --- ui/desktop/src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/desktop/src/main.ts b/ui/desktop/src/main.ts index 6c8dd9d08..f82406040 100644 --- a/ui/desktop/src/main.ts +++ b/ui/desktop/src/main.ts @@ -293,7 +293,9 @@ app.whenReady().then(async () => { const { dirPath } = parseArgs(); createTray(); - createChat(app, undefined, dirPath); + const recentDirs = loadRecentDirs(); + let openDir = dirPath || (recentDirs.length > 0 ? recentDirs[0] : null); + createChat(app, undefined, openDir); // Show launcher input on key combo globalShortcut.register('Control+Alt+Command+G', createLauncher);