diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index ee54eac35f..21c1c1ceff 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -3304,8 +3304,8 @@ mod tests { use crate::file_search::FileSearchManager; use crate::history_cell::AgentMessageCell; use crate::history_cell::HistoryCell; + use crate::history_cell::SessionHeaderHistoryCell; use crate::history_cell::UserHistoryCell; - use crate::history_cell::new_session_info; use codex_core::CodexAuth; use codex_core::config::ConfigBuilder; use codex_core::config::ConfigOverrides; @@ -3686,12 +3686,12 @@ mod tests { network_proxy: None, rollout_path: Some(PathBuf::new()), }; - Arc::new(new_session_info( - app.chat_widget.config_ref(), - app.chat_widget.current_model(), - event, - is_first, - None, + let _ = is_first; + Arc::new(SessionHeaderHistoryCell::new( + event.model, + event.reasoning_effort, + event.cwd, + crate::version::CODEX_CLI_VERSION, )) as Arc }; @@ -4183,12 +4183,12 @@ mod tests { network_proxy: None, rollout_path: Some(PathBuf::new()), }; - Arc::new(new_session_info( - app.chat_widget.config_ref(), - app.chat_widget.current_model(), - event, - is_first, - None, + let _ = is_first; + Arc::new(SessionHeaderHistoryCell::new( + event.model, + event.reasoning_effort, + event.cwd, + crate::version::CODEX_CLI_VERSION, )) as Arc }; diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs index 450c212228..24bdfe18d3 100644 --- a/codex-rs/tui/src/history_cell.rs +++ b/codex-rs/tui/src/history_cell.rs @@ -1037,33 +1037,6 @@ impl HistoryCell for SessionInfoCell { } } -#[cfg(test)] -pub(crate) fn new_session_info( - config: &Config, - requested_model: &str, - event: SessionConfiguredEvent, - is_first_event: bool, - auth_plan: Option, -) -> SessionInfoCell { - // Header box rendered as history (so it appears at the very top) - let header = SessionHeaderHistoryCell::new( - event.model.clone(), - event.reasoning_effort, - config.cwd.clone(), - CODEX_CLI_VERSION, - ); - let mut parts: Vec> = vec![Box::new(header)]; - parts.extend(session_info_body_parts( - config, - requested_model, - &event, - is_first_event, - auth_plan, - )); - - SessionInfoCell(CompositeHistoryCell { parts }) -} - pub(crate) fn new_session_info_body( config: &Config, requested_model: &str,