From a2e9cc5530b484e18e8594d0cca1be41baf9275c Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Fri, 12 Sep 2025 16:17:02 -0400 Subject: [PATCH] Update interruption error message styling (#3470) image image --- codex-rs/tui/src/chatwidget.rs | 4 +++- ...s__disabled_slash_command_while_task_running_snapshot.snap | 2 +- codex-rs/tui/src/history_cell.rs | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index f47467e4..5f0eac05 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -289,7 +289,9 @@ impl ChatWidget { /// separated by newlines rather than auto‑submitting the next one. fn on_interrupted_turn(&mut self) { // Finalize, log a gentle prompt, and clear running state. - self.finalize_turn_with_error_message("Tell the model what to do differently".to_owned()); + self.finalize_turn_with_error_message( + "Conversation interrupted - tell the model what to do differently".to_owned(), + ); // If any messages were queued during the task, restore them into the composer. if !self.queued_user_messages.is_empty() { diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__disabled_slash_command_while_task_running_snapshot.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__disabled_slash_command_while_task_running_snapshot.snap index 52b6807b..e8f08a43 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__disabled_slash_command_while_task_running_snapshot.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__disabled_slash_command_while_task_running_snapshot.snap @@ -2,4 +2,4 @@ source: tui/src/chatwidget/tests.rs expression: blob --- -🖐  '/model' is disabled while a task is in progress. +■ '/model' is disabled while a task is in progress. diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs index 42a79d60..e85e0fb1 100644 --- a/codex-rs/tui/src/history_cell.rs +++ b/codex-rs/tui/src/history_cell.rs @@ -1063,8 +1063,7 @@ pub(crate) fn new_error_event(message: String) -> PlainHistoryCell { // Use a hair space (U+200A) to create a subtle, near-invisible separation // before the text. VS16 is intentionally omitted to keep spacing tighter // in terminals like Ghostty. - let lines: Vec> = - vec![vec![padded_emoji("🖐").red().bold(), " ".into(), message.into()].into()]; + let lines: Vec> = vec![vec![format!("■ {message}").red()].into()]; PlainHistoryCell { lines } }