packages/dsh-task-board
zhu1090093659/dsh-web侧边栏多列任务看板:卡片交给真实 DSH 智能体会话执行,支持 cron 定时(Host 侧到点执行,关浏览器也生效)。
在 DSH 对话底栏(输入框下方的统计行)显示当前 DeepSeek 账户的剩余余额,定时刷新,并在每轮对话结束后立即更新。
A DeepSeek Harness (DSH) plugin that shows the remaining balance of the signed-in DeepSeek account in the composer bottom bar — the stat row under the message box that already carries N turns · M steps, tokens/s, token usage and the context ring.
[welcome icon] 余额 ¥12.34 [stats] 1 轮 160 步 · 254 tok/s [usage] 10.9M tok · 缓存命中 98% (ring) 9%
The pill shows the total spendable balance (topped-up + granted) per currency, e.g. 余额 ¥17.34; hovering it breaks the total down into topped-up and granted amounts, shows when it was last refreshed, and reminds you that a click refreshes it.
dsh-account-balance-pilldsh.bundle.patch plus a Web Client half; no dependencies, no build stepaccount-balance) in the slot conversation.composer.dock, next to the shipped activity and usage pillsctx.get('remote.account').getBalance(...), the same call the Settings → Account panel makes). The plugin stores nothing, reads no credential file, and makes no network request of its own.Install from GitHub into the profile you use:
dsh plugin --profile <profile> add github:azkbzxf/dsh-account-balance-pill
A newly added bundle activates on the running instance (the Host row is live immediately and the Client half hot-loads into the open page). Replacing an already-installed copy needs a DSH restart for the fresh client build.
Inside DSH Desktop you can also use the plugin manager:
{ "action": "install_bundle", "target": "D:\\path\\to\\dsh-account-balance-pill" }
Remove:
dsh plugin --profile <profile> remove dsh-account-balance-pill
| Account state | Bottom bar |
|---|---|
| Signed in with a balance | Wallet icon + 余额 ¥12.34; tooltip with the topped-up / granted breakdown, last-update time and a click-to-refresh hint |
Signed out, or no account grant (the Remote returns null) | Nothing — no placeholder, no error |
| Read failure (offline, host refused) | Keeps the last known value, dimmed as stale; stays hidden if no value was ever read |
| Currencies | ¥ for CNY and $ for USD; topped-up + granted are combined per currency, CNY first |
Amounts are formatted by truncating to cents, matching the official Settings page so the pill never shows more money than is actually available; thousands are grouped. 0 shows ¥0.00, anything under one cent shows <¥0.01.
sessionStats projection's steps changes);One request is in flight at a time, requests are at least 3 s apart, and failures back off exponentially from 4 s up to 60 s before recovering automatically.
dsh web), verified on DSH Desktop 2.0.18 with client 0.2.1-rc.2.conversation.composer.dock and the shipped account Remote. It never replaces or edits existing UI, never reads another plugin's DOM or styles, never appends to document.body.--dsw-* / --dsh-*), so light/dark themes and font-size changes are inherited. All visible text goes through the DSH client locale service (zh/en) and follows the interface language.ctx.get('remote.account')) because the ctx.remote.account property chain is only readable from contexts that declare that dependency explicitly.package.json exports "./package.json" because DSH's client-module composition locates the package manifest through that export, and the dsh.bundle.patch row name matches the package name.The poll interval can be overridden globally (milliseconds, clamped to 5 s – 1 h):
window.__DSH_ACCOUNT_BALANCE__ = { intervalMs: 60000 };
test/harness.mjs is an offline smoke test: it loads client.js with stub React/document/locale/slots/remote implementations and asserts the slot registration, locale namespace, request metadata, formatting, hidden/stale states and timer counts.
node test/harness.mjs client.js
File map: client.js — Client half (pill, store, formatting, styles); index.js — no-op Host half; cordis.patch.yml — the bundle patch; locale/{en,zh}.json — display metadata for the plugin list; icon.svg — artwork.
MIT.