Preface

In daily use of DSH, commits, token usage, and estimated costs over the past 90 days may be scattered across different sources. Looking them up once is easy, but long-term observation is not convenient enough. dsh-heatmap is a DSH plugin that keeps such activity information persistently in the DSH Web GUI sidebar, making it easy to view 90-day trends and daily details.

The DSH ecosystem emphasizes “everything is a plugin”; the community directory is an independent site with no official affiliation to DeepSeek / 幻方. Below we introduce what dsh-heatmap is, what it can do, and how to install and configure it.

What This Is

dsh-heatmap is a DSH Web GUI sidebar activity heatmap plugin maintained by 283Gawin, licensed under MIT. The repository is named dsh-heatmap, and the npm package is @linxin666/dsh-client-ui-activity-heatmap.

The problem it solves: persistently displaying a GitHub-style activity heatmap for the past 90 days in the DSH Web GUI, with the ability to switch between commit count, token usage, and estimated cost. Below the heatmap, it also provides today’s total tokens across all sessions, cache hit rate, today’s cost, and today’s cost breakdown by model.

Core Features

The features listed below are all from verified information:

  • Persistently displays a GitHub-style activity heatmap for the past 90 days in the DSH Web GUI sidebar.
  • Supports switching between three dimensions: commit count, token usage, and estimated cost; the selection is saved in browser localStorage.
  • Hovering over a day shows that day’s commit count, token usage, and cost details.
  • Displays today’s total tokens across all sessions, cache hit rate, and today’s cost.
  • Displays the cumulative token, commit, and cost totals for the 90-day window, as well as today’s cost breakdown by model.
  • The panel is persistently positioned at the bottom of the sidebar, supports collapsing, state persistence, and automatic reset after React re-rendering.
  • The settings page plugin section provides configuration options: theme, enabled, includeMerges, usdCnyRate, and priceOverrides.
  • Data is read by the host process from session durable logs and git log via the official SDK, provided through GET /activity-heatmap/stats with a TTL cache of 60 seconds.
  • Includes a built-in model pricing table, supporting price overrides and model id prefix matching.

Installation and Enablement

Start with the simplest installation: install from the npm package, then restart dsh web.

dsh plugin --profile web add @linxin666/dsh-client-ui-activity-heatmap

After restarting, the heatmap panel appears in the sidebar:

dsh web

If you need a local link installation, you must first build the artifacts. A link installation requires the built lib/ directory.

git clone https://github.com/283Gawin/dsh-heatmap
cd dsh-heatmap
pnpm install && pnpm build # link installation requires built artifacts (lib/)
dsh plugin --profile web add link:$PWD

After the steps above, restart dsh web, and the heatmap panel will appear in the sidebar.

Settings Page Exposure

To expose the settings page, add the namespace activity-heatmap to the WEB_SETTINGS_NAMESPACES allowlist of dsh-host-apiproxy.

dsh-host-apiproxy
WEB_SETTINGS_NAMESPACES
activity-heatmap

Note: This modification will be overwritten after upgrading dsh, so you will need to re-apply the patch. After the change, restart dsh web for it to take effect.

Typical Usage and Configuration

After the plugin is installed, configure it in the “Plugins → Activity Heatmap” card on the settings page. Changes take effect after restarting dsh web.

Verified configuration options include:

Configuration Option Verified Default or Behavior Description
theme No specific default given Theme configuration option; green is used in the example
enabled No specific default given Plugin configuration option
includeMerges false By default, commit count does not include merge commits
usdCnyRate 0 0 means CNY is not displayed
priceOverrides Supports model id prefix matching Used for model pricing overrides

The plugin row config can contain id, name, theme, usdCnyRate, and priceOverrides. Here is a simple example, where the actual override content in priceOverrides should be filled in according to the actual models and pricing:

- insert:
    - id: ui-activity-heatmap
      name: '@linxin666/dsh-client-ui-activity-heatmap'
      config:
        theme: green
        usdCnyRate: 7.2
        priceOverrides: {}

Pricing and Model Overrides

dsh-heatmap includes a built-in model pricing table and supports price overrides. Model id supports prefix matching; priceOverrides also supports prefix matching.

Models not listed in the table default to pricing at 0.27 / 0.07 / 1.10, which can be overridden using priceOverrides.

usdCnyRate defaults to 0. 0 means CNY is not displayed.

Applicable Scenarios and Notes

Suitable for users who want to keep the past 90 days of DSH commits, token usage, and estimated costs persistently in the Web GUI sidebar.

Please note the following before use:

  • includeMerges defaults to false, meaning commit count does not include merge commits by default.
  • usdCnyRate defaults to 0, and 0 means CNY is not displayed.
  • Settings page exposure depends on the WEB_SETTINGS_NAMESPACES allowlist of dsh-host-apiproxy; this modification will be overwritten after upgrading dsh, requiring a re-applied patch.
  • The plugin runs with the permissions of the current dsh process; inspect the source code and license before installation.
  • The license is MIT.
  • peerDependencies require @deepseek-ai/cordis ^4.0.1, multiple @deepseek-ai/dsh-client-* packages, and React ^18.2.0.
  • Directory page: https://www.skillhub.cn/plugins/283Gawin/dsh-heatmap
  • GitHub: https://github.com/283Gawin/dsh-heatmap