fix(ui): flush session persistence on close to prevent data loss
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user