Introduction¶
When running agent tasks with DeepSeek Harness (dsh), metrics such as steps, turns, throughput, cache hits, and context usage are all crowded into the web UI’s original stats row. While the information is present, it is all presented as flat text. If you are running a long task and want a quick answer like “What is the current throughput, how much context is left, and what is the cache efficiency?”, you have to read the numbers one by one.
dsh-stats-hud solves this reading issue: it renders session statistics into a fixed vertical panel on the far right of the page, utilizing level bars, speedometers, and rolling counters. It does not disturb the original stats row. Below is an introduction to its features, installation method, and how it works.
What is this¶
dsh-stats-hud is maintained by lauytgary, licensed under MIT, and categorized as a client-side (web) plugin. One-sentence positioning: transforms the DSH session stats row into game-style level bars, speedometers, and rolling token counters, displayed vertically on the far right of the dsh web UI. It is a pure browser-side plugin that does not modify host code, and data is sourced entirely from the host’s existing projections.
Dashboard on the Panel¶
- CLOCK Badge: Local 24h time, accompanied by DS API PEAK / OFF PEAK labels. Peak hours are Beijing Time Mon-Fri 09:00-12:00 / 14:00-18:00; weekends are always OFF-PEAK.
- STEPS / TURN Odometer: Digital drum wheel style, rolls up on mount, scrolls on value change, with carry-over handled as 9→0.
- LLM / TOOLS Dual Bar: Two-column layout, with labels above values; bars are segmented based on the raw LLM:TOOLS time ratio, with no upper limit, where time ratio maps directly to bar ratio.
- THROUGHPUT Gauge: Centered tokens/s reading, with an initial red line at 200, auto-expanding in steps of 100 tok/s.
- CONTEXT USAGE Bar: Divided into three segments by token ratio – System Prompt (gray) / Tools (blue) / Messages (purple); the whole bar turns red when usage is ≥80%; hover to show a tooltip with detailed breakdown of the three token types.
- CACHE HIT Bar: <50% red, <80% yellow, ≥80% green.
- CONTEXT Rolling Counter: Three odometers – CACHE HIT (green) / CACHE MISSED (orange) / OUTPUT (pink).
During agent execution, the entire panel has a breathing effect, with bars pulsing accordingly.
Responsive Layout¶
The panel adapts to three tiers based on right-side free space, measured in real-time using ResizeObserver:
| Tier | Condition | Display Content |
|---|---|---|
| full | window ≥800px and free space ≥180px | All gauges |
| mini | window ≥800px but free space <180px | Clock (short PEAK / OFF PEAK badges) + compact scrolling rows |
| hidden | window <800px | Not displayed (display:none) |
Window width <800px is a hard lower limit; it falls back to full on measurement failure. The mini tier might slightly obscure the chat column on narrow windows, but the panel is click-through, so it does not affect interaction.
Installation and Activation¶
Install from GitHub:
dsh plugin --profile web add https://github.com/lauytgary/dsh_hud_plugin
Or install from a local path:
dsh plugin --profile web add /path/to/dsh-stats-hud
After installation, restart dsh web (loader entries are scanned at startup), then refresh the page. The plugin will appear in Settings → Plugins. Dependencies: DeepSeek Harness dsh (tested on 0.1.0-rc.6, macOS) and pnpm (used for plugin management).
Note a detail: the repository address is lauytgary/dsh_hud_plugin, while the plugin name is dsh-stats-hud (inconsistent). Use the plugin name to uninstall:
dsh plugin --profile web remove dsh-stats-hud
How it Works¶
- The plugin registers to the
conversation.composer.dockslot (iddsh-stats-hud, order 1); the panel itself isposition: fixed, does not occupy layout space, and the original stats row remains unchanged. - Data comes from the host’s existing projections:
sessionStats,tokenUsage,contextPressure,contextBreakdown; zero changes on the host side. exports.inject = ["slots"]is required: DSH’s ctx is strictly proxied, and accessing undeclared services will throw errors directly.- The entire panel is
pointer-events: none, allowing click-through; only the CONTEXT USAGE bar restores pointer events to support hover tooltips.
Development and Testing¶
lib/client.js is a hand-written loader bundle (window.__ModuleLoader__.load), requiring no build step. The plugin is installed as a link: dependency; after editing lib/client.js locally, simply restart without needing to reinstall.
Run tests:
npm test
Tests are based on node:test, have zero dependencies, and require Node ≥ 18. Test-specific __test exports are controlled by the DSH_HUD_TEST environment variable; the browser bundle is unaffected.
If you want to publish to npm: remove private from package.json and run npm publish, after which users can install with dsh plugin --profile web add dsh-stats-hud. Currently, it is not published to npm by default; installation proceeds via GitHub or local path.
Suitable Scenarios and Notes¶
Suitable for people staring at dsh web running tasks for long periods who want to quickly read throughput, cache, and context status. If you only want to check occasionally, the original stats row is still there; installing the plugin does not break any existing layout.
Two reminders: the mini tier might slightly obscure the chat column on narrow windows (click-through makes it safe); the plugin runs with the current dsh process permissions. Before installing any third-party plugins, you should check the source code and license. This plugin uses MIT.
Conclusion¶
dsh-stats-hud demonstrates a typical DSH “everything is a plugin” approach: without touching a single line of host code, it replaces existing data with a more readable presentation. Source code and documentation can be found on GitHub: https://github.com/lauytgary/dsh_hud_plugin; you can also check it on the community directory: https://www.skillhub.cn/plugins/lauytgary/dsh_hud_plugin (an independently maintained community site with no official affiliation to DeepSeek or HF).