From 0e37f742e32087a245e7ba83cd99bad7e9e1bb04 Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Sun, 4 Jan 2026 23:37:54 -0800 Subject: [PATCH] feat: improve interrupt message (#468) Co-authored-by: Letta --- src/cli/App.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/cli/App.tsx b/src/cli/App.tsx index 3ac132a..1ec84d5 100644 --- a/src/cli/App.tsx +++ b/src/cli/App.tsx @@ -171,6 +171,10 @@ const EAGER_CANCEL = true; // Maximum retries for transient LLM API errors (matches headless.ts) const LLM_API_ERROR_MAX_RETRIES = 3; +// Message shown when user interrupts the stream +const INTERRUPT_MESSAGE = + "Interrupted – tell the agent what to do differently. Something went wrong? Use /feedback to report the issue."; + // tiny helper for unique ids (avoid overwriting prior user lines) function uid(prefix: string) { return `${prefix}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`; @@ -1425,7 +1429,7 @@ export default function App({ } else { // Regular user cancellation - show error if (!EAGER_CANCEL) { - appendError("Stream interrupted by user", true); + appendError(INTERRUPT_MESSAGE, true); } } @@ -2143,7 +2147,7 @@ export default function App({ // Show interrupt feedback (yellow message if no tools were cancelled) if (!toolsCancelled) { - appendError("Stream interrupted by user", true); + appendError(INTERRUPT_MESSAGE, true); } if (abortControllerRef.current) { @@ -2198,7 +2202,7 @@ export default function App({ // since the tool result will show "Interrupted by user") setStreaming(false); if (!toolsCancelled) { - appendError("Stream interrupted by user", true); + appendError(INTERRUPT_MESSAGE, true); } refreshDerived();