插件目录 / Developer / dsh-thinkmeter
dsh-thinkmeter
已验证 · 实测可装 dmz2922990
功能简介
DeepSeek Harness(DSH)客户端插件:将聊天视图中流式的 Think 思考预览替换为 实时 Token 数量显示。
可用 — 实测通过,早期项目
DeepSeek Harness(DSH)客户端插件:将聊天视图中流式的 Think 思考预览替换为 实时 Token 数量显示。 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-thinkmeter (ThinkMeter)
A DeepSeek Harness (DSH) client plugin that replaces the streaming Think reasoning preview in the chat view with a live token-count display.
What it does
While the model is thinking, the shipped UI streams the latest line of the reasoning text in the "Think" disclosure row. This plugin replaces that summary with a token counter:
| State | Display |
|---|---|
| Running | Thinking ≈ 1,234 tokens (with sweep animation) |
| Settled | Think · 1,234 tokens |
- Settled counts use the exact
usage.reasoningTokensreported by the model when available; otherwise a heuristic estimate (CJK chars × 0.6 + other chars ÷ 4). - Click the row to expand/collapse the full reasoning text.
- Keyboard accessible (
Enter/Spacetoggles).
How it works
The package is a proper DSH profile bundle:
cordis.patch.yml— bundle patch inserting thethinkmeterplugin row (dsh.bundle.patchin package.json), sodsh plugin addreconciles it into the profile's layer list automatically.index.js— empty host half (pure UI plugin).client.js— browser bundle in thewindow.__ModuleLoader__.loadformat (exports["./client"], declared viadsh.client.platform: web).
The Think row itself is embedded inside the shipped assistant-step chat-node renderer, with no dedicated extension slot. The browser half registers the same keyed entry (conversation.chat.node, key assistant-step) in the Cordis slot system, shadowing the shipped renderer with a lightweight one. When the plugin is removed, the shipped renderer is restored automatically.
Known trade-off: while this plugin is active, plain assistant text blocks render as pre-wrapped plain text instead of full Markdown, because the dynamic/lightweight renderer cannot reuse the shipped Markdown components.
Install
Command (recommended)
Install directly from GitHub into your profile:
dsh plugin --profile web add https://github.com/dmz2922990/dsh-thinkmeter.git
Replace web with the profile you use (e.g. tui, headless). The command forwards to pnpm add inside the profile directory, so any pnpm-supported specifier works (git URL, tag, local path).
Upgrade / remove:
dsh plugin --profile web up dsh-thinkmeter
dsh plugin --profile web rm dsh-thinkmeter
If your machine has no GitHub credentials configured for git-over-HTTPS, use the SSH form:
git+ssh://git@github.com/dmz2922990/dsh-thinkmeter.git.
Static composition
Clone the repo next to your DSH config, then add a row to your cordis.yml composition:
plugins:
- name: dsh-thinkmeter
path: ../dsh-thinkmeter
Or once the package is published to a registry:
plugins:
- name: dsh-thinkmeter
Development
Plain JavaScript, no build step:
src/index.js # the Cordis client plugin (default export)
The same logic can also be pasted as a dynamic Cordis plugin (cordis_define client code) inside a running DSH session.
License
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-thinkmeter」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:dmz2922990/dsh-thinkmeter Headless(CLI)profile:
dsh plugin --profile headless add github:dmz2922990/dsh-thinkmeter 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。