@0rch1d/dsh-client-ui-opencode-go
v1.0.2
Published
OpenCode Go usage meter for DeepSeek Harness: a live quota ring and hover card for the opencode-go provider.
Readme
@0rch1d/dsh-client-ui-opencode-go
OpenCode Go usage meter for the DeepSeek Harness Web GUI.
Shows a live quota badge in the session header — beside the title, in the same
action row as the subagent / jobs / preset buttons — whenever the selected
model provider is opencode-go:
- an OpenCode mark beside a usage ring that starts as a dashed circle and fills with a solid arc as the rolling 5-hour window is consumed;
- hovering opens a card with three progress bars — rolling / weekly / monthly usage, each with its reset countdown;
- a
rate-limitedwindow renders in an amber warning color.
Install
dsh plugin --profile web add @0rch1d/dsh-client-ui-opencode-goConfigure
Add your OpenCode Go API key to the harness credential store
($DSH_HOME/.credentials.yaml, mode 0600):
OPENCODE_GO_API_KEY: sk-...The key stays server-side: the host half reads it through the credential seam and serves only the usage summary to the browser. It never reaches the client bundle and is never hardcoded in this package.
How it works
- Host half reads
OPENCODE_GO_API_KEYfromctx.credentials, fetchesGET https://opencode.ai/zen/go/v1/usage, caches it with a 60s TTL, and serves it on a same-origin route/opencode-go/usage. - Browser half polls that route every 60s and renders the ring + hover card.
- The upstream API is hit at most once per minute regardless of how many sessions are open.
Notes
- The badge only appears while the selected provider id is
opencode-go. - The usage route is served on the DSH web server (
127.0.0.1by default) and returns usage percentages only, never the API key.
License
MIT
