summaryrefslogtreecommitdiffhomepage
path: root/src/features/views/logic
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-10 10:34:37 +0900
committerAdam Malczewski <[email protected]>2026-06-10 10:34:37 +0900
commit078158e591c3c04f2d2b5718e4626a91ab493df5 (patch)
tree6404b4b611578bb86601bd1681f026648cde1e85 /src/features/views/logic
parente8d19f077d315f212c1bd6fb0d86738fad188b3c (diff)
downloaddispatch-web-078158e591c3c04f2d2b5718e4626a91ab493df5.tar.gz
dispatch-web-078158e591c3c04f2d2b5718e4626a91ab493df5.zip
feat(metrics): inline cache hit-rate badges (last turn + chat total)
Derive cache hit rate (cacheReadTokens / inputTokens) from data already folded in core/metrics — no backend/contract change. - core/metrics: computeCachePct + viewCacheRate (pct + success/warning/error level by 66/33 thresholds + isHit); thread a running cumulativeUsage onto each finalized turn-metrics row for the conversation total. - ChatView: render two labelled, colour-coded percentage badges in the turn-total bubble — "Last turn:" (that turn) and "Chat Total:" (cumulative). - Honour backend caveats: absent cache fields -> 0, divide-by-zero guarded, a legitimate 0% renders plainly (not "no data").
Diffstat (limited to 'src/features/views/logic')
0 files changed, 0 insertions, 0 deletions