dsh-usage-stats
Manifest valid★ 31DeepSeek Harness Plugin: GitHub-style usage heatmap + Token / cache hit / account balance dashboard + workspace alias management.
dsh-usage-stats
DeepSeek Harness 插件:GitHub 风格用量热力图 + Token / 缓存命中 / 账户余额看板 + 工作区别名管理。
- 热力图:53 周 GitHub 绿,每完成一个回合点亮;悬停按工作区显示次数明细与当日 Token
- 统计卡片:总花费 Token(分项)、缓存命中率、账户余额(DeepSeek 官方接口)、总使用次数、连续使用、各工作区 Token 进度条
- 工作区别名:头部「✎ 工作区别名」管理,持久化保存(
$DSH_HOME/storages的 KV 单元usage-stats-aliases) - 时间范围切换(近 30 天 / 近 90 天 / 全部)、动画、亮暗主题自适应
效果截图


安装
本插件是标准的 DSH 社区插件包(声明 dsh.bundle manifest + web client 半),数据全部来自持久化会话日志,安装后自动回填历史。
方式一:官方插件命令(推荐)
dsh plugin --profile web add dsh-usage-stats
安装后刷新页面即可,无需手动改配置、无需重启。
方式二:手动注册(本地包)
- 把本目录放入任意位置,并在
$DSH_HOME/profiles/node_modules/下创建指向本目录的符号链接(Windows 用 junction):New-Item -ItemType Junction -Path "$env:DSH_HOME\profiles\node_modules\dsh-usage-stats" -Target "<本目录绝对路径>" - 在
$DSH_HOME/profiles/web/cordis.patch.yml添加一行:
用户 patch 层会被热重载:保存后刷新页面即可。- insert: - id: usage-stats name: dsh-usage-stats
架构
- Host 半(
lib/index.js):扫描持久化会话日志聚合用量(turn/end+assistant/message.usage),监听session/event实时折叠;通过webServer服务注册数据路由:GET /api/usage-stats— 统计快照GET /api/usage-stats/balance?force=1— 账户余额(复用llm-deepseek的 API Key 配置)POST /api/usage-stats/alias— 设置工作区别名
- Client 半(
lib/client.js):window.__ModuleLoader__工厂格式的浏览器 bundle,注册设置面板「用量统计」页(settings.section槽位)。
数据说明
- 使用次数与 Token 全部来自 DSH 持久化会话日志,插件激活时会自动回填全部历史,插件卸载/重启后数据不丢
- 余额查询走 DeepSeek 官方
/user/balance接口;未配置 API Key 时卡片显示引导文案 - 仅统计能归属到已注册工作区(按会话 cwd 匹配)的会话
开发
- 修改
lib/index.js/lib/client.js后刷新页面即生效(client bundle 随页面加载);host 半改动通过重启 DSH 生效 - 插件包无第三方依赖:host 半只使用 Cordis 服务,client 半只使用 react(模块表提供)
License
MIT
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.9 | — | — |
| 0.1.10 | — | — |
| 0.1.11 | — | — |
| 0.1.12 | — | — |
| 0.1.13 | — | — |
| 0.1.14 | — | — |
| 0.1.15 | — | — |
| 0.1.16 | — | — |
Comments
Loading…
Similar plugins
by yokesky
DeepSeek Harness (DSH) 用量统计面板 — usage statistics dashboard: GitHub-style heatmap, daily token trend, model usage donut.
★ 3
↓ 118/wk
MIT
TypeScript
Aug 15, 2026
dsh plugin --profile web add @yokesky/dsh-usage-lensby deepseek-dsh
DeepSeek Harness Web UI 增强插件:余额用量概览、项目文件浏览、Git 变更与历史、内置终端、Harness 更新检查
★ 4
↓ 26/wk
JavaScript
Aug 20, 2026
dsh plugin --profile web add dsh-workspaceby wannanbigpig
DeepSeek Harness web 用量与计费插件:官方余额、Token 用量、贡献热图与按小时计费统计。Balance, token usage, contribution heatmap & per-hour cost stats for dsh web.
★ 3
↓ 528/wk
MIT
JavaScript
Oct 26, 2026
dsh plugin --profile web add @wannanbigpig/dsh-usage-statsby w32394045-dotcom
DeepSeek Harness 的 GitHub 接入插件:设置里登录账号,agent 用它真实干活(12 个工具 + 云计算与成本护栏)。token 不经过模型上下文。
★ 0
MIT
JavaScript
Oct 6, 2026
dsh plugin --profile web add @ptfm/dsh-githubby Anna-la
DeepSeek Harness token 用量统计插件: 按模型/日期区分, 设置页看板, 数据目录在线更改
★ 0
MIT
JavaScript
Aug 27, 2026
dsh plugin --profile web add token-statby lanlandeli
DeepSeek Harness 使用统计插件|Token 总量与构成、7/30 天趋势、年度活跃热力图、模型占比、工作区/任务筛选、CSV/JSON 导出
★ 11
↓ 375/wk
NOASSERTION
TypeScript
Aug 17, 2026
dsh plugin --profile web add dsh-usage-stats