fix: check server is ready so that we can decode the recipe deeplink (#5021)

This commit is contained in:
Lifei Zhou
2025-10-06 21:56:49 +11:00
committed by GitHub
parent 5526b59f53
commit aedc12637b
+6 -1
View File
@@ -593,6 +593,12 @@ const createChat = async (
);
goosedClients.set(mainWindow.id, goosedClient);
console.log('[Main] Waiting for backend server to be ready...');
const serverReady = await checkServerStatus(goosedClient);
if (!serverReady) {
throw new Error('Backend server failed to start in time');
}
// Let windowStateKeeper manage the window
mainWindowState.manage(mainWindow);
@@ -1059,7 +1065,6 @@ ipcMain.handle('get-goosed-host-port', async (event) => {
if (!client) {
return null;
}
await checkServerStatus(client);
return client.getConfig().baseUrl || null;
});