DSH Plugins
返回列表
deepseek-harness-token

deepseek-harness-token

客户端 更新于 2026.08.25

在终端中运行以下命令:

dsh plugin install zoyluoblue/deepseek-harness-token

将以下提示词粘贴到 DeepSeek Harness 对话框中:

在终端执行 dsh plugin install zoyluoblue/deepseek-harness-token 即可安装,源码见 https://github.com/zoyluoblue/deepseek-harness-token。

插件介绍

You have probably hit the same wall while running DeepSeek Harness: how many tokens did I actually burn, in total, across every home, every model, every day on this machine? deepseek-harness-token answers that question. It folds the session logs under ~/.dsh and every ~/.dsh_desktop into a single Token page inside Settings — no network calls, no model-facing tool registration, no session-event writes, and zero additional cost to the conversation itself.

The page leads with headline figures: total tokens, session count, message count, active days, current and longest streak, peak hour, and your most-used model. Below that sits a 53-week, GitHub-style contribution heatmap (a day strip appears when you switch to a 7-day or 30-day window), then a per-model view that splits each model's usage into four disjoint buckets — input, cache read, cache write, and output — so a total dominated by cache reads is visible as such rather than hidden in a grand sum. All day and hour calculations use your local calendar via Intl, meaning a daylight-saving shift will not break a streak. Scanning happens incrementally in the background; the browser side never touches a log byte, only fetching a single loopback JSON response.

It deliberately does not report cost: the harness stores no price table, and any currency figure would be a local guess dressed up as a fact — use dsh-billing for balance and billing questions. It also does not target Electron desktop shells, whose module-resolution pinning can make a profile-installed plugin unresolvable and prevent the app from starting; sessions logged under ~/.dsh_desktop are still fully readable from dsh web, so one entry point is enough. This plugin is for developers who work in harness daily, want a global token rhythm at a glance, and would rather not open yet another browser tab to ask a usage question.

截图预览

使用场景

  • 在 Settings 中快速查看整机 token 总量、会话数与 53 周贡献热力图
  • 按模型拆分 input、cache read、cache write、output 四类 token 消耗占比
  • 追踪连续使用天数、峰值时段及最常用模型,掌握自己的 token 节奏

适合人员

  • 日常在 DeepSeek Harness 中写作的开发者,想随时掌握全局 token 消耗
  • 关注缓存读写占比、希望四类 token 分布透明可见的用户
  • 不想再开浏览器标签或跑脚本就能回答 token 问题的用户