From 6e9340fdb092ee8e8f02025bee755dcf878c1fb5 Mon Sep 17 00:00:00 2001 From: Max Novich Date: Wed, 14 May 2025 14:55:35 -0700 Subject: [PATCH] fixed the config fetching for windows (#2538) --- ui/desktop/src/main.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/desktop/src/main.ts b/ui/desktop/src/main.ts index 7d806f89..55bf7bbb 100644 --- a/ui/desktop/src/main.ts +++ b/ui/desktop/src/main.ts @@ -311,11 +311,10 @@ const createChat = async ( if (existingWindows.length > 0) { // Get the config from localStorage through an existing window try { - const result = await existingWindows[0].webContents.executeJavaScript( - `localStorage.getItem('gooseConfig')` + const config = await existingWindows[0].webContents.executeJavaScript( + `window.electron.getConfig()` ); - if (result) { - const config = JSON.parse(result); + if (config) { port = config.GOOSE_PORT; working_dir = config.GOOSE_WORKING_DIR; }