From 0de3de185a96922a727e45e3d8d324336f7b5e1f Mon Sep 17 00:00:00 2001 From: pap Date: Thu, 15 Jan 2026 17:51:40 +0000 Subject: [PATCH] simplify --- codex-rs/tui/src/bottom_pane/chat_composer.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/codex-rs/tui/src/bottom_pane/chat_composer.rs b/codex-rs/tui/src/bottom_pane/chat_composer.rs index d2ec8e82b9..4b7adef2d6 100644 --- a/codex-rs/tui/src/bottom_pane/chat_composer.rs +++ b/codex-rs/tui/src/bottom_pane/chat_composer.rs @@ -353,7 +353,7 @@ impl ChatComposer { self.pending_pastes.push((placeholder, pasted)); } else if char_count > 1 // Keep shell commands like `!open /path/to.png` intact (not replacing with [Image]) so they can be run in shell - && !self.is_user_shell_command_input() + && !self.textarea.text().starts_with('!') && self.handle_paste_image_path(pasted.clone()) { self.textarea.insert_str(" "); @@ -389,10 +389,6 @@ impl ChatComposer { } } - fn is_user_shell_command_input(&self) -> bool { - self.textarea.text().starts_with('!') - } - /// Enable or disable paste-burst handling. /// /// `disable_paste_burst` is an escape hatch for terminals/platforms where the burst heuristic