sidebar-balance
Manifest valid显示 DeepSeek Harness 账户余额的侧边栏插件 / Shows the signed-in DeepSeek account balance right at the sidebar foot — theme-aware, zh/en, no telemetry.
dsh-sidebar-balance
English | 中文
See your balance without opening Settings → Account.
A DeepSeek Harness Web plugin that puts your signed-in DeepSeek account balance right at the sidebar foot, reading the same data as the Account page. It follows the theme and the UI language, refreshes on click and on sign-in changes, and reports nothing anywhere.
┌───────────────────────────────┐
│ ... │
│ │
│ [ 🔌 Plugins 3 ] [余额 ¥12.34] │
│ [ (avatar) Name ⚙ ] │
└───────────────────────────────┘
Features
- A balance pill in the
sidebar.footer.actionslot, directly above the account/settings row. - Reads the account through the shipped
accountRemote namespace (getBalance, plus thewatchstream for sign-in changes), i.e. the same data the Account settings page shows. No credentials are copied, cached, or stored. - Refreshes on mount, when the account signs in or out (account snapshot stream), when the pill is clicked, and when the window becomes visible again (30 s throttle). It never polls.
- Currency formatting follows the active UI language: two decimals and digit grouping, narrow currency
symbols (
¥/$), amounts summed in whole cents. - The tooltip lists every currency wallet and any positive bonus credit, plus a refresh hint.
- Hides itself while signed out. When the sidebar is collapsed to the 56 px rail, the same reading moves to the composer status row as a compact pill beside the turn and token stats.
Requirements
- DeepSeek Harness with the Web UI (Desktop app or browser). Built and verified against
0.2.1-rc.5. - A signed-in DeepSeek account (Settings → Account). API-key-only setups have no Platform balance to show.
Install
This repository is a Cordis bundle. The bundle patch inserts one Host row; the dsh.client declaration in
package.json publishes client.js to the browser.
From a local clone (recommended)
git clone https://github.com/Qliphoth11/sidebar-balance.git
Then ask the Harness agent to install the bundle directory, absolute path:
Install the bundle at
/absolute/path/to/sidebar-balance
The agent runs the plugin manager's install_bundle with that path as the target. Installation links the
checkout, so later edits apply after a page reload.
Directly from GitHub
If your Harness accepts a pnpm spec for bundles, ask the agent to install:
github:Qliphoth11/sidebar-balance
Otherwise use the clone + local path route above.
Uninstall
Ask the agent to remove the dsh-sidebar-balance bundle, or disable Sidebar Balance in
Settings → Plugins.
How it works
| File | Role |
|---|---|
cordis.patch.yml | Inserts the sidebar-balance Loader row. |
index.js | Host half: an empty apply(). Its only job is to give the bundle a Loader row whose dsh.client declaration publishes the browser module. |
client.js | Client half: declares inject: ['slots', 'locale', 'remote', 'remote.account'], registers one entry in sidebar.footer.action, keeps the chip state in a tiny external store exposed to React through the slot's hooks injection, and mirrors the account snapshot stream via ctx.remote.$stream. |
locale/*.json | Plugin-manager display metadata (title/description) for en and zh. |
icon.svg | Original plugin artwork. |
Styling uses only --dsw-* theme tokens, so the pill follows the host palette and light/dark themes.
Visible text is routed through the Client locale service (sidebar.balance namespace, en + zh).
Compatibility and limits
- The plugin relies on the shipped slot id
sidebar.footer.actionand theaccountRemote namespace (getBalance,watch). A Harness release that renames or removes them needs a plugin update. - The collapsed sidebar (56 px rail) allocates a single 36 px icon cell at the foot, so the balance moves to the composer status row there instead; both places share one store, so a refresh in either updates both.
- The amount is the DeepSeek Platform account wallet (recharge funds plus separate bonus wallets). It is not a spend counter for third-party providers or API keys.
- No telemetry, no network requests of its own: every read goes through the Host account service.
- Not affiliated with or endorsed by DeepSeek.
Development
npm run check # node --check on both halves
A client plugin hot-reloads while the Web dev watcher (pnpm run dev:web) runs from a source checkout;
on an installed app, reload the page after changing client.js.
License
MIT © 2026 Qliphoth11
Comments
Loading…