Introduction¶
DeepSeek Harness (DSH) uses a plugin-based architecture to make feature extension convenient. In development or daily use, monitoring API balance consumption is essential. The dsh-balance plugin embeds a balance component below the conversation interface, solving the problem of “running out of balance without noticing”.
Plugin Positioning¶
This is a client-side plugin maintained by Shawnxxboxx and open-sourced under the MIT license. Its core role is to display the current balance of the DeepSeek account between the message area and the input box in the DSH web interface.
Core Features¶
- UI Embedding: Renders a compact balance bar in the
conversation.input.dockslot, for example💰 CNY 19.63. - Automatic Refresh: Refreshes the balance every 15 seconds by polling the host route
/dsh-balance/balance. - Interactive Details: Hover the mouse to view the breakdown of “gift/top-up” amounts.
- Fault Tolerance: Displays a fallback message when the balance is unavailable, without interrupting the conversation.
- Security Design: Zero dependencies, no build scripts, and the API key is retained only on the host side, never sent to the browser.
Installation and Enablement¶
Prerequisites: DSH is installed and dsh web can run; Node.js ≥ 20; pnpm ≥ 10.
- Run the installation command:
dsh plugin --profile web add dsh-balance-dock
- Restart
dsh web(the plugin includes host-side logic and requires a restart to mount it). - Hard refresh the browser (Cmd/Ctrl+Shift+R).
Typical Usage¶
- Search for
dsh-balance-dockin the plugin list. - Confirm that
DEEPSEEK_API_KEYhas been configured on the model settings page.
Notes¶
- Naming Difference: The npm package name is
dsh-balance-dock, while the GitHub repository name isdsh-balance; they refer to the same plugin. - pnpm 11 Policy: If installation of the new version fails or the old version is installed, add a
minimumReleaseAgeExcludepolicy for the package to thepnpm-workspace.yamlfile in the profile. - Hot Update Difference: Host-side changes require restarting
dsh web; client-side changes take effect after a page refresh.
Summary¶
This plugin implements balance monitoring with a lightweight design, making it suitable for developers who need to precisely manage API usage. For more details, visit GitHub or the Skill Hub catalog.