This commit is contained in:
jimmyfraiture
2025-09-08 10:52:08 -07:00
parent 10537867ad
commit 927ccb3299
2 changed files with 16 additions and 14 deletions

View File

@@ -723,6 +723,7 @@ impl Session {
user_explicitly_approved_this_action,
changes,
}) => {
self.clear_last_undo_patch();
turn_diff_tracker.on_patch_begin(&changes);
EventMsg::PatchApplyBegin(PatchApplyBeginEvent {

View File

@@ -1268,20 +1268,21 @@ impl ChatWidget {
})];
let items = vec![
SelectionItem {
name: "Undo last turn diff".to_string(),
description: Some(
"Revert files that Codex changed during the most recent turn.".to_string(),
),
is_current: false,
actions: undo_actions,
},
SelectionItem {
name: "Cancel".to_string(),
description: Some("Close without undoing any files.".to_string()),
is_current: false,
actions: Vec::new(),
}];
SelectionItem {
name: "Undo last turn diff".to_string(),
description: Some(
"Revert files that Codex changed during the most recent turn.".to_string(),
),
is_current: false,
actions: undo_actions,
},
SelectionItem {
name: "Cancel".to_string(),
description: Some("Close without undoing any files.".to_string()),
is_current: false,
actions: Vec::new(),
},
];
self.bottom_pane.show_selection_view(
"Undo last Codex turn?".to_string(),