diff options
| author | Adam <[email protected]> | 2025-12-26 20:47:13 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-26 20:47:13 -0600 |
| commit | 4385fa4dd79955cdb1d7086365ee1a238ebf9748 (patch) | |
| tree | 1809f39a2a00d8040fe1cd8b073a03d54cb2922a /packages/app/src/context | |
| parent | 2b054bec9582b6a6ba421d5ea40576878f8e59e8 (diff) | |
| download | opencode-4385fa4dd79955cdb1d7086365ee1a238ebf9748.tar.gz opencode-4385fa4dd79955cdb1d7086365ee1a238ebf9748.zip | |
fix(desktop): prompt input fixes, directory and branch in status bar
Diffstat (limited to 'packages/app/src/context')
| -rw-r--r-- | packages/app/src/context/global-sync.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/app/src/context/global-sync.tsx b/packages/app/src/context/global-sync.tsx index 7a9dc8dc4..c51901eb2 100644 --- a/packages/app/src/context/global-sync.tsx +++ b/packages/app/src/context/global-sync.tsx @@ -14,6 +14,7 @@ import { type Command, type McpStatus, type LspStatus, + type VcsInfo, createOpencodeClient, } from "@opencode-ai/sdk/v2/client" import { createStore, produce, reconcile } from "solid-js/store" @@ -47,6 +48,7 @@ type State = { [name: string]: McpStatus } lsp: LspStatus[] + vcs: VcsInfo | undefined limit: number message: { [sessionID: string]: Message[] @@ -93,6 +95,7 @@ function createGlobalSync() { todo: {}, mcp: {}, lsp: [], + vcs: undefined, limit: 5, message: {}, part: {}, @@ -159,6 +162,7 @@ function createGlobalSync() { config: () => sdk.config.get().then((x) => setStore("config", x.data!)), mcp: () => sdk.mcp.status().then((x) => setStore("mcp", x.data ?? {})), lsp: () => sdk.lsp.status().then((x) => setStore("lsp", x.data ?? [])), + vcs: () => sdk.vcs.get().then((x) => setStore("vcs", x.data)), } await Promise.all(Object.values(load).map((p) => retry(p).catch((e) => setGlobalStore("error", e)))) .then(() => setStore("ready", true)) @@ -305,6 +309,10 @@ function createGlobalSync() { } break } + case "vcs.branch.updated": { + setStore("vcs", { branch: event.properties.branch }) + break + } } }) |
