Save and cycle through side chats in TUI scrollback mode (#64207)

## Why

Scrollback mode could switch between a parent conversation and a live side
chat, but it could neither save side chats nor reopen them after resuming
the parent.

## What changed

- With the TUI workspace feature enabled and a compatible local backend,
  save new scrollback side chats as attached threads. Use `Ctrl+/` to
  discover saved chats and cycle from the parent through them and back.
- Show the current side chat's position and loading status. Keep input in
  the source draft while a switch is pending, and let `Esc` cancel it.
- Delete the parent and its saved side chats in one `thread/delete`
  request. The experimental `savedSideChatIds` parameter lets the server
  verify that each requested chat belongs to the parent and check for
  blocking attachments before deleting anything.

## Testing

Add coverage for cycling after resume, preserving pasted drafts during a
pending switch, and limiting parent deletion to verified saved side chats.

GitOrigin-RevId: 7c797f1b69dff73ff0343eb73dd3c048e856b319
This commit is contained in:
Felipe Coury
2026-11-26 19:54:18 +00:00
committed by copyberry
parent a9d7206f8f
commit 475e13ab1a
47 changed files with 1122 additions and 212 deletions
+2
View File
@@ -3275,6 +3275,8 @@ pub enum ThreadSource {
}
impl ThreadSource {
pub const TUI_SIDE_CHAT: &str = "tui_side_chat";
pub fn as_str(&self) -> &str {
match self {
ThreadSource::User => "user",