Offer safer rewrites after safety blocks in the TUI (#57365)

## What changed

- Show selectable safer follow-ups alongside safety-block explanations, with an option to enable Daybreak when disabled.
- Submit the selected rewrite in a verified fork before the blocked turn, preserving the original chat's draft and current model settings. Mark the new turn with `safety_recourse_follow_up`.
- Filter suggestions that could invoke commands, skills, apps, or plugins, and suppress recourse for unsupported servers and non-primary threads.

## Testing

Extend coverage for fork history, draft preservation, model selection, turn metadata, suggestion filtering, and the Daybreak picker.

GitOrigin-RevId: 49052df6301b6bfbba07262d40b007dcf97bb7c9
This commit is contained in:
Eric Traut
2026-10-27 05:17:43 +00:00
committed by copyberry
parent 118aae2a5f
commit 6c0db39b94
24 changed files with 473 additions and 22 deletions
@@ -135,6 +135,7 @@ stream_max_retries = 0
let turn = app_server
.turn_start(
started.session.thread_id,
"user",
"tui-user-message".to_string(),
vec![UserInput::Text {
text: "hello".to_string(),
@@ -92,6 +92,7 @@ stream_max_retries = 0
app_server
.turn_start(
thread_id,
"user",
"user-message".to_string(),
vec![UserInput::Text {
text: "hello".to_string(),