In the DeepSeek Harness (DSH) ecosystem, resource monitoring is the foundation of daily operations. The core philosophy of DSH is “everything is a plugin,” and dsh-usage-indicator is a tool designed specifically for this kind of requirement. The plugin displays real-time context headroom, account balance, and the estimated next compaction round at the top of the sidebar. Data stays fully local, and the API Key never leaves the machine.

Core Features

The plugin provides the following main feedback through the sidebar:

  • Context Usage / Model Window: Displays a progress bar showing current context usage. The progress bar turns yellow when approaching the compaction threshold and turns red when the threshold is reached.
  • Account Balance: Displays a progress bar for the account balance. When the balance falls below the configured warning threshold, the entire progress bar turns red.
  • Compaction Countdown: Uses the EMA (Exponential Moving Average) algorithm to estimate “compaction in N rounds.” If there is insufficient historical data, the status is displayed as “Evaluating.”
  • View Switching: When the sidebar is expanded, detailed cards are shown; when collapsed, it automatically switches to a compact ring view plus a balance status dot.
  • Hot-Reload Configuration: Adjust the full-bar limit and warning threshold through the Web settings panel. Once the configuration is written to settings.yaml, it takes effect immediately without restarting.

Installation and Enablement

Before installation, ensure that DSH and pnpm are already installed (if pnpm is missing, run npm install -g pnpm first).

  1. Download the Release package for the corresponding version.
  2. Run the installation command:
dsh plugin --profile web add C:\path\to\dsh-usage-indicator-<version>.tgz

After installation, restart dsh web to apply the changes.

Configuration and Usage

  • Balance Query: By default, the plugin reads the environment variable DEEPSEEK_API_KEY to retrieve balance information.
  • Web Settings Panel: In the Web interface’s “API Usage Indicator” option, you can modify parameters such as the full-bar limit (default 100), the warning threshold (default 20), and the refresh interval.
  • Consistency Requirement: The context compaction threshold (thresholdRatio) defaults to 0.8 and must remain consistent with dsh-compaction-basic.

Notes

  • Privacy and Security: Data stays fully local, and the API Key never leaves the machine.
  • Prerequisites: DSH and pnpm must be installed.
  • Compatibility: It must remain consistent with dsh-compaction-basic.

Summary

dsh-usage-indicator consolidates dispersed context and balance information into a single view, helping users keep track of resource status in real time during agent development or daily interaction. For more details, refer to the GitHub repository or the plugin catalog.