Update interruption error message styling (#3470)

<img width="497" height="76" alt="image"
src="https://github.com/user-attachments/assets/a1ad279d-1d01-41cd-ac14-b3343a392563"
/>

<img width="493" height="74" alt="image"
src="https://github.com/user-attachments/assets/baf487ba-430e-40fe-8944-2071ec052962"
/>
This commit is contained in:
Ahmed Ibrahim
2025-09-12 16:17:02 -04:00
committed by GitHub
parent ea225df22e
commit a2e9cc5530
3 changed files with 5 additions and 4 deletions

View File

@@ -289,7 +289,9 @@ impl ChatWidget {
/// separated by newlines rather than autosubmitting 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() {

View File

@@ -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.

View File

@@ -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 }
}