chore: generate

This commit is contained in:
opencode-agent[bot] 2026-06-25 02:18:06 +00:00
commit 5ca19947d9
7 changed files with 215 additions and 93 deletions

View file

@ -52,7 +52,10 @@ export const createDirSyncContext = (
setStore("session", result.index, reconcile(session))
return
}
setStore("session", produce((draft) => void draft.splice(result.index, 0, session)))
setStore(
"session",
produce((draft) => void draft.splice(result.index, 0, session)),
)
}
return {
@ -127,10 +130,13 @@ export const createDirSyncContext = (
more: createMemo(() => current()[0].session.length >= current()[0].limit),
archive: async (sessionID: string) => {
await serverSDK.client.session.update({ sessionID, time: { archived: Date.now() } })
current()[1]("session", produce((draft) => {
const match = Binary.search(draft, sessionID, (session) => session.id)
if (match.found) draft.splice(match.index, 1)
}))
current()[1](
"session",
produce((draft) => {
const match = Binary.search(draft, sessionID, (session) => session.id)
if (match.found) draft.splice(match.index, 1)
}),
)
},
},
mcp: {