From 43e79847b2aa7021c738fefce284e90fb917bd7c Mon Sep 17 00:00:00 2001 From: coso Date: Sat, 21 Mar 2026 00:14:58 +0800 Subject: [PATCH] fix: reset restored workspace state on missing session --- src/components/agent/chat/hooks/useAgentSession.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/agent/chat/hooks/useAgentSession.ts b/src/components/agent/chat/hooks/useAgentSession.ts index cdbf62d2f..22fed35ed 100644 --- a/src/components/agent/chat/hooks/useAgentSession.ts +++ b/src/components/agent/chat/hooks/useAgentSession.ts @@ -902,6 +902,8 @@ export function useAgentSession(options: UseAgentSessionOptions) { saveTransient(scopedKeys.currentSessionKey, null); savePersisted(scopedKeys.persistedSessionKey, null); hydratedSessionRef.current = null; + restoredWorkspaceRef.current = null; + skipAutoRestoreRef.current = false; }) .finally(() => { if (missingSessionVerificationRef.current === sessionId) {