Remove agent_diff key context when agent review ends for an editor (#31930)
Release Notes: - Fixed an issue that prevented `git::Restore` keybindings from working in editors for buffers that had previously been modified by the agent. Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
parent
17cf865d1e
commit
b14401f817
1 changed files with 8 additions and 2 deletions
|
@ -1464,7 +1464,10 @@ impl AgentDiff {
|
|||
if !AgentSettings::get_global(cx).single_file_review {
|
||||
for (editor, _) in self.reviewing_editors.drain() {
|
||||
editor
|
||||
.update(cx, |editor, cx| editor.end_temporary_diff_override(cx))
|
||||
.update(cx, |editor, cx| {
|
||||
editor.end_temporary_diff_override(cx);
|
||||
editor.unregister_addon::<EditorAgentDiffAddon>();
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
return;
|
||||
|
@ -1560,7 +1563,10 @@ impl AgentDiff {
|
|||
|
||||
if in_workspace {
|
||||
editor
|
||||
.update(cx, |editor, cx| editor.end_temporary_diff_override(cx))
|
||||
.update(cx, |editor, cx| {
|
||||
editor.end_temporary_diff_override(cx);
|
||||
editor.unregister_addon::<EditorAgentDiffAddon>();
|
||||
})
|
||||
.ok();
|
||||
self.reviewing_editors.remove(&editor);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue