summaryrefslogtreecommitdiffhomepage
path: root/src/features/chat/ui/CacheTimerBadge.svelte
AgeCommit message (Collapse)Author
8 daysfix(chat): cache timer no longer stalls transcript renderingAdam Malczewski
The live CacheTimerBadge effect read the `current` state it wrote, so on a real (advancing) clock it re-ran itself until Svelte threw effect_update_depth_exceeded, aborting the reactive flush — turn data rendered late. The effect now uses locals and never reads its own write. Also: drop the timer icon (time only), and size step-line timers xs to match the step cache badge (turn lines stay sm).
8 daysfeat(chat): cache timer for Claude Code subscription modelsAdam Malczewski
Per-step and per-turn timers for the gaps between model requests (the Claude prompt cache expires after 5 min idle). A step gap runs live under the executing tools from step-complete until its last tool result (or the next step's output), then is stamped on that step's metrics line beside its cache badge. A turn gap runs live on the turn's metrics line from done/error until the next message is sent, then is stamped there. Counts m:ss up to 10 min, then '10+ min'; colour tracks the 5-min TTL. Gated on claude/<model>. Pure reducer in core/metrics/cache-timer.ts; the turn gap is seeded from an idle conversation's lastActivityAt so it survives a reload. Stamps are in-memory only.