dshbase

Plugin directory / Developer / dsh-token-meter-mood

dsh-token-meter-mood

Verified · install-tested on dsh firekula

✓ Actively maintained Builds on 10 official DSH packages

View on GitHub ↗ ← Back to plugin directory

0Stars
0Forks
0Open issues
—Language
2026-08-23Last push
Cross-platformPlatform

What it does

A plugin in the Developer category for DeepSeek Harness.

✅
Our take
Works — verified, early-stage project

A plugin in the Developer category for DeepSeek Harness. It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-token-meter-mood

DeepSeek Harness Web GUI 插件:在每条助手回复下方显示该次交互的 token 消耗明细与心情表情。

😄 · 输入 106万6204 · 命中 100万 · 未命中 6万6204 · 输出 3万5000 · 命中率 95%
  • 每次回复(每个回合)单独统计:输入 / 缓存命中 / 未命中 / 输出(中文单位,4 位分组精确显示:190万2900、1亿2900万3999)
  • 表情只按该次回复的输出 token 分级:< 5 万 🥳,510 万 😄,1020 万 🙂,2040 万 😐,4060 万 😕,6080 万 😟,80100 万 😠,> 100 万 😡(红温)
  • 有产物(编辑/写入文件)的回合保留「产物」行,文件可点击打开
  • 有推理 token 时悬停显示「输出 X (含推理 Y)」

安装

前提:本机已运行过 dsh --profile web(profile 目录 ~/.dsh/profiles/web/ 已初始化)。

# 一条命令:安装为 profile 依赖,并自动激活为 profile 图层(host 服务 + 浏览器端一起挂载)
pnpm dsh plugin --profile web add "github:firekula/dsh-token-meter-mood"
# 装过旧版本后更新:
pnpm dsh plugin --profile web update dsh-token-meter-mood

然后重启 dsh --profile web(或刷新页面)。

旧版本(≤0.2.1)缺少 dsh.bundle.patch 声明,安装命令只会把它装成普通依赖、不挂载,需要手工在 ~/.dsh/profiles/web/cordis.patch.yml 里加一行:

- insert:
    - id: token-meter-mood
      name: 'dsh-token-meter-mood'

0.2.2 起不再需要这一步。

刷新页面后,每条已完成的助手回复下方就会出现 token 行。

工作原理

  • Host 半(lib/index.js):一个 TypertRemoteService,通过 @Remote('turnUsage') 暴露按回合折叠用量(与 token-meter 相同的「每步后采样替换」语义),优先读实时会话日志,冷会话回退到 sessionQuery。安装后由 typert-loader 自动注册到网关。
  • 浏览器半(lib/client.js,经 dsh.client 声明被 Web 应用扫描并注入):挂载本包自带的 /remote 贡献,接管 conversation.chat.turnTail 槽位(单赢家链槽,以更高优先级先行接管,并复刻官方「产物」行保证共存)。
  • peerDependencies 全部从本机 DSH 安装解析(profile 的 healed node_modules 兜底),不依赖 npm 发布。

调整表情阈值

修改 src/client/TokenMeterTail.tsx 中 emojiOfOutput 的分档后重新打包提交即可。

重新构建

lib/ 下已提交构建产物,GitHub 安装不需要构建步骤。如需修改后重建:把本仓库放进 deepseek-harness monorepo 的 packages/client/ 下,参照其构建流程执行 tsc(host/client 两个 tsconfig)、typert 生成(package 模式)与 clientBundle 打包,再将产物提交。

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-token-meter-mood for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:firekula/dsh-token-meter-mood

Headless (CLI) profile:

dsh plugin --profile headless add github:firekula/dsh-token-meter-mood

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7819 plugins →