Skip to content

yascitom/dsh-opencode-go-box

52Last commit Aug 15, 2026

dsh-opencode-go-box DSH plugin

This plugin adds an "OpenCode Go" section to the DSH settings sidebar, displaying quota usage (5-hour rolling, weekly, monthly), session-level token details with cache hit rates, and a bottom bar widget. It works entirely from DSH's own conversation logs, without needing the OpenCode client installed.

How to install the dsh-opencode-go-box DSH plugin

dsh plugin --profile web add github:yascitom/dsh-opencode-go-box

Copying does not run this command. Review the repository and version before installing the dsh-opencode-go-box DSH plugin.

dsh-opencode-go-box DSH plugin data source

dsh-opencode-go-box DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-opencode-go-box DSH plugin can do

  • Quota windows: 5-hour rolling, weekly, monthly with percentage, reference limits, and reset time.
  • DSH session details: token usage per session and per model call (turn/step level), with cache read/write and hit rate.
  • Model filtering: sessions grouped by model, with summary table across models.
  • Bottom bar widget: real-time quota display (30s polling) with color thresholds, hover for full text.
  • Diagnostics panel: HTTP status, parse version, credential source, last 3 request snapshots (with raw response).
  • Bilingual UI: Chinese and English toggle, persisted via settings.

Where the dsh-opencode-go-box DSH plugin fits

  • Track OpenCode Go quota consumption across different time windows.
  • Review detailed token usage for each DSH conversation using opencode-go.
  • Identify cache hit patterns to optimize model usage.
  • Compare usage across different models when multiple are configured.
  • Quickly check remaining quota from the bottom bar while chatting.

Who the dsh-opencode-go-box DSH plugin is for

  • Developers using DeepSeek Harness with OpenCode Go models.
  • Users who need to monitor their API usage and token consumption.

dsh-opencode-go-box DSH plugin limitations

  • Usage API is not publicly documented and may change; parsing is defensive but no guarantee.
  • Quota reference limits (e.g., $12/$30/$60) are display-only, not from API, and may drift.
  • Session token counts are from DSH logs only, not official billing; differences may exist.
  • Plugin requires DSH web profile with standard bundles (api-gateway, settings.section) – default in dsh web.

dsh-opencode-go-box DSH plugin: from the repository README

Quoted from the yascitom/dsh-opencode-go-box README, the upstream source of the dsh-opencode-go-box DSH plugin. Copyright remains with the original authors.

中文 | [English](README.en.md) 一个 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web-GUI 插件,为接入 **OpenCode Go** 模型的用户提供完整用量观测: - **额度窗口**:5 小时滚动 / 每周 / 每月 三个窗口的已用百分比、套餐参考限额和重置时间; - **DSH 会话明细**:DeepSeek Harness 中每个使用 opencode-go 模型的会话的 token 用量,并可下钻到**每一次模型调用**(turn/step 级); - **缓存统计**:会话累计、单会话、单次调用三个层级都展示**缓存读取(命中)/ 缓存写入**,并计算**缓存命中率**(缓存读取占全部输入的比例); - **模型筛选**:按模型分组筛选会话(chips),查看每个模型的用量与缓存情况,并附**按模型汇总**对比表; - **双语界面**:内置中文 / English 两套文案,面板右上角可**一键切换语言**(与「设置 → 通用 → 语言」联动并持久化); - **底栏常驻挂件**:输入框下方一行实时额度(30s 轮询),按阈值自动变色; - **数据新鲜度**:额度页与底栏挂件均标注「最近成功更新」时间;轮询失败时**保留最后一次成功数据**并标注「未更新」(stale),不会误清空为失败状态; - **诊断区块**:额度页可展开「诊断」——HTTP 状态码、解析版本、凭证来源与掩码 key、最近 3 次请求快照(含原始响应体),便于与官方页面核对; - **计费口径提示**:DSH 明细标注「本地统计仅供参考」,提醒日志 token 与官方账单可能存在的差异。 ## 功能特性 - 设置侧边栏新增 **"OpenCode Go"** 栏目(`settings.section` 贡献),内含「额度」「DSH 会话明细」两个标签页 - Host 端 Typert Remote `opencodeUsage`:`usage` / `dshUsage` / `dshSessionMessages` 三个方法 - **DSH 会话明细完全基于 DeepSeek Harness 自身的会话日志**(每条 `assistant/message` 事件自带 token 记账),不依赖本机是否安装 OpenCode 客户端,任何 DSH 部署都能用 - 缓存统计:`cacheReadTokens`(命中)/ `cacheWriteTokens`(写入)按会话、按调用展示;命中率 = 缓存读取 ÷(非缓存输入 + 缓存读取) - 模型筛选:会话按 `source.model` 分组,chips 一键筛选,筛选后累计卡片与列表同步收窄

Read the full READMERepository license: MIT

dsh-opencode-go-box DSH plugin questions

How do I install this plugin?

Run 'dsh plugin --profile web add github:yascitom/dsh-opencode-go-box' in your terminal. Make sure you have DeepSeek Harness with the web profile configured. After installation, restart 'dsh web' for the changes to take effect.

Does this plugin require the OpenCode client installed?

No. The plugin works entirely from DeepSeek Harness's own conversation logs. It does not depend on the OpenCode client being installed on the machine. It only needs the API key configured in the opencode-go provider settings.

Where does the quota data come from?

The plugin fetches quota data from the OpenCode usage API at 'https://opencode.ai/zen/go/v1/usage' using the API key you configured for the opencode-go model. The API is not publicly documented, but the plugin handles errors gracefully.

How do I switch between Chinese and English?

In the plugin's panel (OpenCode Go section in settings), there is a language toggle button in the top-right corner. Click it to switch between Chinese and English. The choice is persisted and synchronized with the general settings language option.

What do the bottom bar colors mean?

The bottom bar widget shows the 5-hour rolling quota percentage. By default, green for <60%, orange for 60–85%, and red for ≥85%. You can customize the thresholds (warnPercent and dangerPercent) in the plugin configuration via cordis.patch.yml.