TestStatusBarShowsBudgetFromHeaders: the pass segment renders whenever X-Budget-Remaining arrives: the header is the only signal, no profile gating. The percent is rounded to a whole number so it doesn't jitter on every token.
(t *testing.T)
| 1356 | // TestHumanTokensFormat: the session counter renders compactly: plain int under |
| 1357 | // 1000, then `k`/`M` with a constant single decimal. The decimal is always kept |
| 1358 | // (`2.0k`, not `2k`) so the live counter doesn't jump width as it ticks past a |
| 1359 | // round thousand. |
| 1360 | func TestHumanTokensFormat(t *testing.T) { |
| 1361 | cases := []struct { |
| 1362 | n int |
| 1363 | want string |
| 1364 | }{ |
| 1365 | {0, "0 tok"}, |
| 1366 | {1, "1 tok"}, |