balance-dock
DeepSeek account balance readout docked under the composer for DeepSeek Harness (dsh) — a persistent web plugin.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Cao-zhi-hao/balance-dock说明文档
阅读完整 README ↗balance-dock
DeepSeek 账户余额 · DeepSeek Harness (dsh) 常驻 Web 插件 A persistent DeepSeek balance readout plugin for DeepSeek Harness (dsh).
在 dsh 会话输入框下方的状态条区域显示你的 DeepSeek 账户余额,每 60 秒自动刷新,也可手动刷新。作为部署级常驻插件,每次打开页面、刷新页面都会自动加载——不会像动态插件那样刷新后消失。
Shows your DeepSeek account balance in the status band under the conversation composer. Auto-refreshes every 60 seconds with a manual refresh button. As a deployment-level persistent web plugin it loads automatically on every page open/refresh — it never disappears like a dynamic plugin does.
✨ 功能特性 / Features
- ✅ 常驻持久 — 刷新页面、重开页面、重启进程后依然存在,无需手动激活 Persistent — survives page refresh, re-open, and process restart without manual activation
- ✅ 安全取数 — API 密钥只存在于 Host 端(经
ctx.credentials解析),浏览器只访问同源/ds-balance接口 Secure — the API key lives only on the Host side (resolved viactx.credentials); the browser only fetches the same-origin/ds-balanceendpoint - ✅ 自动刷新 — 每 60 秒刷新,支持 ↻ 手动刷新 Auto-refresh — every 60 seconds, plus a ↻ manual refresh button
- ✅ 主题适配 — 使用 dsh 主题变量,自动适配明暗模式 Theme-aware — uses dsh theme tokens, adapts to light/dark mode
- ✅ 多币种 — 支持 CNY/USD/EUR 符号显示(其余按 ISO 代码前缀) Multi-currency — CNY/USD/EUR symbols with ISO-code fallback
📦 安装 / Installation
前置要求 / Prerequisites
- 已安装并运行 DeepSeek Harness web profile
- 已配置
DEEPSEEK_API_KEY(通常位于$DSH_HOME/.credentials.yaml,或 Web 设置页 Models 中配置)
方式一:dsh plugin 命令安装(推荐)/ Option 1: dsh plugin command (recommended)
本包是 bundle 插件(声明了 dsh.bundle.patch + dsh.client),可直接用 dsh 内置的插件管理命令安装,它会自动把插件注册进 profile 层栈:
# 从 npm registry 安装(发布后)
dsh plugin --profile web add balance-dock
# 或从 GitHub 直接安装
dsh plugin --profile web add github:/balance-dock
# 或本地仓库(在仓库父目录执行)
dsh plugin --profile web add ./balance-dock
安装脚本
scripts/install.ps1同样可用,两种方式二选一。