fix: TUI should use cwd from Config (#808)

https://github.com/openai/codex/pull/800 made `cwd` a property of
`Config`, so the TUI should use this instead of running
`std::env::current_dir()`.
This commit is contained in:
Michael Bolin
2025-05-04 11:12:40 -07:00
committed by GitHub
parent 421e159888
commit cd12f0c24a
3 changed files with 8 additions and 18 deletions

View File

@@ -144,18 +144,14 @@ impl HistoryCell {
HistoryCell::BackgroundEvent { lines }
}
pub(crate) fn new_session_info(
config: &Config,
model: String,
cwd: std::path::PathBuf,
) -> Self {
pub(crate) fn new_session_info(config: &Config, model: String) -> Self {
let mut lines: Vec<Line<'static>> = Vec::new();
lines.push(Line::from("codex session:".magenta().bold()));
lines.push(Line::from(vec!["↳ model: ".bold(), model.into()]));
lines.push(Line::from(vec![
"↳ cwd: ".bold(),
cwd.display().to_string().into(),
config.cwd.display().to_string().into(),
]));
lines.push(Line::from(vec![
"↳ approval: ".bold(),