dsh-usage-meter: Persistent Usage Gauge in the DeepSeek Harness Sidebar

DeepSeek Harness (DSH) adopts a plugin-based architecture. When debugging or running long-lasting sessions, developers often need to frequently check context window utilization and account balance. Manually opening the settings page can interrupt the workflow. This section introduces a plugin that keeps a resident meter at the bottom of the DSH sidebar, providing a persistent usage and balance display.

kxdyh/dsh-usage-meter is a client plugin maintained by developer kxdyh. By reading official API data, it provides a resident usage and balance meter at the bottom of the DSH sidebar, allowing developers to track context utilization and remaining quota in real time without opening the settings page.

Core Features

  1. Persistent Sidebar Display: The meter is located at the bottom of the sidebar and supports automatic adaptation to dark/light themes.
  2. Balance Reading: It directly reads the balance from the official account API with precision to seven decimal places, without rounding or estimation.
  3. Context Tracking: It displays context window utilization, used token count, and maximum token count in real time. The progress bar turns amber at 70% utilization and red at 90%.
  4. Zero Extra Requests: It does not poll the model or send extra requests; it only reuses the host’s existing session data.
  5. Collapsed State Support: When the sidebar collapses into a 56px rail, the meter automatically becomes a compact ring indicator.

Installation and Enablement

Install it using the dsh CLI:

dsh plugin --profile <你的 profile> add github:kxdyh/dsh-usage-meter

No restart is required after installation; the meter appears immediately at the bottom of the sidebar.

Typical Usage

  1. After installation, the meter automatically appears at the bottom of the sidebar, showing context utilization and balance by default.
  2. Click the meter area to expand the details and view token details for input/output/cache reads/cache writes.
  3. When expanded, click the refresh button (↻) to immediately update the balance and usage; normally, it updates automatically every 60 seconds.
  4. To view the balance, you need to sign in to a DeepSeek account in DSH Settings.

Applicable Scenarios and Notes

This plugin depends on the dsh Desktop or Web version. To view the balance, you must first sign in to a DeepSeek account in DSH Settings. The plugin only reads the balance; it does not initiate login or upload credentials.

  • Token Data: Token data is displayed only after the session generates model usage.
  • Cost Display: Costs are not displayed, and no cost estimation is performed.
  • Sidebar Collapse: When the sidebar is collapsed, the meter switches to a ring indicator; hover over it to view the value.

By providing a persistent meter and accurately reading official data, this plugin addresses developers’ need to frequently check usage and balance, making it suitable for developers who need fine-grained control over their context window and budget.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye