dsh-cache-hit-decimal
Manifest validTwo-decimal cache-hit rate for the DeepSeek Harness Web GUI
dsh-cache-hit-decimal
Discontinued (2026-09-12) — the official client now does this. DeepSeek Harness renders the cache-hit rate with two decimals on its own: the official
@deepseek-ai/dsh-client-ui-chatpackage ships thecache-hit-2dpformatting (verified in0.1.5-rc.2) and uses it in both the composer stats line and the turn-usage panel. That was this plugin's only purpose, so it is redundant now — this repository is no longer updated and no further versions will be published. The last published release (0.2.0) stays on npm for older runtimes; everything below is kept for reference.
A small DeepSeek Harness Web plugin that replaces the native integer cache-hit percentage with a two-decimal value, such as 42.86%.

It shadows the existing stats cell in conversation.composer.dock instead of patching the official conversation package. Removing the plugin restores the native integer display.
Install
dsh plugin --profile web add @yuuu0109/dsh-cache-hit-decimal
Restart the dsh web process and refresh the browser.
Update
dsh plugin --profile web update @yuuu0109/dsh-cache-hit-decimal
Restart dsh web and refresh the browser. If a configured npm mirror has not synced the latest version yet, use the official registry:
dsh plugin --profile web update @yuuu0109/dsh-cache-hit-decimal --registry=https://registry.npmjs.org/
pnpm 11 may delay newly published versions for 24 hours. To update immediately:
dsh plugin --profile web update @yuuu0109/dsh-cache-hit-decimal@0.2.1 --config.minimumReleaseAge=0
Install from source
git clone https://github.com/Yuuu0109/dsh-cache-hit-decimal.git
cd dsh-cache-hit-decimal
pnpm install
pnpm build
dsh plugin --profile web add .
Changelog
0.2.1
Fixes the line being invisible on current DeepSeek Harness (verified against 0.1.5-rc.1), and makes the two-decimal promise actually hold.
- Fixed the module-graph direction, which hid the whole line.
dsh.client.injectlisted renderer / session / conversation / chat / primitives, butconversation.composer.dockis declared bydsh-client-ui-conversation, anduseChatis a conversation standard prop. The plugin loaded underchat, whileconversationonly mergesrenderer/session/ui-conversation— so the slot was never declared, registration threwslot "conversation.composer.dock" is not declared, and the entry failed to activate.injectis now["@deepseek-ai/dsh-client-ui-conversation", "@deepseek-ai/dsh-client-ui-chat"]. - Fixed the i18n keys, which rendered as raw text. The plugin registered with
locale: 'chat'and readstats.llm,stats.toolCall,stats.ttftAverage,stats.tokensPerSecondandstats.tokens. None of those exist in the Chat dictionary, and the locale runtime returns the key itself for an unknown key, so the line printed literalstats.llm · stats.toolCall. It now owns acache-hit-decimalnamespace (zh/en) registered at apply time, with a built-in dictionary fallback. - The cache-hit rate now really shows two decimals.
cacheHitPercentreturned anumber, andt('stats.cacheHit', { percent })stringified it — so60.00was rendered as60, and42.86%was never two decimals. It now returns formatted text. - Never rounds a partial hit up to
100.00.Math.round(hit / total * 10000) / 100turns 99.997% into 100.00, which defeats the purpose of a cache-hit readout. Ported the officialformatCacheHitPercentalgorithm: an integer binary search for the exact hundredths, plus the honesty rule that keeps a partial hit below 100 at the cost of extra digits. - Dropped the
@deepseek-ai/dsh-client-ui-primitivesdependency. The hover tooltip now rides a nativetitleattribute. - Renders in more compositions. A
tokenUsagevalue now shows the token groups even when thesessionStatsprojection is absent (0.2.0 rendered nothing in that case), and a missing locale service falls back to the built-in dictionary.
0.2.0
- Adapted to DeepSeek Harness
0.1.2-alpha.4: dependencies and peers moved from0.1.0-rc.6to0.1.2-alpha.4. - The stats line now reads the host-computed
sessionStatsandtokenUsageprojections through the standard session hooks (useProjection/useChat), with the legacy node fold kept as fallback. - Slot registration updated to the current list-slot contract (
id/order/priority,locale: 'chat'); the nativestatscell is still shadowed at priority-1, and removing the plugin restores the integer display.
0.1.4
- Display the full stats line on one centered row without wrapping or an ellipsis.
0.1.3
- Display the cache-hit rate with two decimal places.
Uninstall
dsh plugin --profile web remove @yuuu0109/dsh-cache-hit-decimal
Restart dsh web. The native integer StatsLine becomes the active slot occupant again.
Development
pnpm typecheck
pnpm test
pnpm build
Compatibility is pinned to DeepSeek Harness 0.1.5-rc.1 (client packages 0.1.5-rc.2) and React 18.
This is an independent community plugin and is not part of the official DeepSeek Harness repository.
Comments
Loading…
Similar plugins
by noone89A
为 DeepSeek Harness Web UI 提供精确缓存命中率、token 用量与费用估算
★ 4
MIT
TypeScript
Aug 15, 2026
dsh plugin --profile web add dsh-gaugeby Cheng-cheng9669
DSH client plugin: render the built-in session cache-hit percentage with three decimal places.
★ 3
MIT
JavaScript
Aug 15, 2026
dsh plugin --profile web add dsh-cache-precisionby sqs404
DeepSeek Harness sidebar cache hit-rate widget (dsh-plugin): live context-cache hit ratio, segmented hit/miss/write bar, rate-state coloring, last-call rate. 侧边栏缓存命中率显示插件
★ 0
MIT
JavaScript
Aug 16, 2026
dsh plugin --profile web add @deepseek-ai/dsh-client-ui-cache-hitby cute-baobao
DeepSeek Harness usage recorder plugin: per-model hourly token usage (input/output/cache hits) with a stacked bar chart dashboard in the Web GUI.
★ 3
↓ 124/wk
MIT
TypeScript
Aug 14, 2026
dsh plugin --profile web add @dsh-usage-meter/usageby EricXu20266
DeepSeek Harness (DHS) Electron GUI client — webui to gui, kernel untouched
★ 8
↓ 11/wk
MIT
TypeScript
Aug 18, 2026
dsh plugin --profile web add dsh-discoveryby uckkk
码率选择
★ 0
MIT
JavaScript
Aug 20, 2026
dsh plugin --profile web add dsh-bitrate-choice