dsh-session-overview
qing8-max/dsh-session-overview
在 DSH 会话视图切换器中增加「概览」页签,显示当前会话的回合数、墙面时间、令牌用量、缓存命中率与生成速度。它的 HTTP 路由没有 DSH 的访问检查,浏览器里打开的网页可以调用它们。
安装
dsh plugin --profile web add github:qing8-max/dsh-session-overviewREADME
dsh-session-overview
A DeepSeek Harness bundle that adds an Overview tab to the conversation view switcher, beside Chat and Trajectory, and summarizes the current session.
What it shows
- 总 Token / Total tokens with the four buckets the Host meters: uncached
input, cache read, cache write, and output. The cache hit rate is
cache read ÷ (cache read + uncached input); cache writes stay out of that denominator. - Turns and steps that finished in this session.
- Model time, tool time, output speed (tok/s), average first token latency.
- A state pill: 运行中 / Running while a turn runs, otherwise 空闲 / Idle.
Where the data comes from: the Host projections sessionStats
(@deepseek-ai/dsh-session-stats) and tokenUsage (@deepseek-ai/dsh-token-meter),
read through the standard useProjection slot prop. The page never folds
session events itself and adds no model requests.
How to use
Open any session and pick the 会话概览 / Overview tab in the conversation tab strip. The tab appears once the bundle is enabled; the strip itself only renders when the conversation has at least two views.
Limitations
- Figures cover the whole session log, independent of how much history the page has paged in, and exclude subagent sessions.
- Only finished steps count: while a turn runs, the numbers stay still and the header says so.
- Aggregate only — no per-turn breakdown. Use the built-in Trajectory view for that.
- No model or provider name, and no cost conversion.
- Needs the Host statistics above; when they are unavailable the page says so instead of showing zeros.
Layout
package.json bundle manifest (dsh.bundle + dsh.client)
cordis.patch.yml inserts the `session-overview` row
index.js Host half (empty; the capability is browser-side)
client.js the `conversation.view` entry and its React component
locale/{zh,en}.json Plugin Manager title and description
icon.svg Plugin Manager icon
Edit client.js to change the page; it is plain JavaScript registered through
window.__ModuleLoader__, with no build step.