mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Tailor TUI cyber refusal notices to Daybreak eligibility (#42667)
## What changed - Prefetch ChatGPT account eligibility in the background and cache it across TUI widget replacements. - Show an application link when Daybreak is available but not enabled, an Astra-specific explanation for unsupported models, and neutral copy when access is already present or eligibility cannot be determined. - Refresh eligibility after account changes and reconnects without changing the selected model or delaying refusal handling. ## Testing - Cover eligibility responses, account changes, model-specific notices, fallback behavior, and rendered notice snapshots. GitOrigin-RevId: 7ae8613a946cb46b8f0b46bf47e5e15ae258ed86
This commit is contained in:
1 parent
a7ab2d66d7
commit
ff2f01b0c2
21 files changed
+469
-80
No files matched your search
@@ -244,6 +244,7 @@ impl App {
|
||||
self.rate_limit_refresh_state.invalidate_recovery();
|
||||
session.inherit_task_tool_capabilities(app_server);
|
||||
*app_server = session;
|
||||
self.chat_widget.cyber_policy_notice = Default::default();
|
||||
self.chat_widget.requires_openai_auth = bootstrap.requires_openai_auth;
|
||||
self.chat_widget.remote_connection =
|
||||
crate::status::remote_connection::remote_connection_status_value(
|
||||
@@ -389,6 +390,13 @@ impl App {
|
||||
bootstrap.has_chatgpt_account,
|
||||
matches!(bootstrap.auth_mode, Some(TelemetryAuthMode::Chatgpt)),
|
||||
);
|
||||
if self.chat_widget.has_chatgpt_account() {
|
||||
crate::daybreak::prefetch_notice(
|
||||
&self.config,
|
||||
app_server,
|
||||
self.chat_widget.cyber_policy_notice.clone(),
|
||||
);
|
||||
}
|
||||
self.feedback_audience = bootstrap.feedback_audience;
|
||||
self.chat_widget.add_info_message(
|
||||
"Reconnected. No input was resent. Review uncertain submissions before retrying; recovered queues remain paused.".into(), /*hint*/ None,
|
||||
|
||||
Reference in new issue
Block a user