DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Ui Shadow Token — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
U

dsh-ui-shadow-token

Ui Shadow Token

DSH 网页聊天令牌徽章:以槽位优先级 -1 覆盖 assistant-step 渲染器,显示每条消息的输入/输出令牌用量

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:haoliangwu/dsh-ui-shadow-token#26c3618d5f06cb8c04a750d1f2f27b3ff4292503
README兼容性版本

兼容性与来源证明

Ui Shadow Token 以 dsh-ui-shadow-token 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/8/20

版本

0.1.0stable
2026/8/20

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/8/25
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Usage@linxin666/dsh-usagedsh Web GUI 的使用统计插件:检测各提供商余额和编码计划配额,并提供实时令牌使用记录,以及当前提供商的专属宠物气泡Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。

README

dsh-ui-shadow-token

DSH web chat token badge — shows each assistant message's input/output token usage in a small pill at the message's top-right corner.

Token usage badge on assistant messages

A web client plugin for DeepSeek Harness. It shadows the keyed conversation.chat.node slot's assistant-step entry at slot priority -1, so every assistant message renders the stock content plus a ⚡ in {input} / out {output} badge in its top-right corner.

The badge reads the finalized message's usage payload (input/output/cache/reasoning tokens) with the same defensive narrowing the in-repo turn-metrics uses; while a message is still streaming and has no settled usage, the badge stays hidden. The stock assistant rendering — markdown, reasoning, tool rows, images — is untouched; only the pill is added.

Install

dsh plugin --profile web add github:haoliangwu/dsh-ui-shadow-token

Built lib/ is committed, so the git install is one line — no prepare script, no allowBuilds permission. Restart dsh --profile web after install (bundle layer stacks compose at boot).

Why slot priority -1

The conversation.chat.node slot is keyed by the node's kind: entryKey = routedNode.kind. The default assistant-step entry registers at priority 0. Keyed slot occupancy throws on same-key same-priority duplicates (fail loud), while a lower absolute priority shadows the default — the ledger sorts ascending and the lowest renders. Our entry registers the same key at priority: -1:

  • every assistant-step render resolves to this plugin's component;
  • the default renderer stays in the ledger as an inert fallback (upstream upgrades keep working; the default simply never renders);
  • any other kind (user, tool, turn-tail, …) is untouched — the default turn-tail footer (Ran for …, TTFT …, tok/s) still renders under the badge.

This is the client-slot alternative to disabled: true + re-registration: the slot declaration, seat dispatcher, and business-node state machines all stay in ui-conversation; the plugin only contributes one keyed renderer.

How it works

  • The badge is pure client rendering. The node half is an empty apply; all behavior lives in ./client, registered as a dsh.client web platform package. No host service, no RPC channel, no model-visible input, no session-log events.
  • Usage is read defensively from the node data. AssistantMessageNode.usage is typed unknown and carries a TokenUsage at runtime (inputTokens / outputTokens / cacheReadTokens / cacheWriteTokens / reasoningTokens). The component narrows it the same way the in-repo turn-metrics.ts does, so a future shape change degrades to a hidden badge, never a crash.
  • The badge text comes from a locale namespace. shadow-token (zh / en) interpolates {input} / {output} placeholders; the locale seat is provided automatically by the registration (PropsLocale mechanism).
  • The bundle id equals the row name. client-modules keys browser registration by the client row's name; the tsdown bundle id and cordis.patch.yml row name are both dsh-ui-shadow-token, or the browser shell throws "loaded without registering".

Build from source

pnpm install
pnpm build         # emits lib/index.js, lib/invariant.js, lib/client.js + sourcemaps
pnpm typecheck     # tsc --noEmit (types resolve via tsconfig paths to the local dsh profile)

lib/ is committed to the repo so git installs work without a build step. After changing source, run pnpm build and commit the updated lib/.

License

MIT