From 04137682448a84ea255ff7f948d6abd8bb737d29 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 5 Nov 2026 22:12:49 +0900 Subject: [PATCH] refac --- src/lib/apis/terminal/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/apis/terminal/index.ts b/src/lib/apis/terminal/index.ts index f0c0d6f25b..b50f7fa767 100644 --- a/src/lib/apis/terminal/index.ts +++ b/src/lib/apis/terminal/index.ts @@ -160,7 +160,10 @@ export const resolveTerminalConnection = ( return { selector, baseUrl: `${WEBUI_API_BASE_URL}/terminals/${encodeURIComponent(selector)}`, - key: token, + // Panels outlive Tether's token rotations; read the current session at request time. + get key() { + return typeof localStorage === 'undefined' ? token : (localStorage.getItem('token') ?? ''); + }, system: true }; }