DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Token Bar — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
T

dsh-token-bar

Token Bar

A per-turn token usage strip for DeepSeek Harness: a segmented bar plus a written legend under every reply, showing this turn's uncached input / cache read / output split.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:LobotomyCorporation/dsh-token-bar#6886ece9aff4107cce805084407f144be2602bcb
READMECompatibilityVersions
单轮用量条:灰=未缓存输入、黄=缓存读取、绿=输出,后面跟带百分比的图例

Compatibility and provenance

Token Bar is published as dsh-token-bar and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
10/17/2026

Versions

0.1.0stable
10/17/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
10/17/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in models-usage.

Whale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinUsage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with a compact price glance card above the sidebar's Settings rowClient Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilitiesPer-model capability declarations (image input and reasoning efforts) for custom pi-ai providers, edited in place on the Models settings cards; writes the official llm-pi-ai settings namespace, no DSH source changes.Commandcode Provider@mars-sea/dsh-commandcode-providerUnofficial DeepSeek Harness LLM provider plugin for Command Code, ported from pi-commandcode-provider (MIT). Registers the 'commandcode' provider route with a Models-page card and live model catalog.

README

dsh-token-bar

给 DeepSeek Harness 的 Web 界面加一条单轮 token 用量条:每条回复末尾一行,把这一轮的缓存结构画成灰 / 黄 / 绿三段条,配一条带百分比的完整图例。

单轮用量条:灰=未缓存输入、黄=缓存读取、绿=输出,后面跟带百分比的图例

极轻量:纯客户端展示,不联网、不落盘、不注册任何 Host 路由、不写会话日志、不改任何官方包。 零依赖:一个手写 bundle,只用平台提供的 React。

English | 中文


它解决什么

官方在每条回复末尾的用量气泡里,点开能看到「本轮用量」的精确数字。但数字是列表,要读;结构是形状,一眼就懂:

  • 这一轮是不是全命中缓存?
  • 有没有跑出大量未缓存输入(意味着前缀失效、成本变高)?
  • 输出占比是否异常?

dsh-token-bar 把这三个数字变成一条可扫视的带状图,并且带图例——不需要悬停也知道每段是什么、占多少。

外观

项值
段序 / 图例序灰(未缓存输入)→ 黄(缓存读取)→ 绿(输出),条与图例完全同序
条宽132px
最小段宽只要有 token 就至少 6px,再小的占比也看得见,不会和图例对不上
图例色点 + 名称 + 本轮占比百分比
字号比正文小一号:calc(var(--dsh-content-font-size-secondary, 13px) - 1px),跟随设置里的字号
配色全部取自 --dsw-* 主题 token,浅色 / 深色自动跟随
对齐靠左,不居中

悬停显示本轮完整明细:缓存命中率 + 每段精确 token 数与占比。

缓存写入未单独成段——当前路由上该值恒为 0。

数据来源

读 turn.data.get('turn-tail').tokenUsage,即本轮的用量(和官方「本轮用量」弹窗同源),不是会话累计。

conversation.chat.turnTail 插槽的 owner(ui-chat 的 TurnTailNodeView)会把 Turn 位置作为 owner props 直接传入,Conversation 已把本轮账目折进 turn-tail 这份 location data。感谢 dsh-token-counter 提供的实现参考。

安装

dsh plugin --profile web add dsh-token-bar

或从本地目录安装(开发时):

dsh plugin --profile web add /path/to/dsh-token-bar

安装后重启 dsh web 生效。

卸载:

dsh plugin --profile web remove dsh-token-bar

兼容性

组件支持
DSH>=0.2.0-rc.1 <0.3.0-0,在 0.2.0-rc.2 上实测
Node.js>=20
界面DSH Web(依赖 conversation.chat.turnTail 插槽)
系统macOS / Linux / Windows(纯 JavaScript)

开发

npm run check   # 语法检查
npm test        # 纯函数测试 + 渲染测试

npm test 默认测试源码 client.js。想验证浏览器实际收到的那份构建产物,从运行中的 dsh web 抽一份快照:

node scripts/snapshot-bundle.mjs "http://127.0.0.1:3080/?token=<启动时打印的 token>"
npm test        # 检测到 verify-module.js 后,自动改为测试服务端下发的产物

网络受限时推送

如果所在网络访问不了 github.com:443(git push 卡住超时)但 api.github.com 可以访问,用 REST API 推送:

node scripts/push-via-api.mjs <owner>/<repo> --dry-run   # 先看要推什么
node scripts/push-via-api.mjs <owner>/<repo>             # 真正推送

它会按 blobs → trees → commits 重放本地历史,并把分支指向远端生成的新 commit SHA(API 创建的 commit 与本地 SHA 不同,这点最容易踩坑)。

可调参数

都在 client.js 顶部:

常量作用
BUCKETS三段(顺序、名称、颜色)
MIN_SEGMENT_PX最小段宽,默认 6
TRACK_PX条宽,默认 132
FONT_SIZE字号,默认比正文小一号

已知限制

  • 只覆盖完成(turn/end)的轮次;正在流式输出的那一轮没有条。
  • 依赖官方 turn-tail 的 location data 结构;DSH 若改动该结构,需要跟随适配。
  • 没有设计器 / 配置界面,改样式需要编辑源码。

许可

MIT