This commit is contained in:
Roy Han
2026-02-26 20:59:07 -08:00
parent bee23c7917
commit d927cea570
2 changed files with 13 additions and 40 deletions

View File

@@ -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<dyn HistoryCell>
};
@@ -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<dyn HistoryCell>
};

View File

@@ -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<PlanType>,
) -> 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<Box<dyn HistoryCell>> = 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,