dsh-activity-heatmap: Visualize local session logs as heatmaps

Introduction

DSH’s philosophy is “Everything is a plugin,” and there are increasingly more plugins in the community directory. During daily use of DSH for sessions, the accumulated session logs are basically never looked back at. To know exactly how many turns you wrote, how many tools you called, and how much active time you spent in a month, you generally have to sift through logs or do manual statistics. dsh-activity-heatmap is made for this: it aggregates usage from local session logs on a daily basis and presents it using a heatmap similar to GitHub’s contribution graph. It also supports switching shapes, color schemes, and calendar layouts.

This plugin is maintained by 4uthen7 (Gao Ben) and is categorized as “Fun Outfits” in the community directory. Essentially, it is a UI display plugin: it does not modify workflows, it simply draws existing session data. Below is an introduction to its capabilities, installation methods, and points to note.

What is it

One-sentence positioning: Adds a GitHub-style activity heatmap to DeepSeek Harness; data is completely sourced from local session logs.

The metrics it tracks include message count, tool calls, turns, token count, active minutes, and session count. It draws one square per day and supports Square, Rounded, Circle, Hexagon, Diamond, Star, and custom SVG paths. Default behavior requires no internet connection; the Host side only returns aggregated counts.

Core Features

  1. Multi-metric daily counting: Messages are counted from user/message and assistant/message events; tool calls from tool/call; turns from turn/start; tokens are the sum of input and output reported by assistant messages; active time is the count of distinct minutes that generated events that day; sessions are counted based on the createdAt header of newly created sessions.

  2. Multiple appearances: Shapes can be selected from Square, Rounded, Circle, Hexagon, Diamond, Star, or a custom SVG path (view box 0 0 100 100). Color palettes include GitHub, Ocean, Violet, Sunset, Mono, and Custom, with four levels of intensity and a theme color for empty dates.

  3. Multiple calendar layouts: Choose between Year (53 weeks), Months (12 mini calendars), or Rolling (13/26/52 weeks).

  4. Multiple display locations: Sidebar bottom widget (7–52 weeks, default 22 weeks), Activity row in sidebar navigation, optional strip below the Composer (default off), and the full settings page at Settings → Activity.

  5. Privacy boundaries: The Host side registers only a precise local loopback route /plugin-api/activity-heatmap/stats and returns only the fields date, sessions, turns, messages, tool calls, tokens, events, and active minutes. It does not include prompts, reply content, file paths, titles, or tool parameters. The plugin itself makes no outbound requests.

Installation and Enablement

The plugin supports three installation methods; the first two are equivalent, differing only in whether the Agent does the work or you do it yourself.

Method 1: Let the Agent install in the session. Simply paste the following text into the chat and send it:

Install the plugin at https://github.com/4uthen7/dsh-activity-heatmap into DeepSeek Harness.
Verify that Settings → Activity opens, then tell me what you changed.

The Agent will invoke the plugin_manager tool to complete the installation. The corresponding tool call format is:

plugin_manager { action: "install_bundle", target: "https://github.com/4uthen7/dsh-activity-heatmap" }

Method 2: Install manually from the Plugins page.
1. Open the Plugins in the sidebar.
2. Select Add plugin (or Install a third-party plugin within the arrow).
3. Paste https://github.com/4uthen7/dsh-activity-heatmap and confirm.
4. If installed but in a disabled state, manually enable that bundle.

Method 3: Install from a local working copy, suitable for verifying code changes directly:

plugin_manager { action: "install_bundle", target: "/absolute/path/to/dsh-activity-heatmap" }

Before installation, ensure the environment meets two conditions: using DeepSeek Harness with a Web UI (Desktop or web profile), and the DSH version providing the sessionPersistence, sessionQuery, and webServer services simultaneously. The plugin implements fallbacks for missing conditions: if persistence is missing, it only counts the session creation date. webServer is the only hard Host dependency declared by the plugin; without it, the plugin remains inactive.

Configuration Options

All options are saved in the browser’s localStorage under the key dsh-activity-heatmap/settings/v1, and changes take effect immediately. The full path to the settings page is Settings → Activity → Appearance (named “Activity” in the Chinese interface).

Option Possible Values Default
Measure Messages / Active time / Tool calls / Turns / Sessions / Tokens Messages
Calendar Year (53 weeks) / Months (12 mini calendars) / Rolling (13/26/52 weeks) Year
Shape Square / Rounded / Circle / Hexagon / Diamond / Star / Custom SVG path Square
Cell size 5–20 px 8 px
Spacing 1–8 px 2 px
Palette GitHub / Ocean / Violet / Sunset / Mono / Custom GitHub
Colors 4 levels of intensity + theme color empty dates GitHub Green
Week starts on Sunday / Monday Monday
Intensity Linear / Log / Rank (percentile) Linear
Labels Month labels, week labels, legend On
Sidebar widget Show/Hide, 7–52 weeks On, 22 weeks
Composer strip Show/Hide Off

For the custom shape option, simply fill in the SVG path, for example, M50 4 L96 92 L4 92 Z for a triangle. If the path is invalid, the plugin will ignore it and revert to a square without error.

Applicable Scenarios and Notes

Suitable for those who want to add visualization to DSH without the hassle of scripting. The statistical metrics are for usage browsing, not for billing purposes: session logs are read once per revision in the Host memory and cached. Cloned or seeded sessions will inherit history, causing earlier dates to be counted multiple times.

There are a few points to pay attention to:

  1. Check source code and license before installation. This is a third-party plugin; the current version is 1.1.0 with an MIT license. Installation implies the DSH process will load its Host module. It is recommended to read index.js, client.js, and cordis.patch.yml first to ensure the patch only adds necessary lines and does not carry out other operations.

  2. Run with current DSH process permissions. The permissions granted to the Host-side module depend on the DSH process itself. The plugin only declares webServer as a Host dependency; counting uses the read-only sessionPersistence / sessionQuery, but it is still recommended to use it in a trusted environment.

  3. Uninstall method: Plugins → Bundle page → Remove. Settings saved in the browser will persist until you clear site data.

  4. Reload rules after code changes: After editing client.js, simply refresh the page; after editing index.js, you need to close and reopen the corresponding line (or restart) for the Host module to be re-imported.

Conclusion

The value of dsh-activity-heatmap is clear: it introduces no new data sources, changes no usage habits, and simply draws existing local session logs into a visible usage heatmap while maintaining a clear privacy boundary. If you just want to add a statistical decoration to the sidebar that does not involve any session content, you can try it first. To confirm behavior, directly read the source code in the repository.

Directory page: https://www.skillhub.cn/plugins/4uthen7/dsh-activity-heatmap
GitHub: https://github.com/4uthen7/dsh-activity-heatmap

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

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

Xiaoye