AI Agent Hub
Back to plugins
DSH-Cache-Hit-Precision preview

DSH-Cache-Hit-Precision

Client Updated 2026.08.16

Run the following command in DeepSeek Harness:

dsh plugin install luern0313/DSH-Cache-Hit-Precision

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install luern0313/DSH-Cache-Hit-Precision in your terminal to install the plugin; the source code is available at https://github.com/luern0313/DSH-Cache-Hit-Precision.

About this plugin

The DSH client status bar shows the cache hit rate with limited precision by default. For developers who need to precisely evaluate their caching strategy, a rough integer or one-decimal display simply is not enough. DSH-Cache-Hit-Precision fills that small precision gap: it makes stats.cacheHit consistently render as a two-decimal floating-point number, so every cache hit is visible at a finer granularity.

Under the hood, the plugin works entirely through dsh's slot shadowing mechanism. It locates the original stats line (id: stats, priority: 0) inside conversation.composer.dock and registers a shadow component with the same id but a lower priority. The shadow renders every field as-is—rounds, steps, duration, TTFT, token counts—and only intercepts stats.cacheHit, recalculating a precise percentage from the tokenUsage projection and formatting it to two decimal places. Nothing is written into the dsh installation directory and no upstream package is touched; removing the plugin restores the default behaviour instantly.

If you frequently watch the DSH status bar to gauge caching performance but do not want to modify core configuration for a single decimal place, this plugin is a near-zero-cost option: lightweight, plug-and-play, and it automatically follows the active UI language (Chinese / English).

Screenshots

Use Cases

  • Observe per-session cache hit rate changes with two-decimal precision during tuning
  • Compare cache efficiency differences across prompt templates
  • Track DSH session cache performance over time without modifying core configuration

Best For

  • DSH users who need two-decimal precision on cache hit rate
  • Users who prefer plugin-based enhancements over modifying DSH installation directories
  • Cross-language users who need automatic UI language following