QuanWenG/token_usage_heatmap
DeepSeek Harness Web 的 GitHub 风格令牌使用热力图与个人统计仪表盘。
Project Overview项目介绍
This is a native bundle plugin built exclusively for the DeepSeek Harness (DSH) Web profile. It adds a GitHub/Codex-style token usage heatmap calendar to the Personal Statistics section under DSH Settings without modifying any core DSH source code. The plugin displays multiple key metrics including cumulative token usage, daily peak usage, longest chat duration, current usage streak, and longest usage streak. It provides daily, weekly, and cumulative views covering the last 53 weeks, where the color intensity of calendar cells corresponds to token usage volume.
The plugin supports viewing exact token counts and breakdowns of input, output, cache read, and cache write via both mouse hover and keyboard focus. It works with both Chinese and English interfaces, adapts to light and dark system themes, and supports horizontal scrolling and responsive layout for different screen sizes. All statistics are derived from DSH’s existing persistent session logs, so historical activity before installation is automatically included in calculations. It counts all sessions, including main sessions, sub-agent sessions, and workflow sessions.
Installation can be done either by cloning the repository locally or adding the GitHub repo directly to your DSH profile. The plugin supports DSH versions from 0.1.0-rc.5 up to before 0.2.0, and requires pnpm 10 or higher to build. You can configure the maximum concurrent session reads from 1 to 32 in your DSH profile patch file, and simple commands are provided for updating and uninstalling the plugin. The project is open source under the permissive MIT license.
这是专门为 DeepSeek Harness(DSH)Web 版开发的原生插件,它无需修改 DSH 源码,就能在「设置 → 个人统计」页面新增 GitHub 风格的 Token 使用热力日历。插件支持展示累计 Token、单日峰值、最长聊天时长、当前连续天数和最长连续天数,提供近 53 周的三种统计视图,格子颜色深浅对应使用量高低。
插件支持鼠标悬浮和键盘聚焦查看精确 Token 数,以及输入、输出、缓存读写的明细数据,同时适配中英文界面、亮色/暗色主题,支持横向滚动和响应式布局。统计数据从 DSH 已有会话日志派生,安装前的历史记录也会自动纳入统计,覆盖主会话、子代理和工作流所有会话。
该插件兼容 DSH 版本 >=0.1.0-rc.5 <0.2.0,固定使用 pnpm 管理依赖,支持通过克隆源码本地安装,也可直接添加 GitHub 仓库在线安装。项目采用 MIT 许可证开源,可配置并发会话读取数在 1 到 32 之间,同时提供了清晰的更新和卸载命令,方便用户维护。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:token_usage_heatmap(QuanWenG/token_usage_heatmap)
仓库:https://github.com/QuanWenG/token_usage_heatmap
本站详情页:https://www.yhbd.top/plugins/quanweng-token-usage-heatmap/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-15 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:QuanWenG/token_usage_heatmap
把 QuanWenG/token_usage_heatmap 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
DSH Token 使用热力日历
中文 | English
dsh-plugin-token-usage-heatmap 是一个适用于 DeepSeek Harness Web 的树外 bundle。它在“设置 → 个人统计”中增加 GitHub/Codex 风格的 Token 使用热力日历,不修改 DSH 源码。
界面预览
中文界面

English UI

功能
- 展示累计 Token、单日峰值、最长聊天时长、当前连续天数和最长连续天数。
- 提供最近 53 周的每日、每周和累计三种视图。
- Token 使用量越高,格子颜色或周柱高度越明显。
- 鼠标悬浮和键盘聚焦均可查看精确 Token 数及输入、输出、缓存读取、缓存写入明细。
- 支持中英文、亮色/暗色主题、横向滚动和响应式布局。
- 从已有会话日志实时派生统计,安装前的历史记录也会自动纳入。
统计口径
- 数据来自 DSH 的持久会话日志和当前活会话;主会话、子代理及工作流会话均会统计。
- 使用 DSH token-meter 的折叠语义:统计
assistant/chunkusage,最终assistant/messageusage 会替换同一步骤的早期样本,避免重复累计。 - 每日总量为未缓存输入、输出、缓存读取、缓存写入之和,日期按照浏览器所在的 IANA 时区归属。
- 最长聊天时长是单个会话从首个事件到最后事件的最大时间跨度。
- 今天没有使用量时不会立即中断当前连续天数;如果今天产生使用量,则今天会计入连续天数。
- 删除会话后,该会话的 Token 贡献会在下次读取时消失。插件不会创建或复制会话事件。
兼容性
| 项目 | 支持范围 |
|---|---|
| DeepSeek Harness | >=0.1.0-rc.5 <0.2.0 |
| DSH profile | web |
| Node.js | 跟随所安装 DSH 的版本要求 |
| 源码构建 | Corepack;仓库固定使用 pnpm 11.7.0 |
| GitHub 直接安装 | pnpm 10 或更高版本 |
已验证 DSH 0.1.0-rc.5 实际运行,以及 0.1.0-rc.6 的安装、测试、类型检查、构建与打包。
从 GitHub 克隆并安装
1. 克隆项目
git clone https://github.com/QuanWenG/token_usage_heatmap.git
cd token_usage_heatmap
2. 安装依赖并构建
pnpm install
pnpm test
pnpm typecheck
pnpm build
3. 安装到 DSH Web profile
如果使用已经安装到系统中的 dsh CLI,请在插件目录执行:
dsh plugin --profile web add .
dsh --profile web --dump-config
dsh --profile web
如果从 DSH 源码运行,请切换到 DSH 源码根目录,并把插件路径替换为刚才克隆目录的绝对路径:
pnpm dsh plugin --profile web add /absolute/path/to/token_usage_heatmap
pnpm dsh --profile web --dump-config
pnpm dsh --profile web
启动后打开 http://127.0.0.1:3080,进入“设置 → 个人统计”。--dump-config 输出中应包含 # == dsh-plugin-token-usage-heatmap 层和 token-usage-heatmap 插件行。
Windows PowerShell 也使用相同命令,只需将示例路径替换为实际的绝对路径。
直接从 GitHub 安装(可选)
DSH 也支持把 GitHub 仓库直接添加到 profile。建议锁定 release、tag 或 commit,避免后续提交静默改变实际安装的代码:
dsh plugin --profile web add github:QuanWenG/token_usage_heatmap#<tag-or-commit>
Git 依赖会通过本项目的 prepare 脚本生成 lib/。pnpm 10 及以上默认禁止依赖在安装期间执行构建脚本;首次安装若被拒绝,请按照 DSH/pnpm 输出,把它显示的确切包键加入该 profile 的 pnpm-workspace.yaml:
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
chuspeeism/dashi-taskboard
zhoushoujianwork/easyeda-agent
morluto/rea
gitroomhq/postiz-agent
linhay/harmony-next.skills
yzlnew/infra-skills
liceses/dsh-gitbash-preset
sjh9714/dsh-win32