SwordSifu/dsh-opencode-go-quota-card ↗★ 0
dsh-opencode-go-quota-card
DeepSeek Harness (DSH) web 插件:在会话输入框下方显示 OpenCode Go 套餐额度卡片(5小时滚动/周/月),定期自动刷新。A DSH web plugin showing an OpenCode Go quota card that refreshes periodically.
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-opencode-go-quota-card
DeepSeek Harness (DSH) Web GUI 插件:在会话输入框下方显示一张 OpenCode Go 套餐额度卡片,展示 5 小时滚动 / 周 / 月三个窗口的用量,并定期自动刷新(默认每 5 分钟),支持手动刷新。
A DSH web plugin: a quota card for your OpenCode Go subscription (5h rolling / weekly / monthly windows), auto-refreshed every 5 minutes by default.
TL;DR(给人类)
- 把本仓库的
index.js、client.js、typert.host.js、package.json放进~/.dsh/profiles/web/node_modules/dsh-opencode-go-quota-card/ - 在
~/.dsh/profiles/web/cordis.patch.yml末尾追加注册行(见下方 注册行) - 重启 DSH Desktop(或
dsh web) - 打开任意会话,输入框下方出现额度卡片
Agent 安装手册(给 AI 代理的逐步指令)
本手册写给自动化代理:按顺序执行,每步完成后先验证再继续。任何一步失败,先看文末故障排查,不要跳过验证。
前置条件检查
- DSH 已安装且使用过 web profile:
$DSH_HOME(默认~/.dsh)下存在profiles/web/目录。- Windows PowerShell:
Test-Path "$env:USERPROFILE\.dsh\profiles\web"→ 应为True - macOS/Linux:
test -d "$HOME/.dsh/profiles/web" && echo yes→ 应为yes
- Windows PowerShell:
- 目标文件
~/.dsh/profiles/web/cordis.patch.yml存在且是合法 YAML 数组。 - (可选但建议)用户已配置 OpenCode Go 密钥
OPENCODE_GO_API_KEY(位于~/.dsh/.credentials.yaml);未配置时插件仍能运行,只是卡片显示"未配置 OPENCODE_GO_API_KEY"。
Step 1 — 安装包文件
方法 A(推荐,可控):手动复制
把本仓库根目录的 4 个文件复制到 profile 的 node_modules 下:
# Windows (PowerShell)
$src = ""
$dest = "$env:USERPROFILE\.dsh\profiles\web\node_modules\dsh-opencode-go-quota-card"
New-Item -ItemType Directory -Force -Path $dest | Out-Null
Copy-Item "$src\index.js", "$src\client.js", "$src\typert.host.js", "$src\package.json" -Destination $dest
# macOS / Linux
SRC=""
DEST="$HOME/.dsh/profiles/web/node_modules/dsh-opencode-go-quota-card"
mkdir -p "$DEST"
cp "$SRC/index.js" "$SRC/client.js" "$SRC/typert.host.js" "$SRC/package.json" "$DEST/"
验证:以下命令在 profiles/web 目录执行,应输出 LOADED function(Windows 用 DSH 自带的 node,如 D:\...\resources\node\node.exe):