插件目录 / Developer / DSH-Cache-Hit-Precision
DSH-Cache-Hit-Precision
已验证 · 实测可装 luern0313
✓ 持续维护
1Stars
0Forks
0未关闭 issue
—语言
2026-08-16最近推送
跨平台平台
功能简介
dsh状态栏显示两位小数缓存命中率
我们的评价
可用 — 实测通过,早期项目
可用 — 实测通过,早期项目
dsh状态栏显示两位小数缓存命中率 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
DSH-Cache-Hit-Precision
DSH 插件:让状态栏下方的缓存命中率显示两位浮点数
📖 简介
它通过 dsh 的 slot 阴影机制包装原始 StatsLine,仅替换 stats.cacheHit 的本地化参数:从 tokenUsage 投影重新计算精确百分比,再以两位小数输出。
效果:

✨ 特性
- 非侵入:不修改 dsh 安装目录与任何上游包
- 原样保留统计行:轮次、步骤、耗时、TTFT、token 等显示均不变
- 自动跟随当前语言:中文 / English
🚀 快速开始
GitHub 安装
dsh plugin --profile web add github:luern0313/DSH-Cache-Hit-Precision
# 安装后重启:
dsh web
本地安装
git clone https://github.com/luern0313/DSH-Cache-Hit-Precision.git
dsh plugin --profile web add ./DSH-Cache-Hit-Precision
# 安装后重启:
dsh web
手动安装(不使用 pnpm)
mkdir -p ~/.dsh/profiles/web/node_modules
ln -sfn /path/to/DSH-Cache-Hit-Precision ~/.dsh/profiles/web/node_modules/dsh-cache-hit-precision
然后在 ~/.dsh/profiles/web/cordis.patch.yml 末尾追加:
- insert:
- id: cache-hit-precision
name: dsh-cache-hit-precision
重启生效:
dsh web
🧩 工作原理
- 找到
conversation.composer.dock中 id 为stats、优先级为0的原始统计行组件。 - 以相同 id、更低优先级注册一个阴影组件。
- 阴影组件渲染原组件,但拦截
stats.cacheHit:从tokenUsage重新计算缓存命中率,再格式化为两位小数。
📜 开源协议
MIT License
安装
🧩 让 Agent 自动装(推荐)
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 DSH-Cache-Hit-Precision」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:luern0313/DSH-Cache-Hit-Precision Headless(CLI)profile:
dsh plugin --profile headless add github:luern0313/DSH-Cache-Hit-Precision 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。