10049b8062
Usage frames carry optional usage.account {harness, source, plan, as_of,
windows[{id,label,used_percent,resets_at}], unsupported}. Claude Code quota
comes from its rate_limit_event stream lines and the initialize account
(plan), shared across chats on the same account. Codex reads
account/rateLimits/read once per connection (re-read when a chat opens after
5 min) and merges account/rateLimits/updated. OpenCode exposes no quota API
and says so. The app's chat info sheet shows an Account usage section with a
progress bar and reset countdown per window, Material and Cupertino.
14 lines
775 B
Markdown
14 lines
775 B
Markdown
# Chat info: account usage
|
|
|
|
The chat information sheet shows an "Account usage" section from
|
|
`usage.account` (wire shape in docs/cli.md): one LinearProgressIndicator per
|
|
reported window ("42% used · resets in 2h 14m"), the plan and "as of <age>".
|
|
Cupertino draws the same indicator in system fill/tint colors, since Cupertino
|
|
has no linear progress control. An unknown quota hides the section; OpenCode
|
|
(no quota API) shows "Not reported by OpenCode". Countdowns tick every 30 s.
|
|
|
|
Evidence: `test/features/chat/conversation/chat_account_usage_test.dart`
|
|
(both hosts), and captures from the probe fixture with `?chats=1"a=claude`
|
|
or `quota=opencode` (`tool/perf/perf_fixture.dart`), opened at
|
|
`/chat/perf-chat-0` and clicking the title, 560x1000, Material and Cupertino.
|