DSH Dashboard
Per-session statistics for DeepSeek Harness: token usage, timing, tool and skill activity.
Adds a Statistics tab to the conversation view. The numbers update live as the session progresses.
中文 | English
Compatibility
Supports DeepSeek Harness v0.1.2-alpha.1 through v0.1.2-rc.1 (npm alpha dist-tag): the client half targets the conversation.view slot, the tokenUsage / sessionStats projections, the chat snapshot's legacy.nodes timeline and the turn-tail turn data — verified present and field-identical across the dsh-v0.1.2-alpha.1 through dsh-v0.1.2-alpha.5 tags, and re-verified at dsh-v0.1.2-rc.1 (the rc.1 tree diff against alpha.5 is a repo-wide package.json version bump only: zero non-package.json files and zero non-version lines changed, so the plugin-consumed contract surface is byte-identical). The re-verification covers: tool-result node fields (time, call.name/argsRaw, callTime, isError), the turn-tail business data keys (tokenUsage, ttftMs, tokensPerSecond), the sessionStats / tokenUsage projection keys, and the built-in view entries (chat at order 0, trajectory at order 10 — the statistics entry at order 20 does not collide). Peer dependencies use the ^0.1.2-alpha.1 range, which npm resolves for every alpha of the series, for 0.1.2-rc.1 and for a final 0.1.2.
Not supported: 0.1.1-rc.2 and earlier — that generation runs the pre-useChat client-runtime contract, so the tool and skill tables would silently stay empty.
Compatibility risk to track: the chat snapshot's legacy slice is the host's compatibility projection; the shipped StatsLine still consumes it through alpha.5/rc.1 (re-verified), but re-check it on every harness upgrade.
Install
Releases are version-aligned with the harness: each version is built for, and named after, the matching @deepseek-ai/dsh release.
From npm
Install the alpha dist-tag (0.1.2-alpha.5, compatible with dsh v0.1.2-alpha.1 ~ rc.1):
dsh plugin --profile web add @wenqi_bian/dsh-dashboard@alpha
The npm package ships the prebuilt host and client bundles, so no build step is needed on install. The npm latest (0.1.1-rc.2) is the previous client-runtime generation, for dsh 0.1.1-rc.2 — use dsh plugin --profile web add @wenqi_bian/dsh-dashboard only if you run that harness.
From source
The source version — 0.1.2-rc.1, compatible with the harness source at the dsh-v0.1.2-alpha.1 through dsh-v0.1.2-rc.1 tags (the rc.1 tag content equals alpha.5 apart from version numbers) — is what the GitHub Release v0.1.2-rc.1 ships. Install it from source for local development:
dsh plugin --profile web add .
Run it from the repo root; it links the plugin into the web profile that $DSH_HOME points at. Rebuild after any code change with pnpm run bundle (see Quickstart).
Quickstart
pnpm run bundle # emit lib/index.js (host) + lib/client.js (browser)
dsh plugin --profile web add .
# restart dsh web, open a conversation, pick the Statistics view
The tab appears beside Chat / Trajectory and reads everything on the client from the session's tokenUsage / sessionStats projections and the conversation snapshot.
What it shows
- Token layer: input (fresh + cache read), output tokens, cache hit rate.
- Timing: LLM time, tool time, first-token latency, decode rate.
- Tool activity: per-tool calls, fails, total and average duration, drawn as proportional segments with a four-color cycle.
- Skills: which
skill tools were invoked, as chips.
- Insights: tool success rate, think/tool time split, tokens per turn, input:output ratio.
- Locale follows the DSH host (zh / en).
Data source
Stats are derived on the client from the conversation snapshot's tool-result nodes and the built-in sessionStats / tokenUsage projections, the same source the shipped composer StatsLine uses. There is no host @Remote call, because @Remote is not generated for a runtime-loaded out-of-repo plugin. The workspace cross-session aggregate is not implemented.
License
MIT.