DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-opencode-go-usage-compact

z

dsh-opencode-go-usage-compact

Manifest valid

Collapsible OpenCode GO usage widget for DeepSeek Harness: arrow-only footer handle, 5h/weekly/monthly quotas, same-origin proxy. Fork of @astervolans/dsh-opencode-go-usage.

UI (client)hasBundlePatch

dsh-opencode-go-usage-compact

可收拢的 OpenCode GO 用量小组件,用于 DeepSeek Harness (DSH)。

这是 @astervolans/dsh-opencode-go-usage 1.5.0 的修改版(它的上游是 yumusb/dsh-opencode-go-usage)。保留原来的数据源、同源代理、/opencode-go 命令和 x-opencode-session 修复,把侧边栏底部的用量面板改成可收拢的一行,并修了一些问题。

English

界面

收拢(默认)展开
收拢状态展开状态
  • 收拢:一行显示三个窗口的百分比,箭头位于分割线中间,没有外框。
  • 展开:5 小时 / 周 / 月三条用量条,下面各有一条时间进度条,右侧是重置倒计时。
  • 箭头方向跟随状态:展开向下,收拢向上;点击箭头或标题行都可以切换。
  • 状态保存在浏览器 localStorage,刷新或重启后保持上次选择。

功能

  • 侧边栏底部常驻,默认收拢,不占工作区高度
  • 5h / 周 / 月额度百分比、时间进度、重置倒计时
  • 同源代理:host 端请求 https://opencode.ai/zen/go/v1/usage,浏览器只访问 /opencode-go/usage,API key 不进入前端
  • /opencode-go 聊天命令,输出同样三个窗口的文本
  • 运行时注入 x-opencode-session,修复 OpenCode GO 网关的 400 MissingSessionID
  • 中文 / English 跟随 DSH 的界面语言,实时切换
  • 没有 npm 自动更新检查;更新通过 GitHub

安装

适用 DSH 0.1.7 及以上(含 0.2.x),已在 0.2.1-rc.2 上验证。

先移除原插件(如果装过),避免两个插件争用同一个用量路由和 /opencode-go 命令,并在侧边栏出现两个小组件:

dsh plugin --profile desktop remove @astervolans/dsh-opencode-go-usage

然后从 GitHub 安装本仓库:

dsh plugin --profile desktop add github:zhufei1000/dsh-opencode-go-usage-compact

安装后完全退出并重新打开 DSH;Web 用户重启 dsh web 并刷新页面。

如果你用的是 web profile,把 desktop 换成 web。

API key 仍然使用 DSH 的 credential OPENCODE_GO_API_KEY,不需要重新填写。没有配置过的话,在 ~/.dsh/.credentials.yaml 里加:

OPENCODE_GO_API_KEY: sk-...

或者直接使用环境变量 OPENCODE_GO_API_KEY。

配置

在 设置 → 插件 → 插件配置 中修改,字段都是 volatile,改完即时生效:

键默认说明
apiKeyEnvOPENCODE_GO_API_KEYAPI key 的 credential 引用
baseUrlhttps://opencode.ai/zen/goOpenCode GO 网关地址
cacheMs30000host 端用量缓存 TTL
injectSessionHeadertrue为 OpenCode GO 请求注入 x-opencode-session

与上游 1.5.0 的差异

  • 侧边栏底部面板可手动收拢 / 展开,收拢后只占一行
  • 收拢拉手改成分割线中间的纯箭头,没有胶囊边框或底色
  • 中文紧凑标签用「五小时 / 周 / 月」,避免阿拉伯数字 5 与汉字视觉高度不一致
  • host 端修复 Request 对象被 String() 成 [object Request]、导致 session header 不注入的问题
  • 注入 header 时保留 Request 自带的 headers
  • 标题行不再重复声明 role="button",只保留箭头按钮这一个语义控件
  • 30 秒时间条 tick 只在展开时运行
  • 移除 setOpen updater 里的 localStorage 副作用
  • 修复紧凑模式在“已加载但无窗口数据”时仍显示“加载中…”
  • 移除 npm 自动更新检查(本仓库通过 GitHub 分发)

完整变更见 CHANGELOG.md。

兼容性

  • DSH:>=0.1.7-rc.1 <0.3.0(peerDependencies)
  • Node.js:>=18
  • 已在 DSH 0.2.1-rc.2 上验证 host 路由和侧边栏组件

如果 DSH 的 peer 校验拒绝某个版本,可以显式放行:

dsh plugin --profile desktop allow-version dsh-opencode-go-usage-compact@1.5.1 --dsh-version <你的版本> --accept-risk

许可证

MIT。本项目是 MIT 项目的修改版,完整版权与许可文本见:

上游版权:Copyright (c) 2026 opencode-go-usage contributors;本 fork 的修改:Copyright (c) 2026 zhufei1000。

OpenCode GO 是 OpenCode 的产品名称;本项目与 OpenCode 官方没有隶属关系。

开发

lib/client.js 是手写的 DSH client bundle(window.__ModuleLoader__.load),lib/index.js 是 host 端,lib/opencode-session.js 负责 session header 注入。没有构建步骤,改完直接重载 DSH 即可。

node --check lib/index.js
node --check lib/client.js
node --check lib/opencode-session.js

Comments

Loading…

Similar plugins

@astervolans/dsh-opencode-go-usage

DSH (DeepSeek Harness) plugin: OpenCode GO plan quota widget in the sidebar, same-origin usage proxy, and a /opencode-go chat command

Tools & CapabilitiesTerminal & ClientsManifest valid

★ 0

dsh plugin --profile web add @astervolans/dsh-opencode-go-usage

by mouseteamlucky

DSH (DeepSeek Harness) web plugin: floating widget showing real-time OpenCode Go subscription usage (rolling / weekly / monthly) for every API key. Maintained fork of @xiaweiliang060035/dsh-opencode-g

Development & InfrastructureManifest valid

★ 0

MIT

JavaScript

Sep 5, 2026

dsh plugin --profile web add @mouseteamlucky/dsh-opencode-go-usage

by WihteCo

OpenCode Go quota in the DeepSeek Harness sidebar foot: one 42px cell plus a hover popover with the rolling 5-hour, weekly and monthly windows, each carrying a usage bar, an elapsed-time marker, the remaining share and a reset countdown.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 0

MIT

JavaScript

Oct 7, 2026

dsh plugin --profile web add dsh-opencode-go-quota

by xiaweiliang060035

DSH (DeepSeek Harness) web plugin — floating widget showing real-time OpenCode Go subscription usage (rolling / weekly / monthly) for every API key. 悬浮实时展示 opencode-go 各 key 用量。

Tools & CapabilitiesTerminal & ClientsModels & ProvidersManifest valid

★ 3

↓ 270/wk

MIT

JavaScript

Aug 15, 2026

dsh plugin --profile web add @xiaweiliang060035/dsh-opencode-go-usage

by qknc-bot

DSH plugin: OpenCode Go quota ring + expandable card (5h/weekly/monthly usage) for DeepSeek Harness Web

Manifest valid

★ 0

MIT

JavaScript

Aug 16, 2026

dsh plugin --profile web add dsh-opencode-go-usage

by badai147

Shows OpenCode Go quota usage in the web sidebar's bottom-left corner — rolling/weekly/monthly progress with a hover card, plus a Beijing-time DeepSeek peak-hour timeline.

Tools & CapabilitiesDevelopment & InfrastructureTerminal & ClientsModels & ProvidersManifest valid

★ 2

↓ 204/wk

MIT

JavaScript

Sep 8, 2026

dsh plugin --profile web add @badai147/dsh-ocgo-usage