dsh-tool-token-stats is a user-facing Token statistics plugin for DeepSeek Harness (DSH). It adds a Token Statistics section to the Web GUI's Settings page with per-workspace and per-model aggregation, session drill-down, and zero-dependency usage charts.
What's included
- Overview cards — total tokens (input/output split), turns/steps (LLM/tool time), session count, grouping counts
- Dual-dimension aggregation — By Workspace / By Model, expandable rows with per-session details (incl. context pressure)
- Search, filter & sort — live filtering, "in-progress only", multiple sort keys
- Charts (pure CSS): daily usage heatmap (26 weeks), per-day stacked buckets with model dropdown, per-day model distribution, Top 8 groups
- Bilingual UI (中文 / English), light/dark theme support
- Read-only & private — uses only existing harness APIs; no data leaves your machine
Install:
dsh plugin --profile web add dsh-tool-token-stats, then add thetool-token-statsline to your profile patch and restart. See README for details.
中文版:
dsh-tool-token-stats 是面向 DeepSeek Harness(DSH) 的 Token 统计插件:在 Web GUI「设置」页新增 Token 统计 分区,提供按工作区 / 按模型的用量聚合、会话级下钻与零依赖图表。
功能一览
- 概览卡片 — 总 token(输入/输出拆分)、轮次/步骤(LLM/工具耗时)、会话数(含进行中)
- 双维度聚合 — 「按工作区」/「按模型」一键切换,行内展开会话明细(含上下文占用率)
- 搜索、筛选与排序 — 实时过滤、「仅显示进行中」、多种排序键
- 图表(纯 CSS):每日用量热力图(26 周)、按天四桶堆叠图(附模型筛选)、按天模型分布、Top 8 排行
- 双语界面(中文 / English)与明暗主题适配
- 只读 & 隐私安全 — 仅调用现有 harness 接口,数据不会离开本机
安装:
dsh plugin --profile web add dsh-tool-token-stats,在 profile patch 层挂载tool-token-stats行并重启即可,详见 README。
scription 或 README 里的链接换成实际的 GitHub 仓库地址