dsh-dashboard
其他 活跃维护

dsh-dashboard

VinciBeans/dsh-dashboard

为会话视图新增统计标签页,实时展示token用量、调用耗时、工具及技能活动等维度数据,指标动态更新无需手动统计,直观掌握每次会话的消耗与调用情况。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
115 KB
仓库大小
22 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:VinciBeans/dsh-dashboard
git clone https://github.com/VinciBeans/dsh-dashboard.git
git clone git@github.com:VinciBeans/dsh-dashboard.git
README.md main

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

Pick the dist-tag that matches your harness:

  1. npm latest (0.1.1-rc.2) — compatible with dsh v0.1.1-rc.2 (previous client-runtime generation):
    dsh plugin --profile web add @wenqi_bian/dsh-dashboard
  2. npm next (0.1.2-rc.1) — compatible with dsh v0.1.2-alpha.1 ~ rc.1:
    dsh plugin --profile web add @wenqi_bian/dsh-dashboard@next
  3. npm alpha (0.1.2-alpha.5) — compatible with dsh v0.1.2-alpha.1 ~ rc.1 (same contract generation as next):
    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.

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.