mirror of
https://github.com/openai/codex.git
synced 2026-09-16 12:13:30 +00:00
cleanup
This commit is contained in:
@@ -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>
|
||||
};
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user