Small-tailqwq/dsh-tps
只是一个 tps 插件
Project Overview项目介绍
dsh-tps is a native plugin built exclusively for DSH Web that adds a real-time tokens per second (TPS) counter next to the "Generating" status bar. To install it, run the command dsh plugin --profile web add 'github:Small-tailqwq/dsh-tps' in your terminal, then restart your DSH Web instance and reload the web page. If pnpm blocks the build script during installation, you will need to enable the allowBuilds option in your DSH Web profile configuration before retrying. You can also install a pre-built local .tgz package by replacing the GitHub URL with your local file path.
This plugin uses a 5-second rolling window to count output tokens during streaming generation, and it includes the DeepSeek-V3 tokenizer built in for counting. It automatically appears after the first token count is generated, and disappears when the generation task ends. If your mouse hovers over the TPS display for 2 seconds, the display fades out to allow click-through interactions with underlying page elements. It locates the status bar via semantic DOM selectors, so it works regardless of text content or CSS class names.
dsh-tps is a pure front-end plugin that only reads existing DSH session context, so it does not send any extra network requests to external services. TPS counts from this plugin are not the same as official billing counts from DeepSeek's servers, and may differ from counts generated by other tokenizers. The plugin is distributed under the open-source BSD-3-Clause license, and it was split out from the early DeepSeek Harness monorepo for independent distribution. Regular installation does not require a full checkout of the DSH source code.
dsh-tps 是一款专为 DSH Web 开发的原生插件,作用是在“深度求索中…”状态行旁显示实时 TPS(每秒生成 token 数)。用户可以通过 DSH 命令行工具执行 dsh plugin --profile web add 'github:Small-tailqwq/dsh-tps' 完成在线安装,也可以添加预构建的本地压缩包安装。安装完成后需要重启 DSH Web 并重打开页面,若 pnpm 提示构建脚本被阻止,需配置 Web 配置文件开启 allowBuilds 后重试。
本插件使用 5 秒滚动窗口统计流式输出的 token 数量,内置 DeepSeek-V3 分词器,会在首个有效数值生成后自动显示,任务结束后随状态行一同消失,鼠标悬停 2 秒后会淡出并允许点击穿透。它通过语义 DOM 定位状态行,不依赖特定文案或 CSS 哈希类名,因此适配不同语言版本的 DSH Web,兼容性较好。
本插件是纯前端实现,仅读取 DSH 会话上下文数据,不会发起额外网络请求,也不会修改 DSH 原生节点,仅管理自身容器。它的 TPS 统计基于内置分词器,结果不等同于服务端计费统计,也不代表其他模型分词器的精确结果。本插件采用 BSD-3-Clause 许可证分发,从早期 Harness monorepo 独立出来单独分发。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-tps(Small-tailqwq/dsh-tps)
仓库:https://github.com/Small-tailqwq/dsh-tps
本站详情页:https://www.yhbd.top/plugins/small-tailqwq-dsh-tps/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 BSD-3-Clause · ⭐ 3 · 最近提交 2026-09-06 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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:Small-tailqwq/dsh-tps'
把 Small-tailqwq/dsh-tps 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-tps
在 DSH Web 的“深度求索中…”状态行旁显示实时 TPS(每秒生成 token 数)。
English: README.en.md

安装
适用于 DSH 0.1.2-rc.1。在终端执行:
dsh plugin --profile web add 'github:Small-tailqwq/dsh-tps'
安装完成后,重启正在运行的 DSH:
dsh web
重新打开页面并发起一轮任务,开始流式输出后即可看到:
深度求索中… 24秒 TPS 132
从 GitHub 安装时会自动构建插件。如果 pnpm 提示构建脚本被阻止,按提示配置 Web profile 的 allowBuilds 后重试。
安装本地包
如果拿到的是预构建 .tgz 文件,将路径替换为实际文件位置:
dsh plugin --profile web add './dsh-tps-0.3.0-rc1-dom.tgz'
预构建包已包含运行时代码,不需要下载 Harness 源码或自行编译。
功能
- 实时速率:使用滚动 5 秒窗口统计流式输出,内置 DeepSeek-V3 分词器。
- 自然显隐:首个数值产生后显示,任务结束时随状态行消失;输出暂停约 1.5 秒后显示
--。 - 悬停淡出:鼠标停留 2 秒后淡出并允许点击穿透,移开后等待 3 秒恢复。
- 语言无关的挂载:通过语义 DOM 定位状态行,不匹配中文、英文文案或 CSS 哈希类名。
- 纯前端:读取 DSH 会话快照,无额外网络请求。平均速率、首 token 时延和总用量仍由原生统计栏提供。
已安装但不显示
- 确认任务正在产生流式输出;空闲或尚未收到输出时不会显示徽标。
- 确认 TPS 已启用。如果使用
dshmarket,也需要在插件市场中启用 TPS:市场会恢复自己保存的禁用状态,仅修改 profile 配置不能覆盖它。 - 安装或替换包后重启 DSH,再重新打开页面。
- 确认宿主版本及当前皮肤保留聊天状态行。其他版本或改变页面结构的皮肤可能需要适配。
计数说明
TPS 按内置 DeepSeek-V3 分词器统计,不等同于服务端计费用量,也不代表其他模型分词器的精确计数。分词器初始化期间使用 UTF-8 字节数近似,就绪后切换为 BPE 计数。
极长且没有分词边界的连续文本可能增加主线程计算开销。悬停和恢复时间目前为固定值,没有配置界面。
开发
普通安装不依赖 Harness 源码。开发时的类型检查和测试通过相邻 checkout 解析宿主接口:
<parent>/
deepseek-harness/ # dsh-v0.1.2-rc.1
dsh-tps/
在本仓库执行:
pnpm install
pnpm run typecheck
pnpm test
pnpm run build
pnpm run prepare 是 Git 安装使用的自包含构建,不读取相邻 checkout;它应与完整构建生成一致的运行时代码。pnpm run dev 可监听源码变化。
插件通过 conversation.composer.dock 获取会话上下文,再以 React Portal 挂到当前 [data-conversation-scroll] 内 [data-chat-flow] 的直接子元素 [role="status"][aria-live="polite"]。只管理插件自己的容器,不移动宿主节点。
重新生成分词数据
准备官方 DeepSeek-V3 tokenizer.json 后执行:
node scripts/build-tokenizer-data.mjs <https://github.com/Small-tailqwq/dsh-tps/blob/HEAD/path/to/tokenizer.json>
python scripts/gen-golden.py <https://github.com/Small-tailqwq/dsh-tps/blob/HEAD/path/to/tokenizer.json> tests/fixtures/deepseek-golden.json
许可
BSD-3-Clause。本插件从早期 Harness monorepo 的 packages/client/ui-tps 独立分发。
nocobase/nocobase
Yuer6327/NoLetMe
xiaohai-78/Top