From c4e18f1b63fc2e880baa86befe60ca910135b12b Mon Sep 17 00:00:00 2001 From: pakrym-oai Date: Thu, 4 Dec 2025 08:32:54 -0800 Subject: [PATCH] Slightly better status display for unified exec (#7563) Trim bash -lc --- codex-rs/core/src/unified_exec/session_manager.rs | 7 ++++++- codex-rs/tui/src/exec_cell/render.rs | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/unified_exec/session_manager.rs b/codex-rs/core/src/unified_exec/session_manager.rs index 51e562607..0eab30dce 100644 --- a/codex-rs/core/src/unified_exec/session_manager.rs +++ b/codex-rs/core/src/unified_exec/session_manager.rs @@ -10,6 +10,7 @@ use tokio::time::Duration; use tokio::time::Instant; use tokio_util::sync::CancellationToken; +use crate::bash::extract_bash_command; use crate::codex::Session; use crate::codex::TurnContext; use crate::exec::ExecToolCallOutput; @@ -516,7 +517,11 @@ impl UnifiedExecSessionManager { turn: &Arc, command: &[String], ) { - let command_display = command.join(" "); + let command_display = if let Some((_, script)) = extract_bash_command(command) { + script.to_string() + } else { + command.join(" ") + }; let message = format!("Waiting for `{command_display}`"); session .send_event( diff --git a/codex-rs/tui/src/exec_cell/render.rs b/codex-rs/tui/src/exec_cell/render.rs index a38cf5a84..6517bcf47 100644 --- a/codex-rs/tui/src/exec_cell/render.rs +++ b/codex-rs/tui/src/exec_cell/render.rs @@ -14,6 +14,7 @@ use crate::wrapping::word_wrap_line; use crate::wrapping::word_wrap_lines; use codex_ansi_escape::ansi_escape_line; use codex_common::elapsed::format_duration; +use codex_core::bash::extract_bash_command; use codex_core::protocol::ExecCommandSource; use codex_protocol::parse_command::ParsedCommand; use itertools::Itertools; @@ -58,7 +59,11 @@ pub(crate) fn new_active_exec_command( } fn format_unified_exec_interaction(command: &[String], input: Option<&str>) -> String { - let command_display = command.join(" "); + let command_display = if let Some((_, script)) = extract_bash_command(command) { + script.to_string() + } else { + command.join(" ") + }; match input { Some(data) if !data.is_empty() => { let preview = summarize_interaction_input(data);