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); });