mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Show actionable rate-limit banners in the TUI (#41742)
## What changed - Carry optional backend-owned banner and account identity data through `account/rateLimits/read`, filtering banners that do not match the authenticated account and user. - Render supported rate-limit notices above the composer with actions for usage, credits, resets, owner notifications, and plan management while preserving the existing fallback UI for absent or unsupported banners. - Refresh usage after limit errors, reject stale responses, and keep queued input paused until recovery completes. When instructed by the banner, switch to the first available fallback model without changing unrelated thread settings. ## Testing - Add protocol, banner parsing and rendering, CTA, identity filtering, refresh ordering, fallback-model, account-change, and queued-input recovery coverage. GitOrigin-RevId: e03d75a82e425deb87f4b120a71cf2286c0ef6cc
This commit is contained in:
committed by
copyberry
parent
94cbbddafc
commit
79b04f1ab5
@@ -42,6 +42,8 @@ pub(super) struct InputQueueState {
|
||||
/// fresh user turn instead of restoring them into the composer.
|
||||
pub(super) submit_pending_steers_after_interrupt: bool,
|
||||
pub(super) suppress_queue_autosend: bool,
|
||||
/// Hold submissions while a usage failure or backend-directed model fallback is resolved.
|
||||
pub(super) rate_limit_recovery_pending: bool,
|
||||
}
|
||||
|
||||
impl InputQueueState {
|
||||
@@ -57,6 +59,7 @@ impl InputQueueState {
|
||||
self.rejected_steer_history_records.clear();
|
||||
self.pending_steers.clear();
|
||||
self.submit_pending_steers_after_interrupt = false;
|
||||
self.rate_limit_recovery_pending = false;
|
||||
}
|
||||
|
||||
pub(super) fn preview(&self) -> PendingInputPreview {
|
||||
|
||||
Reference in New Issue
Block a user