diff options
| author | Adam <[email protected]> | 2025-11-18 11:35:17 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-11-18 11:35:23 -0600 |
| commit | 333b8e907bb758adca3da69f4af72b9abe08777a (patch) | |
| tree | 6d8543480918607a1ce2941123835a4af7e072b4 /packages/desktop/src/context/global-sync.tsx | |
| parent | 13f319b64fcfb8ea34871ab5678514c0f5b3a04d (diff) | |
| download | opencode-333b8e907bb758adca3da69f4af72b9abe08777a.tar.gz opencode-333b8e907bb758adca3da69f4af72b9abe08777a.zip | |
fix(desktop): busy state and reactivity
Diffstat (limited to 'packages/desktop/src/context/global-sync.tsx')
| -rw-r--r-- | packages/desktop/src/context/global-sync.tsx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/desktop/src/context/global-sync.tsx b/packages/desktop/src/context/global-sync.tsx index 99c679c93..785a39928 100644 --- a/packages/desktop/src/context/global-sync.tsx +++ b/packages/desktop/src/context/global-sync.tsx @@ -11,6 +11,7 @@ import type { Project, FileDiff, Todo, + SessionStatus, } from "@opencode-ai/sdk" import { createStore, produce, reconcile } from "solid-js/store" import { Binary } from "@/utils/binary" @@ -25,6 +26,9 @@ type State = { config: Config path: Path session: Session[] + session_status: { + [sessionID: string]: SessionStatus + } session_diff: { [sessionID: string]: FileDiff[] } @@ -68,6 +72,7 @@ export const { use: useGlobalSync, provider: GlobalSyncProvider } = createSimple agent: [], provider: [], session: [], + session_status: {}, session_diff: {}, todo: {}, limit: 10, @@ -108,6 +113,10 @@ export const { use: useGlobalSync, provider: GlobalSyncProvider } = createSimple case "todo.updated": setStore("todo", event.properties.sessionID, event.properties.todos) break + case "session.status": { + setStore("session_status", event.properties.sessionID, event.properties.status) + break + } case "message.updated": { const messages = store.message[event.properties.info.sessionID] if (!messages) { |
