mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
simplify
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user