diff options
| author | David Hill <[email protected]> | 2025-12-12 20:23:06 +0000 |
|---|---|---|
| committer | David Hill <[email protected]> | 2025-12-12 20:23:06 +0000 |
| commit | 9b77246246ab0d81aaee23514c343ccb93c36847 (patch) | |
| tree | 09749dd9d91275b7fec4035fafbefc9e4cd0cb6c /packages/desktop/src/context/sync.tsx | |
| parent | cf3bc1e0a6324a01ae10a2849476d7dc07e4876b (diff) | |
| parent | d51c6ca39f382ef616157680ca7366b6ee58713e (diff) | |
| download | opencode-9b77246246ab0d81aaee23514c343ccb93c36847.tar.gz opencode-9b77246246ab0d81aaee23514c343ccb93c36847.zip | |
Merge branch 'dev' of https://github.com/sst/opencode into dev
Diffstat (limited to 'packages/desktop/src/context/sync.tsx')
| -rw-r--r-- | packages/desktop/src/context/sync.tsx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/desktop/src/context/sync.tsx b/packages/desktop/src/context/sync.tsx index 85758c5b6..2ab54b3ae 100644 --- a/packages/desktop/src/context/sync.tsx +++ b/packages/desktop/src/context/sync.tsx @@ -65,6 +65,15 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({ }) }, more: createMemo(() => store.session.length >= store.limit), + archive: async (sessionID: string) => { + await sdk.client.session.update({ sessionID, time: { archived: Date.now() } }) + setStore( + produce((draft) => { + const match = Binary.search(draft.session, sessionID, (s) => s.id) + if (match.found) draft.session.splice(match.index, 1) + }), + ) + }, }, absolute, get directory() { |
