mirror of
https://github.com/aljazceru/goose.git
synced 2026-02-21 14:34:23 +01:00
fix: show window bugfix (#1840)
This commit is contained in:
@@ -278,11 +278,14 @@ const createTray = () => {
|
||||
tray.setContextMenu(contextMenu);
|
||||
};
|
||||
|
||||
const showWindow = () => {
|
||||
const showWindow = async () => {
|
||||
const windows = BrowserWindow.getAllWindows();
|
||||
|
||||
if (windows.length === 0) {
|
||||
log.info('No windows are currently open.');
|
||||
log.info('No windows are open, creating a new one...');
|
||||
const recentDirs = loadRecentDirs();
|
||||
const openDir = recentDirs.length > 0 ? recentDirs[0] : null;
|
||||
await createChat(app, undefined, openDir);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user