283Gawin/dsh-heatmap 预览 preview

283Gawin/dsh-heatmap

DSH Web GUI 活动热力图插件:侧边栏中展示类似 GitHub 风格的提交/令牌/支出热力图,并提供按模型估算的成本。

Project Overview项目介绍

This is a native DSH plugin that adds an activity heatmap panel to the left sidebar of the DSH Web GUI. It displays 90 days of activity data that can be toggled between three different dimensions: commit count, total token usage, and estimated cost in USD with optional CNY conversion. The panel also shows today’s total tokens, cache hit rate, and automatically calculates cost based on the specific model used for each call. The heatmap matches DSH’s built-in light and dark theme modes for a clean consistent user experience.

This plugin is built for developers who want to track their DSH usage activity and token-related spending. The heatmap uses a GitHub contribution-style grid layout, with color intensity graded based on the selected data dimension. Hovering your cursor over any day will pull up a detailed breakdown of that day’s commits, token usage, and spending. The panel docks by default at the bottom of the left sidebar below the workspace list, and it supports folding via clicking the panel title, with the folded state automatically saved locally between DSH sessions.

Installation can be done either by cloning the source repo, building it with pnpm, and linking it locally to your DSH instance, or by installing the pre-built version directly from npm. After installation, you will need to restart DSH Web for the plugin to load correctly. One important caveat is that you have to add the plugin’s namespace activity-heatmap to DSH’s whitelist of allowed settings namespaces, otherwise the plugin’s configuration card will not load properly. This change will be overwritten when you upgrade DSH, so you will need to re-apply it after each upgrade. The plugin is open source under the MIT license, and includes preloaded pricing for most major large language models.

这是一款专为 DeepSeek Harness (DSH) Web GUI 开发的原生插件,会在 DSH 左侧边栏添加常驻的活动热力图面板。它支持展示近 90 天的活动数据,可在提交次数、Token 用量、估算花费三个维度间切换,还会在热力图下方显示今日所有会话的 Token 总数、缓存命中率,并按调用模型自动计算花费。插件适配 DSH 的浅色/深色主题模式,界面适配良好。

这款插件面向需要追踪自己 DSH 使用行为和 Token 花费的开发者。日常使用中,热力图采用类似 GitHub 贡献图的网格布局,颜色深浅按所选维度分级,鼠标悬停即可查看当日各项明细数据。面板默认常驻在左侧栏底部工作区列表下方,支持点击标题折叠,折叠状态会自动持久化保存,用户可以根据自己的使用习惯灵活调整面板的显示状态。

你可以通过源码构建后本地链接安装,也可以直接从 npm 下载已发布的版本安装,安装后重启 DSH Web 即可使用。需要注意的是,当前 DSH 要求新插件的命名空间添加到白名单,否则设置页无法显示插件配置,升级 DSH 后白名单修改会被覆盖,需要重新操作。插件采用 MIT 许可开源,内置主流大模型的公开定价可直接使用。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
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:283Gawin/dsh-heatmap

把 283Gawin/dsh-heatmap 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-activity-heatmap

DSH Web GUI 左侧栏活动热力图插件:常驻显示近 90 天的活动热力图,可在 「提交次数 / Token 用量 / 估算花费」三个维度间切换;热力图下方固定一行显示 今日所有会话消耗的 Token 总数、缓存命中率,并按每次调用实际使用的模型 自动计算花费(USD,可配汇率显示 CNY)。

Awesome DSH Plugin dsh-plugin

效果图

左侧栏热力图面板(浅色 / 深色模式):

浅色 深色
面板(浅色) 面板(深色)

设置页「插件」分区中的配置卡片(浅色 / 深色模式):

浅色 深色
设置卡片(浅色) 设置卡片(深色)

功能

  • 近 90 天热力图(固定窗口):GitHub 贡献图式网格(周一至周日 × 按周 分列),颜色深浅按所选维度分级(对数刻度);鼠标悬停显示当日明细 (提交数 / Token / 花费)。
  • 维度切换:提交(所有 DSH 工作区 git 仓库,不含 merge)、Token(billed 总量)、花费(按模型定价)。选择记忆在浏览器 localStorage。
  • 统计块(参考 Codex 个人资料页形态):今日 Token 总量、今日缓存命中率 (cacheRead / (cacheRead + cacheWrite + miss input))、今日花费,以及 近 90 天窗口的 Token / 提交 / 花费合计与今日按模型的花费细分。
  • 常驻侧栏:面板常驻左侧栏底部(工作区列表下方),自愈式挂载(React 重渲染后自动复位),可点击标题折叠,折叠状态持久化。
  • 设置卡片:注册在设置页「插件」分区(settings.plugin.item),支持主题 (蓝色 / 绿色)、enabled、includeMerges、USD→CNY 汇率配置;也支持插件行 config。
  • 数据来源:host 进程经官方 SDK 读取——sessionPersistence 列出全部会话 并重放其 durable 日志(assistant/message 携带的 provider usage、 request/header 与 request/context 携带的模型名),subprocess 跑 git log 统计各工作区每日提交。聚合结果 TTL 缓存 60s, 经 GET /activity-heatmap/stats 提供。

安装

git clone https://github.com/283Gawin/dsh-heatmap
cd dsh-heatmap
pnpm install && pnpm build          # link 安装需要构建产物(lib/)
dsh plugin --profile web add link:$PWD

或从 npm 发布版安装:

dsh plugin --profile web add @linxin666/dsh-client-ui-activity-heatmap

重启 dsh web 后,左侧栏即出现热力图面板。

设置页暴露:DSH 宿主对配置客户端可见的 settings namespace 有一个 白名单(dsh-host-apiproxy 的 WEB_SETTINGS_NAMESPACES,官方包内 hardcode)。新插件必须把它的 namespace 加进该白名单,否则设置页卡片显示 "Settings not available for this plugin."。本插件需要把 "activity-heatmap" 追加到该数组;升级 dsh 后该修改会被覆盖,需重新 打补丁。修改后重启 dsh web 生效。

配置

设置页「插件 → 活动热力图」卡片可配置以下字段(等价于插件行 config):

键 类型 默认 含义
theme string blue 热力图主题色:blue / green
enabled boolean true 插件总开关
includeMerges boolean false 提交数是否计入 merge 提交
usdCnyRate number 0 USD→CNY 汇率,0 表示不显示人民币
priceOverrides 文本行 {} 模型定价覆盖(见下)

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-plugin-tavily 下一个 Next dsh-ocr-local →