dsh-balance-widget
Sidebar balance widget for the DeepSeek Harness Web GUI (dsh web). A "余额"
button appears in the sidebar footer; clicking it opens a panel listing each
provider's account balance:
- DeepSeek — live query against
https://api.deepseek.com/user/balance
(works entirely in the browser; the API key lives only in your localStorage)
- MiniMax — console link (no public balance API)
- Qwen Token Plan (百炼) — console link
- SCNet (超算互联网) — console link
- Ollama local — static hint (no balance concept)
Install
dsh plugin --profile web add @feilongrong/dsh-balance-widget
Restart dsh web (or hard-refresh) and the "余额" button appears at the
bottom of the sidebar.
Usage
- Click 余额 in the sidebar footer.
- Click ⚙ 设置 API Key, paste your DeepSeek API key
(generate one at https://platform.deepseek.com/api_keys).
The key is stored only in this browser's localStorage — it never leaves the
machine and is never uploaded anywhere.
- The panel shows total / topped-up / granted balance and account status,
auto-refreshing every 60 s while open.
Development
lib/index.js — host half (minimal cordis plugin; the loader entry).
lib/client.js — browser half: sidebar injection + balance panel, loaded by
the GUI's module loader via the dsh.client declaration in package.json.
No build step: the package ships plain ESM in lib/, matching the minimal
plugin layout (dsh.bundle.patch → cordis.patch.yml).
License
MIT