mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
Renamed vcs.changed to vcs.branch.updated (#4771)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
parent
ee946d8128
commit
df9952c291
3 changed files with 7 additions and 7 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 })
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue