mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
Suppress rate-limit model nudge when credits exist
This commit is contained in:
@@ -2427,7 +2427,14 @@ impl ChatWidget {
|
||||
.map(|w| w.used_percent >= RATE_LIMIT_SWITCH_PROMPT_THRESHOLD)
|
||||
.unwrap_or(false));
|
||||
|
||||
let has_workspace_credits = snapshot
|
||||
.credits
|
||||
.as_ref()
|
||||
.map(|credits| credits.has_credits)
|
||||
.unwrap_or(false);
|
||||
|
||||
if high_usage
|
||||
&& !has_workspace_credits
|
||||
&& !self.rate_limit_switch_prompt_hidden()
|
||||
&& self.current_model() != NUDGE_MODEL_SLUG
|
||||
&& !matches!(
|
||||
|
||||
Reference in New Issue
Block a user