Introduction

DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture. During Web GUI development and debugging, developers need a clear view of token consumption. The built-in Wallet plugin records a local ledger, but it lacks a visual interface. The dsh-token-stats plugin is designed to solve this problem by directly reading the existing 365-day local ledger from the Wallet plugin and providing a visualized token statistics panel in the UI.

Plugin Positioning

This is a dashboard plugin that runs on the DeepSeek Harness Web GUI client. It does not perform additional data collection and relies entirely on the data files generated by the Wallet plugin. The plugin itself is a pure frontend display component and does not involve complex backend logic.

Core Features

  • Sidebar Entry: Registers a “Token Statistics” entry in the left sidebar. Clicking it displays the dashboard in a full-width mode in the center column, compatible with both expanded and collapsed sidebar states.
  • Summary Cards: Displays token usage and costs (if pricing data is available) across four dimensions: today, this week, this month, and cumulative.
  • Stacked Bar Chart: Rendered with pure SVG and colored by model. Supports switching between daily (30 days), weekly (12 weeks), and monthly (12 months) views. Hover with the mouse to view details for each model.
  • Model Details Table: Lists input tokens, output tokens, cache-read tokens, total quantity, and percentage bars for each model, and sorts by total quantity.
  • Multilingual Support: Built-in English, Vietnamese, Chinese, and Japanese. The dashboard header provides a language switcher, and the selection is remembered locally.
  • Auto-Refresh: Automatically refreshes data every 30 seconds while the panel is open, and provides a manual refresh button.
  • Zero Dependencies: No build step. The main program is a pure ESM Node module, and the client is a pre-bundled CJS module.

Installation and Enabling

The installation command is as follows:

dsh plugin --profile web add dsh-token-stats

After installation, restart dsh web (or use the one-click restart feature from the market), and you can see the Token Statistics entry in the left sidebar.

Usage

  1. Click Token Statistics in the left sidebar to open the dashboard.
  2. Click the language icon in the dashboard header and select the desired language (supports English, Vietnamese, Chinese, and Japanese).
  3. Review the summary cards at the top to understand overall consumption.
  4. Use the tabs below the chart to switch between daily/weekly/monthly views, or view the model details table.

Notes and Use Cases

  • Version Requirement: The plugin depends on DSH’s sidebar DOM structure and requires DSH version at least 0.1.1-rc.2.
  • Read-Only Mode: The plugin only reads data from the Wallet plugin and does not write anything to the ledger.
  • Data Display Limitation: For models without pricing information, the panel only displays token counts and does not display cost amounts.

Conclusion

dsh-token-stats is a lightweight token statistics tool, suitable for developers who need to quickly view usage and cost distribution in the DeepSeek Harness Web interface. Its data source is fully connected with the Wallet plugin, avoiding the overhead of duplicate data collection.