mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
Point usage and credit links to ChatGPT settings (#49874)
## What changed Replace `https://chatgpt.com/codex/settings/usage` with `https://chatgpt.com/settings/usage` in usage-limit errors, the `/status` card, and backend banner actions. Credit purchase actions retain `?credits_modal=true`. ## Testing Update error-message assertions, banner action tests, status hyperlink assertions, and TUI snapshots to expect the new URL. GitOrigin-RevId: 1e1db971284a25a781120da30a6dea5ff9c3d957
This commit is contained in:
@@ -166,7 +166,7 @@ fn usage_limit_reached_error_formats_plus_plan() {
|
||||
};
|
||||
assert_eq!(
|
||||
err.to_string(),
|
||||
"You’ve hit your usage limit. Upgrade to Pro (https://chatgpt.com/explore/pro), visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again later."
|
||||
"You’ve hit your usage limit. Upgrade to Pro (https://chatgpt.com/explore/pro), visit https://chatgpt.com/settings/usage to purchase more credits or try again later."
|
||||
);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ fn usage_limit_reached_error_formats_rate_limit_reached_types() {
|
||||
let cases = [
|
||||
(
|
||||
RateLimitReachedType::RateLimitReached,
|
||||
"You’ve hit your usage limit. Upgrade to Pro (https://chatgpt.com/explore/pro), visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again later.",
|
||||
"You’ve hit your usage limit. Upgrade to Pro (https://chatgpt.com/explore/pro), visit https://chatgpt.com/settings/usage to purchase more credits or try again later.",
|
||||
),
|
||||
(
|
||||
RateLimitReachedType::WorkspaceOwnerCreditsDepleted,
|
||||
@@ -495,7 +495,7 @@ fn usage_limit_reached_error_formats_pro_plan_with_reset() {
|
||||
rate_limit_reached_type: None,
|
||||
};
|
||||
let expected = format!(
|
||||
"You’ve hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at {expected_time}."
|
||||
"You’ve hit your usage limit. Visit https://chatgpt.com/settings/usage to purchase more credits or try again at {expected_time}."
|
||||
);
|
||||
assert_eq!(err.to_string(), expected);
|
||||
});
|
||||
@@ -517,8 +517,7 @@ fn usage_limit_reached_error_hides_upsell_for_non_codex_limit_name() {
|
||||
..rate_limit_snapshot()
|
||||
})),
|
||||
promo_message: Some(
|
||||
"Visit https://chatgpt.com/codex/settings/usage to purchase more credits"
|
||||
.to_string(),
|
||||
"Visit https://chatgpt.com/settings/usage to purchase more credits".to_string(),
|
||||
),
|
||||
rate_limit_reached_type: None,
|
||||
};
|
||||
@@ -689,7 +688,7 @@ fn usage_limit_reached_includes_hours_and_minutes() {
|
||||
rate_limit_reached_type: None,
|
||||
};
|
||||
let expected = format!(
|
||||
"You’ve hit your usage limit. Upgrade to Pro (https://chatgpt.com/explore/pro), visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at {expected_time}."
|
||||
"You’ve hit your usage limit. Upgrade to Pro (https://chatgpt.com/explore/pro), visit https://chatgpt.com/settings/usage to purchase more credits or try again at {expected_time}."
|
||||
);
|
||||
assert_eq!(err.to_string(), expected);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user