MST19711/dsh-balance-panel0

@deepseek-ai/dsh-balance-panel

Extensible balance/usage panel for the DeepSeek Harness Web UI: a floating card on the right edge that auto-selects a backend by the current session's provider. Backends: OpenCode Go (subscription quota windows with progress bars), Zhipu open platform (pay-as-you-go cash balance, money-only rows), and DeepSeek open platform (pay-as-you-go cash balance via the official /user/balance endpoint). Adding a provider = registering one backend object.

包名
@deepseek-ai/dsh-balance-panel
版本
0.3.0
许可证
MIT
最近更新
2026年9月10日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:MST19711/dsh-balance-panel

Balance Panel — DSH 的可扩展余额/用量面板

产品名 Balance Panel(余额面板);npm 包名 / 仓库名 @deepseek-ai/dsh-balance-panel。 本项目由 Go Meter(v0.1.0,OpenCode Go 专用额度小窗)泛化而来: v0.2.0 起是多后端可扩展的余额面板,OpenCode Go 只是内置后端之一。

当当前会话使用的模型命中某个已接入后端时,在 DSH Web 界面右侧边缘显示一张常驻小窗; 切换到未接入的 provider 时自动隐藏。面板内容按当前 provider 自动选择,同一时刻只显示一张。

内置后端

后端认领的 provider 路由语义展示
opencode-goid opencode-go,或 baseURL 指向 opencode.ai/zen 的自定义路由订阅配额(有窗口、有重置)5h 滚动 / 本周 / 本月三行「剩余百分比 + 重置倒计时 + 进度条」;剩 ≤30% 橙、≤10% 红
zhipuid zhipu,或 baseURL 指向 bigmodel.cn 的路由(含被改到按量计费端点的 zai-coding-cn —— 同一现金池)按量计费现金余额(无配额窗口,不存在「剩余比例」语义)纯金额行:可用余额(加粗)/ 累计充值 / 累计消费;赠送、冻结仅在非零时出现;徽章圆点按绝对余额提醒(」)+「刷新 / — 折叠」
  • 折叠态:圆点徽章(文案来自 panel.chip),点击展开
  • 设置:「设置 → 余额面板」:启用开关、刷新间隔(15/30/60/120s)、默认折叠
  • v0.1.0 的本地配置自动迁移到新存储键(dsh-balance-panel:config)

安装

bash install.sh          # npm pack + dsh plugin add(默认 web profile)

从 v0.1.0 升级:先 pnpm --dir ~/.dsh/profiles/web remove @deepseek-ai/dsh-opencode-go-usage, 再运行上面的安装脚本,并把 profile dsh.profile.bundles 里的旧包名替换为 @deepseek-ai/dsh-balance-panel。重启 DSH 后生效。