Require confirmation for safety-buffered retries (#42380)

## What changed

- Show a confirmation before stopping a safety-buffered attempt and retrying
  with the server-selected faster model.
- Explain that the retry starts a new thread, preserves actions already taken,
  and may use a less capable model; allow the user to keep waiting instead.
- Dismiss the buffering or confirmation view when the response starts or the
  turn is no longer eligible for retry.
- Refresh the buffering copy and wrap confirmation text correctly in narrow
  terminals.

## Testing

- Cover retry confirmation, cancellation, turn completion, response startup,
  stale updates, and narrow-terminal rendering.

GitOrigin-RevId: 013bc47174811dd104b421774577c2808c732bfa
This commit is contained in:
Eric Traut authored and copyberry committed 2026-09-02 22:49:48 +00:00
1 parent 69cebb5d15
commit 0588fc941c
12 files changed
+287 -34

No files matched your search

+9
View File
@@ -300,6 +300,15 @@ pub(crate) enum AppEvent {
op: AppCommand,
},
/// Confirm retrying a safety-buffered turn with the server-selected model.
ConfirmSafetyBufferedRetry {
thread_id: ThreadId,
turn_id: String,
model: String,
turn: AppCommand,
prompt: UserMessage,
},
/// Interrupt, fork, and retry a safety-buffered turn with the server-selected model.
RetrySafetyBufferedTurn {
thread_id: ThreadId,