Revert "Revert "Overhaul shell detection and centralize command generation for unified exec"" (#6607)

Reverts openai/codex#6606
This commit is contained in:
pakrym-oai
2025-11-13 16:45:17 -08:00
committed by GitHub
Unverified
parent db2aa57d73
commit 7b027e7536
11 changed files with 300 additions and 412 deletions
+4 -8
View File
@@ -63,10 +63,8 @@ impl UnifiedExecContext {
}
#[derive(Debug)]
pub(crate) struct ExecCommandRequest<'a> {
pub command: &'a str,
pub shell: &'a str,
pub login: bool,
pub(crate) struct ExecCommandRequest {
pub command: Vec<String>,
pub yield_time_ms: u64,
pub max_output_tokens: Option<usize>,
pub workdir: Option<PathBuf>,
@@ -104,7 +102,7 @@ struct SessionEntry {
session_ref: Arc<Session>,
turn_ref: Arc<TurnContext>,
call_id: String,
command: String,
command: Vec<String>,
cwd: PathBuf,
started_at: tokio::time::Instant,
}
@@ -193,9 +191,7 @@ mod tests {
.unified_exec_manager
.exec_command(
ExecCommandRequest {
command: cmd,
shell: "/bin/bash",
login: true,
command: vec!["bash".to_string(), "-lc".to_string(), cmd.to_string()],
yield_time_ms,
max_output_tokens: None,
workdir: None,