Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Update interruption error message styling (#3470)

Ahmed Ibrahima2e9cc5530b4
diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs
index f47467e4c1..5f0eac0564 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 52b6807b4d..e8f08a437a 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 42a79d60c5..e85e0fb1ee 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<Line<'static>> =
- vec![vec![padded_emoji("🖐").red().bold(), " ".into(), message.into()].into()];
+ let lines: Vec<Line<'static>> = vec![vec![format!("■ {message}").red()].into()];
PlainHistoryCell { lines }
}