From df9952c2914c08cf57892ecdefc16ffa9ad95f2d Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" <219766164+opencode-agent[bot]@users.noreply.github.com> Date: Wed, 26 Nov 2025 01:17:59 -0600 Subject: [PATCH] Renamed vcs.changed to vcs.branch.updated (#4771) Co-authored-by: opencode-agent[bot] Co-authored-by: rekram1-node --- packages/opencode/src/cli/cmd/tui/context/sync.tsx | 2 +- packages/opencode/src/project/vcs.ts | 6 +++--- packages/sdk/js/src/gen/types.gen.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/context/sync.tsx b/packages/opencode/src/cli/cmd/tui/context/sync.tsx index adedfad09..80884c73a 100644 --- a/packages/opencode/src/cli/cmd/tui/context/sync.tsx +++ b/packages/opencode/src/cli/cmd/tui/context/sync.tsx @@ -242,7 +242,7 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({ break } - case "vcs.changed": { + case "vcs.branch.updated": { setStore("vcs", "vcs", { branch: event.properties.branch }) break } diff --git a/packages/opencode/src/project/vcs.ts b/packages/opencode/src/project/vcs.ts index 153583564..59b2f99b7 100644 --- a/packages/opencode/src/project/vcs.ts +++ b/packages/opencode/src/project/vcs.ts @@ -10,8 +10,8 @@ const log = Log.create({ service: "vcs" }) export namespace Vcs { export const Event = { - Changed: Bus.event( - "vcs.changed", + BranchUpdated: Bus.event( + "vcs.branch.updated", z.object({ branch: z.string().optional(), }), @@ -58,7 +58,7 @@ export namespace Vcs { if (next !== current) { log.info("branch changed", { from: current, to: next }) current = next - Bus.publish(Event.Changed, { branch: next }) + Bus.publish(Event.BranchUpdated, { branch: next }) } }) log.info("watching", { path: gitHead }) diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts index 4ec6b15df..08335dd39 100644 --- a/packages/sdk/js/src/gen/types.gen.ts +++ b/packages/sdk/js/src/gen/types.gen.ts @@ -589,8 +589,8 @@ export type EventSessionError = { } } -export type EventVcsChanged = { - type: "vcs.changed" +export type EventVcsBranchUpdated = { + type: "vcs.branch.updated" properties: { branch?: string } @@ -677,7 +677,7 @@ export type Event = | EventSessionDeleted | EventSessionDiff | EventSessionError - | EventVcsChanged + | EventVcsBranchUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow