mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
4 lines
391 B
JavaScript
4 lines
391 B
JavaScript
// @bindings {"event": {"type": "init"}, "state": null}
|
|
if (event.type === "init") return { state: { runs: 0 }, commands: [{ name: "git.status", key: "ctrl+g" }] }
|
|
if (event.type === "command" && event.name === "git.status") { const s = await tools.git.status(); return { state: { runs: state.runs + 1 }, slots: { statusbar: { text: s.branch + (s.dirty ? " *" : "") } } } }
|
|
return { state }
|