Cloud stats: the CLI now reports Anthropic prompt-caching breakdown (cache-creation and cache-read token counts) alongside the existing input/output/cost totals, so the dashboard can show "saved $X with caching" for CLI and VS Code (ACP) sessions.
Changed
-
Cache token reporting in cloud stats.
StatsPayload
(src/utils/codeepCloud.ts) now carries optional
cacheCreationTokens/cacheReadTokens. The threereportStats
call sites —src/renderer/main.ts(sync and async paths) and
src/renderer/agentExecution.ts— pass through the per-model
buckets fromgetCostBreakdown(), andgetSessionStats()exposes
session-totals via newtotalCacheCreationTokens/
totalCacheReadTokensfields. The ACP server (src/acp/server.ts)
— the path VS Code uses — was updated in lockstep so both clients
report the same shape.Why:
estimatedCostalready folded cache multipliers into the
dollar total, but the raw cache counts were dropped on the floor,
so the dashboard couldn't break out "this session read 500k tokens
from cache." Now it can. -
ProviderCostBreakdownandSessionTokenStatsextended. Both
interfaces gainedcacheCreationTokens/cacheReadTokens
(required on the breakdown, since every provider reports something
— 0 for non-caching).getCostBreakdown()accumulates them per
provider/model group;getSessionStats()sums across all records.
Two new tests cover the accumulation paths.