Chat usage limit: Claude Code-style banner with auto-continue; drop the approaching-limit banner

- The usage-limit banner now reads 'Out of usage credits' (or the refusal's
  own 'You've hit your 5-hour limit'), 'Auto-resuming at <time>', an
  'Auto-continue when limits reset' checkbox and Try again, keeping the
  account switcher's 'Switch to <account>'.
- Auto-continue (a shared, persisted preference, on by default) hands the
  server a durable scheduled prompt (send_at = reset + 1 min) with an
  idempotent auto-continue-<refusal id> operation id: the refused operator
  message again, or 'continue' when the refused turn had already worked.
  Unchecking unqueues it; Try again unqueues it and sends now.
- Remove the approaching-limit banner, its SnackBar announcements and their
  marks; the send-button usage ring replaces them.
- Claude Code's rate_limit_event overage fields (overageStatus,
  isUsingOverage/overageInUse, overageDisabledReason, overageResetsAt) reach
  clients as usage.account.extra_usage; the ring tooltip and the banner say
  'Extra usage available' or 'Using extra usage'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 16:13:33 +00:00
parent 7a259d8f60
commit 293474ac3c
22 changed files with 905 additions and 1254 deletions
+7
View File
@@ -523,6 +523,13 @@ they were. No quota is estimated and no model call is made to obtain one.
`switched_at` (epoch ms) marks a report sent after the operator switched the
chat's Claude account: it replaces the previous account's report even with no
windows yet, and a usage-limit refusal received before it no longer applies.
`extra_usage` is Claude Code's extra usage ("overage", paid usage credits past
the subscription limits) from the same events, kept until a later event says
otherwise: `{"status","in_use","disabled_reason","resets_at"}`, where `status`
is its `overageStatus` (`allowed`, `allowed_warning`, `rejected`) and
`disabled_reason` its `overageDisabledReason` (e.g. `out_of_credits`). It is
informational: Claude Code offers no stream-json request to turn extra usage on
or to use a limit reset, so the server never applies one.
### Claude account switching