Stage rows show cached share and cost; Changes explain no_patch_reason
Timeline stage rows add the cached share (when cache_known) and a positive cost: 20.1M tokens · 97% cached · $1.42. The file viewer words each server no_patch_reason, keeping the old truncated/binary text as the fallback.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Changes: why a file has no patch
|
||||
|
||||
The server's `FileChange.no_patch_reason` (`binary`, `file_size`, `budget`,
|
||||
`lines`, `evidence_size`, `git_status`, `baseline`) is parsed into
|
||||
`FileChange.noPatchReason` and worded by `noPatchReasonMessage` in
|
||||
`lib/features/changes/domain/change_wording.dart`. The file viewer shows it in
|
||||
place of the generic truncated/binary message. A missing, blank or unknown
|
||||
reason (older server) keeps the old wording. Tests:
|
||||
`test/features/changes/no_patch_reason_test.dart`.
|
||||
@@ -31,8 +31,11 @@ Runs that spend 20M+ tokens now show it the way they show disk size.
|
||||
- Summary: `Size on disk`, `Tokens` (`22.4M · 2.1M fresh, 20.3M cached ·
|
||||
1.8M in, 240K out`; fresh is total minus cache reads, shown only when
|
||||
`cache_known`) and `Cost`.
|
||||
- Stage rows: the Timeline row subtitle adds `· 20.1M tokens`. The visit facts
|
||||
add `Tokens` and `Cost`.
|
||||
- Stage rows: the Timeline row subtitle adds `· 20.1M tokens · 97% cached ·
|
||||
$1.42` (`stageTokenRowLabel`). The cached share (cache reads over the total,
|
||||
rounded) appears only when the stage recorded `cache_known`; the cost only
|
||||
when positive, to two places, `<$0.01` below half a cent. The visit facts
|
||||
add `Tokens` and `Cost` (`Not reported` stays there).
|
||||
- Cost is shown only when a positive `cost_usd` was reported. Subscription
|
||||
models report `cost_known` with no amount, which shows as `Not reported`.
|
||||
The stats page's `Reported cost` uses the same rule.
|
||||
|
||||
Reference in New Issue
Block a user