Eric Traut
aee8a55ab6
Show task tokens and usage estimates in the agent command center ( #44970 )
...
## What changed
- Display input/output token counts and estimated credits and USD cost in task details. Prefer live token totals, falling back to complete totals from usage breakdowns.
- Fetch estimates for the selected task on a one-minute cadence for supported Business and Enterprise plans. Cache results, preserve prior nonzero estimates when a response reports zero, and stop fetching when the capability is unavailable.
- Clear cached usage and discard pending results on account changes, reconnects, or missed server events. Prioritize activity and usage over the original prompt when space is limited.
## Testing
Add a rendering snapshot and tests covering caching, stale results, unavailable usage, token resets, and incomplete usage breakdowns.
GitOrigin-RevId: b72c96053557389fdc723a70fab0dab841a52e49
2026-09-12 04:29:48 +00:00
..
2026-09-12 04:29:48 +00:00
2026-09-12 04:28:14 +00:00
2026-07-17 23:19:12 +00:00
2026-08-31 21:36:49 +00:00
2026-09-03 06:02:25 +00:00
2026-09-02 02:09:35 +00:00
2026-08-26 23:58:10 +00:00
2026-09-10 06:06:21 +00:00
2026-09-11 06:34:46 +00:00
2026-09-12 04:29:48 +00:00
2026-09-10 21:42:01 +00:00
2026-09-12 04:29:48 +00:00
2026-09-10 21:42:01 +00:00
2026-09-12 02:24:02 +00:00
2026-09-12 02:24:02 +00:00
2026-09-12 02:24:02 +00:00
2026-09-12 04:29:48 +00:00
2026-09-12 04:29:48 +00:00
2026-09-12 04:29:48 +00:00
2026-09-12 04:29:48 +00:00
2026-09-12 04:29:48 +00:00
2026-09-12 04:29:48 +00:00
2026-09-11 20:27:37 +00:00
2026-09-12 04:29:48 +00:00
2026-09-08 05:39:17 +00:00
2026-09-02 21:50:51 +00:00
2026-09-12 04:29:48 +00:00
2026-09-12 00:20:30 +00:00
2026-08-17 19:11:34 +00:00
2026-08-17 19:11:34 +00:00
2026-09-12 04:29:48 +00:00
2026-09-01 00:02:38 +00:00
2026-09-05 22:16:26 +00:00
2026-09-05 22:16:26 +00:00
2026-08-23 01:29:48 +00:00
2026-09-07 19:01:08 +00:00
2026-09-07 19:01:08 +00:00
2026-09-07 19:01:08 +00:00
2026-06-03 20:30:15 -03:00
2026-09-03 20:25:59 +00:00
2026-09-11 07:13:19 +00:00
2026-09-04 21:17:25 +00:00
2026-09-11 17:08:59 +00:00
2026-09-07 20:25:30 +00:00
2026-09-04 00:23:45 +00:00
2026-09-11 00:59:27 +00:00
2026-09-08 05:12:10 +00:00
2026-09-07 03:19:57 +00:00
2026-09-02 04:20:38 +00:00
2026-09-12 00:20:30 +00:00
2026-08-05 04:54:33 +00:00
2026-09-02 21:50:51 +00:00
2026-09-11 06:56:37 +00:00
2026-09-10 19:14:57 +00:00
2026-09-08 21:41:02 +00:00
2026-09-08 03:15:37 +00:00
2026-09-02 04:20:38 +00:00
2026-09-12 04:29:48 +00:00
2026-09-03 00:36:29 +00:00
2026-09-02 04:20:38 +00:00
2026-09-02 04:20:38 +00:00
2026-09-11 07:13:19 +00:00
2026-08-04 19:12:46 +00:00
2026-09-07 03:19:57 +00:00
2026-09-08 04:35:21 +00:00
2026-09-12 00:20:30 +00:00
2026-09-07 06:43:23 +00:00
2026-09-10 21:42:01 +00:00
2026-09-09 17:56:33 +00:00
2026-09-03 20:25:59 +00:00
2026-09-11 23:44:29 +00:00
2026-09-09 02:26:50 +00:00
2026-09-12 00:22:04 +00:00
2026-08-25 03:08:33 +00:00
2026-08-17 21:03:06 +00:00
2026-09-10 15:52:09 +00:00
2026-08-18 18:50:58 +00:00
2026-09-11 06:56:37 +00:00
2026-09-07 04:59:12 +00:00
2026-09-12 00:22:04 +00:00
2026-09-04 12:20:57 +00:00
2026-09-04 12:20:57 +00:00
2026-09-08 03:15:37 +00:00
2026-09-02 04:20:38 +00:00
2026-09-08 05:12:10 +00:00
2026-09-08 05:12:10 +00:00
2026-09-08 05:39:17 +00:00
2026-09-08 05:39:17 +00:00
2026-09-08 05:39:17 +00:00
2026-09-08 05:39:17 +00:00
2026-09-11 17:08:59 +00:00