DeepSeek Harness plugin

dsh-opencodego-quota

OpenCode Go (opencode.ai/zen/go) 额度用量插件:在 DSH Web GUI 左侧栏常驻一张额度卡片,展示日(近5小时)/周/月三个窗口的用量进度条、换算金额、重置时间与刷新时间;自动刷新间隔可在标题栏 设置弹层中自由输入(秒),卡片底部只显示当前秒数。Host 半在宿主进程查询官方 /zen/go/v1/usage 接口,Client 半是一个自包含的左侧栏

Jump to install

Source facts

Repository
wellcover/dsh-opencodego-quota
Latest update
Aug 21, 2026
Category
Tools & Capabilities
GitHub stars
2
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/wellcover/dsh-opencodego-quota
Plugin: dsh-opencodego-quota
Author: wellcover

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-opencodego-quota

DeepSeek Harness(DSH)Web GUI 的 OpenCode Go 额度用量插件:在页面左侧栏底部常驻一张小卡片,展示 日(近5小时)/ 周 / 月 三个窗口的额度使用进度条、已用金额 / 配额、重置时间,以及显式的刷新时间;自动刷新间隔默认 60 秒,点标题栏 ⚙(或底部秒数)在弹出的设置层里自由输入 5–3600 秒,回车或保存生效,持久化到浏览器 localStorage,卡片底部只显示当前秒数。

数据来自 OpenCode 官方用量接口 GET https://opencode.ai/zen/go/v1/usage(与官网仪表盘口径一致),非本地估算。

功能

  • 📍 左侧栏常驻卡片:跟随 DSH 壳层渲染自动复位(MutationObserver 自愈),窄栏(图标栏)模式下自动隐藏
  • 📊 三窗口进度条日 · 近5小时($12)、周 · 本周($30)、月 · 本月($60)
  • 💰 每条显示已用百分比、已用美元 / 配额上限、重置时间(与官网一致)
  • 🎨 进度条随额度渐变(v1.0.4):填充条、圆点与百分比文字颜色随已用额度 0→100% 由绿 → 黄 → 红 平滑渐变(HSL 色相 120→0),额度越高越偏红
  • ⏱️ DS 峰谷进度条(v1.0.2):按北京时间实时显示当前计费时段——高峰 09:00–12:00、14:00–18:00(琥珀色),其余为低谷(绿色);24 小时色带 + 当前时刻标记,显示「高峰/低谷 · 时段区间(不含已过百分比)」,每 30 秒本地刷新
  • ⏱️ 刷新时间(v1.0.3):卡片底部显示「刷新于 HH:MM:SS」与当前间隔秒数(如 60s,点击可打开设置);标题栏 ⚙ 按钮弹出设置层,可输入 5–3600 秒,回车/保存生效、localStorage 持久化;⟳ 按钮手动刷新
  • 🔑 零配置取 Key:自动从 DSH 凭据(OPENCODE_GO_API_KEY)读取,失败时回退到环境变量与 OpenCode CLI 的 auth.json
  • 🔒 Key 仅经 HTTPS 发给官方接口(Authorization: Bearer + x-api-key

<img width="520" height="520" alt="image" src="https://github.com/user-attachments/assets/dbc04827-1dca-4502-a8c4-df51d30c503f" />

安装

从 GitHub 直接安装(推荐)

dsh plugin --profile web add github:wellcover/dsh-opencodego-quota
# 或锁定稳定版本 tag(推荐)
dsh plugin --profile web add github:wellcover/dsh-opencodego-quota#v1.0.5

配置

无需额外配置;唯一前置条件:已配置 OpenCode Go API Key 且能在「设置 → 模型」中选择 opencode-go 提供商(当前默认 provider 即可)。

Key 解析顺序:

顺序来源
1DSH 凭据 OPENCODE_GO_API_KEY~/.dsh/.credentials.yaml
2环境变量 OPENCODE_GO_API_KEY / OPENCODE_API_KEY
3~/.local/share/opencode/auth.jsonopencode-go,回退 opencodetype: "api"

故障排查

现象原因 / 处理
卡片显示「额度获取失败」看工作区下 opencodego-quota-boot.log(宿主激活诊断);确认 cordis.patch.yml 行存在且 inject 列表完整
「未找到 OpenCode Go API Key」在设置 → 模型配置 API Key,或确认 ~/.dsh/.credentials.yamlOPENCODE_GO_API_KEY
卡片不出现插件未激活或 client 未加载:确认 profile package.jsondsh.profile.bundles 含本包名,重启后刷新页面
窄栏图标模式下卡片隐藏设计如此:侧栏 <110px 时自动隐藏,展开侧栏即恢复

变更记录

  • v1.0.5:消除定时“刷新闪动”——数据请求期间不再整卡 loading 重建;30s 本地时钟只在分钟变化时局部替换峰谷条,不再整卡重绘。
  • v1.0.4:额度进度条颜色随已用额度 0→100% 由绿渐变到红(填充条、圆点、百分比同色)。

License

MIT