Overhaul shell detection and centralize command generation for unified exec (#6577)

This fixes command display for unified exec. All `cd`s and `ls`es are
now parsed.

<img width="452" height="237" alt="image"
src="https://github.com/user-attachments/assets/ce92d81f-f74c-485a-9b34-1eaa29290ec6"
/>

Deletes a ton of tests that were doing nothing from shell.rs.

---------

Co-authored-by: Pavel Krymets <pavel@krymets.com>
This commit is contained in:
pakrym-oaiandPavel Krymets authored and GitHub committed 2025-11-13 08:28:09 -08:00
1 parent ba74cee6f7
commit d28e912214
11 files changed
+284 -412

No files matched your search

+4 -8
View File
@@ -64,10 +64,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: Option<u64>,
pub max_output_tokens: Option<usize>,
pub workdir: Option<PathBuf>,
@@ -105,7 +103,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,
}
@@ -197,9 +195,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,