fix(ui): flush session persistence on close to prevent data loss

This commit is contained in:
Gemini AI
2025-12-27 12:41:23 +04:00
Unverified
parent c5b62f31a8
commit 9fb237e7b8
2 changed files with 17 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ import {
clearActiveParentSession,
createSession,
fetchSessions,
flushSessionPersistence,
updateSessionAgent,
updateSessionModel,
} from "./stores/sessions"
@@ -245,6 +246,12 @@ const App: Component = () => {
return
}
try {
await flushSessionPersistence(instanceId)
} catch (error) {
log.error("Failed to flush session persistence before closing", error)
}
clearActiveParentSession(instanceId)
try {