fix: reset restored workspace state on missing session

This commit is contained in:
coso
2026-03-21 00:14:58 +08:00
parent 34adb1cc0a
commit 43e79847b2
@@ -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) {