diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index a4e6542e61..8ddb597a6d 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -10,6 +10,7 @@ use crate::bottom_pane::SelectionItem; use crate::bottom_pane::SelectionViewParams; use crate::bottom_pane::popup_consts::standard_popup_hint_line; use crate::chatwidget::ChatWidget; +use crate::chatwidget::DEFAULT_MODEL_DISPLAY_NAME; use crate::chatwidget::ExternalEditorState; use crate::cwd_prompt::CwdPromptAction; use crate::diff_render::DiffSummary; @@ -740,7 +741,7 @@ impl App { fn insert_startup_header(&mut self, tui: &mut tui::Tui) { let placeholder_style = Style::default().add_modifier(Modifier::DIM | Modifier::ITALIC); let header = Arc::new(history_cell::SessionHeaderHistoryCell::new_with_style( - "loading".to_string(), + DEFAULT_MODEL_DISPLAY_NAME.to_string(), placeholder_style, None, self.config.cwd.clone(), diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index ad91aeffcd..0a32e8be7d 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -152,7 +152,7 @@ use tokio::task::JoinHandle; use tracing::debug; use tracing::warn; -const DEFAULT_MODEL_DISPLAY_NAME: &str = "loading"; +pub(crate) const DEFAULT_MODEL_DISPLAY_NAME: &str = "loading"; const PLAN_IMPLEMENTATION_TITLE: &str = "Implement this plan?"; const PLAN_IMPLEMENTATION_YES: &str = "Yes, implement this plan"; const PLAN_IMPLEMENTATION_NO: &str = "No, stay in Plan mode"; diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs index 9ffa46199f..b547de97c8 100644 --- a/codex-rs/tui/src/history_cell.rs +++ b/codex-rs/tui/src/history_cell.rs @@ -10,6 +10,7 @@ //! bumps the active-cell revision tracked by `ChatWidget`, so the cache key changes whenever the //! rendered transcript output can change. +use crate::chatwidget::DEFAULT_MODEL_DISPLAY_NAME; use crate::diff_render::create_diff_summary; use crate::diff_render::display_path_for; use crate::exec_cell::CommandOutput; @@ -1191,7 +1192,7 @@ impl SessionHeaderHistoryCell { } pub(crate) fn is_loading_placeholder(&self) -> bool { - self.model == "loading" + self.model == DEFAULT_MODEL_DISPLAY_NAME } }