Commit Graph

2 Commits

Author SHA1 Message Date
Brooklyn Nicholson
d0e40fff3c feat(usage): report credential-pool usage per account 2026-10-05 14:02:38 -05:00
Brooklyn Nicholson
38d19b92e8 feat(desktop): a progress chip warns before a subscription hits its usage wall
The provider heading's status slot now shows a fuel gauge for the
tightest usage window: hidden while there's room, "17% left · resets
3:00 PM" at 20% or less (amber from 10%), with a bar along its bottom
edge for what's left, then the existing "Limited until" once the login
is out. Hovering lists every window (5-hour, weekly, per-family).

model.options attaches `usage: { windows }` from a per-profile cache in
agent/account_usage_cache.py and refreshes it in the background, so the
picker never waits on a usage API. Every fetch_account_usage call lands
in that cache, including the one session.usage runs after each turn, so
the chip is at most a turn or two minutes behind. Covers the built-in
fetchers (Anthropic, Codex, OpenRouter) and any provider plugin's usage
hook.

Both pickers now render one ProviderStatusChip instead of separate
limit badges.
2026-10-05 12:21:38 -05:00