dsh-token-usage: DeepSeek Harness Token Usage Dashboard

DeepSeek Harness (DSH) provides a plugin extension mechanism. When developers use models for conversations or task execution, they usually need to track token consumption and call frequency. The dsh-token-usage plugin aggregates session logs and provides a visual usage statistics interface on the Settings page, solving the tedious problem of manually checking logs and calculating statistics.

Core Functionality

The plugin provides the following statistics views on the Settings page:

  • Metric Cards: Display overview data for overall usage.
  • Activity Heatmap: Visualize active call time periods.
  • Daily Trend: Includes a stacked bar chart of the Top 5 models and a line chart of cache hit rate.
  • Model Share Donut Chart: Display the usage proportion distribution of each model.
  • Settings Page Usage Statistics UI: Mounts the above views into the DSH Settings menu.

Installation and Enabling

Command-line installation:

dsh plugin --profile <profile> add https://github.com/felixzhang-glitch/dsh-token-usage

Local development installation:
Install using the absolute path to the local repository (for example, /Users/name/dsh-token-usage). A local directory installation is a live link; after modifying the code, restart DSH for the changes to take effect.

UI operation:
1. Open the DSH sidebar “Plugins” → “Add Plugin”.
2. Enter the GitHub repository URL or local absolute path.
3. Restart DSH after installation is complete.

Typical Usage

  1. Confirm data source: Ensure that the data returned by model requests includes the usage field; otherwise, the statistics will be empty.
  2. Enable and refresh: Confirm that the package is enabled on the Plugins page, then perform a hard browser refresh (or restart DSH).
  3. Log troubleshooting: If the page remains loading or entries are empty, check the diagnostic logs at ~/.dsh/profiles/<profile>/.plugin-manager/logs.

Notes

  • NPM package distinction: This plugin is not published to npm. Namesake packages on npm (such as Tastelessor/dsh-usage-stats) are third-party metered packages; installing by entering the bare package name in the dialog box does not install this plugin.
  • Version requirements: It is recommended to use this in DSH 0.1.7-rc.2 (Desktop) or 0.1.6-alpha.2 (Web) environments.
  • Activation method: DSH must be restarted after installation for the plugin to take effect (Desktop profiles do not support live reload).
羽毛球分组比赛记分
小程序二维码

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

Xiaoye