dsh-usage-panel: DeepSeek Harness Local Token Usage Dashboard

Preface

When running Agents, long conversations, and tool calls in DeepSeek Harness (DSH), tokens are scattered across a large volume of session logs. The host interface focuses on conversation and tasks, and typically does not centrally display “how much was used in the last 30 days, cache hit rates, model distribution, output speed, or whether Time to First Token (TTFT) has slowed down” on a single page. Relying solely on visual inspection of sessions or external scripts makes it difficult to unify metrics, nor does it allow for effective daily or hourly comparisons.

Below is an introduction to the community plugin dsh-usage-panel (Maintainer: chunrichi, Category: Client). It adds an entry to the Harness sidebar, utilizing a full-page dashboard to perform real-time aggregation on local session logs. It does not connect to the internet or read pricing and account balances, making it suitable for developers who need to locally monitor usage and performance trends.

What is this?

dsh-usage-panel is a local-first token usage dashboard plugin for DSH. It adds a dashboard icon next to the “Plugins” entry in the sidebar. The main panel is driven by a global time scope (Today / 7 Days / 30 Days / 90 Days / All, plus a date picker for any day in the month calendar) that affects all sections below it. All figures are derived from the usage in local assistant/message events and Host-side scans and snapshots of session logs; no network requests are made.

Repository: https://github.com/chunrichi/dsh-usage-panel
Directory Page: https://www.skillhub.cn/plugins/chunrichi/dsh-usage-panel
Current package version is 1.1.0, MIT License. Environment requirements: DeepSeek Harness Desktop (Web UI profile) and Node.js >= 20.

Core Features

All dashboard sections update collectively when switching the time scope. The scope is retained even if you switch away from the panel and return.

Section Description
Time Scope Top sticky bar: segmented selection for Today / 7 / 30 / 90 Days / All. “Date” opens a custom month calendar to select any day. Dates with usage are marked with a dot. The selectable range is limited by the snapshot window (default: last 182 days).
Readouts Five cards that change with the scope: Range mode includes Tokens in the last N days, comparison with the previous N days, peak single day, weighted output speed, and cache hit rate; Single Day mode shows metrics for the day and comparison with the previous day; All mode shows total history, average per active day, peak, and all-time speed/hit rate.
Token Composition Stacked proportions of Input (cache miss), Cache Hit, Cache Write, and Output, along with itemized counts and percentages.
Model Distribution Model shares in the current scope sorted by Token count in descending order (including provider labels); range and single-day modes also include a daily model table.
Trends & Performance Dual-axis combo chart: Left axis shows Token bars (by local day for ranges/all, by hour for single day); Right axis shows “Speed” or “Time to First Token” median lines for each provider. Includes shared tooltip and keyboard arrow navigation for day-by-day/hour-by-hour browsing.
Activity Heatmap Daily grid squares for the last 119 days; areas outside the current range are dimmed. Clicking a square switches the entire dashboard to that day.

Data calculation points (consistent with README):

  • One reading corresponds to the data.usage of an assistant/message; prompt = input + cacheRead + cacheWrite, tokens = prompt + output; cacheHitRate = cacheRead / prompt.
  • Output speed is consistent with the tok/s in the Chat panel’s detailed mode; Time to First Token is “time of first token − step/start”. The combo chart performance line takes the median by local date × hour × provider.
  • The footer displays the update time, number of scanned sessions, and number of unreadable sessions. Empty data, read failures, and sync failures have distinct status text.

The Host side can control the lookback window for daily[], combo charts, heatmaps, and the calendar via historyDays (default 182, range 7–365); maxSessions (default 800, range 1–5000) limits the maximum number of sessions to scan (taking the latest by createdAt).

Installation & Activation

The repository has committed build artifacts, so installing from GitHub does not require local building.

Method 1: DSH CLI (Recommended)

Execute in any directory (replace web with your profile name):

dsh plugin --profile web add github:chunrichi/dsh-usage-panel

To pin a version, add a ref, for example:

dsh plugin --profile web add github:chunrichi/dsh-usage-panel#v1.1.0

When switching versions, remove first and then add again:

dsh plugin --profile web remove dsh-usage-panel

Method 2: Harness Plugin Management Page or Agent

For the desktop profile, installation within the app is recommended for hot-reloading:

plugin_manager action=install_bundle target=github:chunrichi/dsh-usage-panel

Notes:

  • The CLI installs via pnpm under $DSH_HOME/profiles/<profile> and writes dsh-usage-panel to the profile’s dsh.profile.bundles, taking effect on the next startup.
  • desktop is a reserved profile for the Desktop app: if using the CLI, you must completely quit the Desktop app and use the Desktop’s bundled CLI (macOS: DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh); a standard npm-installed dsh will be rejected when operating on the desktop profile. In-app installation applies changes immediately.
  • After successful installation, a dashboard icon will appear in the sidebar panel list; if the interface does not update, simply refresh the window.

For local code modification (README Method 2): Pass the plugin directory as an absolute path to install_bundle, use link: for dependencies, re-run install_bundle after modifying the Host, and refresh the window for client changes. This article does not cover the clone steps.

Optional Host configuration example (written to the bundle patch’s config):

- insert:
    - id: usage-panel
      name: dsh-usage-panel
      config:
        historyDays: 182
        maxSessions: 800

Typical Usage

  1. Install the plugin for the target profile using the commands above and start (or refresh) the Harness.
  2. Click the dashboard entry next to “Plugins” in the sidebar to open the usage panel as a full page in the center column.
  3. Use the top scope bar to select a range like “Last 30 Days” and check if the readouts, token composition, and model distribution meet your expectations.
  4. In “Trends & Performance,” toggle between “Speed / First Token,” and use the tooltip to cross-reference token counts, call counts, and provider samples for a specific day.
  5. Click a day on the heatmap, or click “Date” to select a day in the month calendar, to enter the single-day view and see hourly bars/lines and peak periods; for non-today single-day views, “Back to Today” is available in the title bar or calendar footer.
  6. If longer history or more sessions are needed, adjust historyDays / maxSessions in the Host config and reload the bundle via DSH methods.

Clicking other sidebar panels again returns you to the original conversation; the dashboard scope state is preserved at the module level, so re-entering the dashboard will not lose the current range or selected date.

Use Cases & Notes

Who is it for: Developers who run Agents locally on DSH long-term and wish to observe total tokens, cache structure, model distribution, and provider speed/TTFT median trends using unified metrics. It emphasizes privacy and offline aggregation for scenarios that do not require cloud billing integration.

Important Notes:

  • The plugin reads local session logs with the permissions of the current DSH process; please review the repository source code and MIT license before installation to ensure it meets your security and compliance requirements.
  • All statistics reflect only locally persisted sessions; if maxSessions truncates results, the footer will indicate this, and earlier sessions will not enter the snapshot.
  • If older logs lack durable stream timestamps, they may only participate in speed statistics but not Time to First Token, and the corresponding line chart may show “No Samples”.
  • Community directories like SkillHub are independent sites and have no official affiliation with DeepSeek or High-Flyer; the plugin is maintained by the community, and stars/versions are subject to the repository and directory pages.

Conclusion

dsh-usage-panel consolidates token and performance signals from DSH sessions into a single page: a global time scope, composition and model distribution, a heatmap, and a combo chart where token bars and provider performance lines share the same space. Everything is aggregated locally without touching account or pricing APIs. If you are already using Harness Desktop and want to quantify your usage and response performance, you can install it via the README and try opening the dashboard from the sidebar.

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

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

Xiaoye