In the development or use of DSH Web GUI, monitoring DeepSeek’s balance and Token consumption is a common requirement. Traditional numeric displays often lack intuitive urgency or fun. Below is an introduction to a plugin that visualizes the balance.
Plugin Introduction¶
dshp-balance-hp is a balance display plugin for DSH Web GUI, maintained by HomoLand. It converts DeepSeek’s balance into a game-style “HP bar,” visually displaying the currently available quota and consumption.
Features Overview¶
The plugin mainly provides the following capabilities:
- Gamified HP bar: Displays DeepSeek’s balance as an HP bar. The current balance is the HP, with the upper limit being “balance + today’s consumption.”
- Multiple skins: Built-in 5 skin styles, switchable in the settings interface:
- Default Minimal: A progress bar following the theme’s status color.
- Minecraft: 10 pixelated red hearts.
- Diablo: Gold coin health orb + dark gold thin bar.
- Overwatch: Fully segmented health bar.
- Sanguosha: Taiji semicircle magatama.
- Auto refresh: Automatically refreshes the balance every 5 minutes.
- Consumption statistics: Balance changes are automatically accumulated into today’s consumption (top-ups are not counted).
- Local persistence: All configurations are persisted to the
.dsh-balance-historyfile in the DSH workspace. - Manual sync: Provides a settings interface, supporting clicking the ✎ in the interface to sync the platform value.
Installation and Activation¶
Install using the official command:
dsh plugin --profile web add dshp-balance-hp
After installation, the plugin will automatically depend on @deepseek-ai/dsh-typert-protocol, and configuration and state will be automatically persisted to .dsh-balance-history. It takes effect in the Web interface without additional configuration.
Usage¶
After enabling the plugin, go to the settings interface and find the “Balance HP Bar” option:
- Browse and select different skin styles in the settings.
- If the balance display is delayed or needs manual calibration, click the ✎ sync platform value button in the interface to update today’s consumption.
- The plugin renders the HP bar in real time based on the current balance and accumulated consumption.
Data and Security¶
- Data flow: The plugin only performs read-only balance queries (
GET https://api.deepseek.com/user/balance); keys are resolved by the host and are not written to disk. Locally, only the.dsh-balance-historyfile is written. - Network requests: Apart from balance queries, no other outbound network requests are made.
- Dependencies: Depends on
@deepseek-ai/dsh-typert-protocol.
Notes¶
- Upper limit calculation: Current upper limit = balance + today’s consumption (estimate). When the balance changes, it is automatically accumulated into today’s consumption.
- Top-up logic: According to the plugin TODO, top-ups cause the balance to jump, thereby synchronously raising the upper limit. This means that after top-up, the HP ratio may be inconsistent with the consumption figures; note the potential for optimization in handling top-up events (not fully implemented in the current version).
- License: The plugin follows the MIT License.