Pitch
Codex parity. After hitting Enter you sometimes notice a typo or want to add context. `/edit` (or `Ctrl+Up` shortcut) pulls the most recent user message back into the composer, pre-filled, with the cursor at end. Submitting replaces the prior turn — the engine truncates back to the parent turn, runs again with the revised prompt.
Implementation sketch
- Track `last_submitted_message` on `App` (already have `input_history.last()` but it loses the cursor position).
- `/edit` (and `Ctrl+Up` on empty composer) → pop the last message into the composer.
- On submit: send a new `Op::EditLastTurn` that the engine handles by truncating `api_messages` back to the parent turn before re-running.
- Snapshot integration: take a snapshot before the truncation so the user can `/undo` (#new) to recover the original.
Acceptance
Pitch
Codex parity. After hitting Enter you sometimes notice a typo or want to add context. `/edit` (or `Ctrl+Up` shortcut) pulls the most recent user message back into the composer, pre-filled, with the cursor at end. Submitting replaces the prior turn — the engine truncates back to the parent turn, runs again with the revised prompt.
Implementation sketch
Acceptance