[tui] Show speed in session header (#13446)

- add a speed row to the startup/session header under the model row
- render the speed row with the same styling pattern as the model row,
using /fast to change
- show only Fast or Standard to users and update the affected snapshots

---------

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
pash-openai
2026-03-05 00:00:16 -08:00
committed by GitHub
parent 03d55f0e6f
commit 1ce1712aeb
7 changed files with 119 additions and 4 deletions

View File

@@ -1224,6 +1224,7 @@ impl ChatWidget {
self.sync_fast_command_enabled();
self.sync_personality_command_enabled();
let startup_tooltip_override = self.startup_tooltip_override.take();
let show_fast_status = self.should_show_fast_status(event.service_tier);
let session_info_cell = history_cell::new_session_info(
&self.config,
&model_for_header,
@@ -1233,6 +1234,7 @@ impl ChatWidget {
self.auth_manager
.auth_cached()
.and_then(|auth| auth.account_plan_type()),
show_fast_status,
);
self.apply_session_info_cell(session_info_cell);
@@ -7221,6 +7223,15 @@ impl ChatWidget {
self.config.service_tier
}
pub(crate) fn should_show_fast_status(&self, service_tier: Option<ServiceTier>) -> bool {
matches!(service_tier, Some(ServiceTier::Fast))
&& self
.auth_manager
.auth_cached()
.as_ref()
.is_some_and(CodexAuth::is_chatgpt_auth)
}
fn fast_mode_enabled(&self) -> bool {
self.config.features.enabled(Feature::FastMode)
}
@@ -7555,6 +7566,7 @@ impl ChatWidget {
DEFAULT_MODEL_DISPLAY_NAME.to_string(),
placeholder_style,
None,
false,
config.cwd.clone(),
CODEX_CLI_VERSION,
))