From 54620e1f223907b73f9c35f5dffacd32e6202607 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Tue, 16 Jun 2026 00:19:06 +0800 Subject: [PATCH] fix(app): avoid reconnecting restored tabs --- apps/desktop/src/App.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue index 50cc155b5..9f07c81a8 100644 --- a/apps/desktop/src/App.vue +++ b/apps/desktop/src/App.vue @@ -992,7 +992,7 @@ function initApp() { }) .then(() => { console.log(`[STARTUP] connectionStore.initFromDisk: ${(performance.now() - t0).toFixed(0)}ms`); - reconnectRestoredTabs(); + restoreActiveConnectionContext(); }) .catch((e: any) => { toast(t("connection.loadFailed", { message: e?.message || String(e) }), 5000); @@ -1000,13 +1000,10 @@ function initApp() { settingsStore.initAiConfig(); } -async function reconnectRestoredTabs() { +function restoreActiveConnectionContext() { const activeConnectionId = activeTab.value?.connectionId || connectionStore.activeConnectionId; if (activeConnectionId && connectionStore.getConfig(activeConnectionId)) { connectionStore.activeConnectionId = activeConnectionId; - try { - await connectionStore.ensureConnected(activeConnectionId); - } catch {} } }