DeepSeek Harness plugin

dsh-usage-stats-24218734

DeepSeek Harness 使用统计:Token 汇总、热力图、每日趋势、模型占比(Settings 页面)

Jump to install

Source facts

Repository
2421873411a-rgb/dsh-usage-stats
Latest update
Aug 16, 2026
Category
Models & Providers
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/2421873411a-rgb/dsh-usage-stats
Plugin: dsh-usage-stats-24218734
Author: 2421873411a-rgb

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-usage-stats

DeepSeek Harness(DSH Web)使用统计插件:在「设置 → 使用统计」页面展示真实 Token 消耗。

功能

  • 顶部统计卡:累计 Token 数、峰值 Token 数、最长聊天时长
  • Token 活动热力图:每日 / 每周 / 累计三种模式,每列 7 格 = 周一~周日,左侧星期标签(一/三/五/日),月份标签锚定在每月 1 号所在列
  • 按天 Token 趋势:按模型分色堆叠柱状图,悬停/点击显示日期、总量与模型明细
  • 模型用量:SVG 圆环 + 模型列表(超过 6 个模型自动合并为「其他」)
  • 数据来源:~/.dsh/storages/web-billing.json(真实 DeepSeek Harness 消耗)

数据口径

  • 累计 Token:byDay 全量汇总(input + cacheRead + output)
  • 峰值 Token:单日最大 Token 消耗
  • 最长聊天时长:单个会话首条消息到末条消息的最大时间跨度
  • 热力图累计模式:从热力图起始周开始累计到当周最后一天(当周未结束则截至今天)

安装

npm pack
dsh plugin --profile web add dsh-external-dsh-usage-stats-0.3.1.tgz

开发

源码在 lib/,改完后执行:

node sync.mjs          # 同步到已安装副本
# 或
npm pack               # 重新打包安装

然后重启 dsh web 生效。

API

GET /usage-stats/api?days=7|30 返回统计 JSON(带服务端缓存,billing 文件变化或跨天自动失效)。

截图

![使用统计](docs/screenshot.png)

License

MIT