Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture, so developers often need to monitor their account balance and the cost of the current session in real time during use. dsh-balance-hud aims to provide an intuitive monitoring interface for this purpose. It uses a HUD (Head-Up Display) to persistently show key financial information in the bottom-right corner of the Web GUI.

Plugin Overview

dsh-balance-hud is a HUD component located in the bottom-right corner of the DSH Web GUI. It was developed by LinHyu-2006 and is provided under the MIT license. The main purpose of this plugin is to display the DeepSeek account balance (including top-up and gifted credits) as well as the actual and estimated cost of the current session, and it provides budget and peak-time warning mechanisms.

Core Features

  1. Persistent Display: Always shows the HUD in the bottom-right corner of the DSH interface.
  2. Balance and Spending:
    • Displays the total account balance (top-up balance + gifted balance).
    • Displays the cost of the current session, including an estimated value based on the official price list and an actual value based on the balance reduction.
  3. Budget Management: Supports configuring session budgets and daily budgets, and issues reminders when thresholds are approached.
  4. Peak-Time Warnings: Supports issuing peak/off-peak transition warnings in advance based on a configured lead time (5–30 minutes).
  5. Price Synchronization: Provides optional official price synchronization to ensure the accuracy of estimated data.

Installation and Activation

The installation process is handled by the script included with the plugin, so there is no need to manually assemble commands.

Windows:

tools\install.cmd

macOS / Linux:

sh tools/install.sh

The installation script automatically finds and uses the Node runtime built into DSH. If Node is not available on the machine, it will also display a prompt.

After installation, you must restart DSH for the plugin to take effect. DSH does not support hot-reloading plugins, so refreshing the page alone cannot activate a newly installed plugin.

Configuration and Usage

  1. Configuration Parameters:
    Go to DSH’s Settings -> General -> Balance and Spending HUD. Here, you can configure parameters such as the pricing model (for example, deepseek-flash), the automatic price synchronization interval, foreground and background refresh intervals, budget thresholds, and the lead time for peak-time reminders.
  2. Testing the Plugin:
    After installation or before modifying the configuration, you can run the following command to perform an offline test:
    node tools/smoke.mjs

Technical Details and Notes

  1. Security and Privacy:
    • The plugin does not access API keys.
    • Before the “price synchronization” feature is enabled, the plugin does not initiate any network requests.
  2. Data Management:
    • Session records are managed by Session ID. Refreshing the page or switching sessions does not lose or overwrite records from other sessions.
    • External top-ups or the expiration rollback of gifted credits does not affect the spending statistics for the current session.
  3. System Requirements:
    • Supported DSH version range: >=0.1.7-rc.1 <0.2.0-0 or >=0.2.0-rc.1 <0.3.0-0.

Conclusion

dsh-balance-hud provides DSH users with fine-grained cost control and budget management capabilities. Through a persistent HUD, developers can intuitively monitor resource consumption. To learn more or view the source code, you can visit its community directory or GitHub repository.