Branch conversations when editing earlier TUI prompts (#33201)

## What changed

- Fork the conversation immediately before the selected prompt instead of rolling back the current thread in place, preserving the original conversation.
- Reopen the selected prompt in the new conversation with its images, text elements, and mention bindings intact.
- Start a fresh conversation when editing the first prompt, show a dedicated continuation notice, and restore the prompt with an error if branching fails.

## Testing

- Cover branching before first and later prompts, source preservation, prompt restoration, hidden review prompts, mid-turn steering, in-progress turns, stale transcript entries, and mention bindings.

GitOrigin-RevId: 15473535b3f9733b0300711a498969e6d389db79
This commit is contained in:
Felipe Coury authored and copyberry committed 2026-07-15 01:36:44 +00:00
1 parent 72b41c55fb
commit 469ce0db51
17 files changed
+928 -549

No files matched your search

-7
View File
@@ -91,9 +91,6 @@ pub(crate) enum AppCommand {
name: String,
},
Shutdown,
ThreadRollback {
num_turns: u32,
},
Review {
target: ReviewTarget,
},
@@ -240,10 +237,6 @@ impl AppCommand {
Self::Shutdown
}
pub(crate) fn thread_rollback(num_turns: u32) -> Self {
Self::ThreadRollback { num_turns }
}
pub(crate) fn review(target: ReviewTarget) -> Self {
Self::Review { target }
}