Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Allow agent edits to be accepted/rejected before the end the turn (#29941)

Nathan Sobo55b908a8bf1f
diff --git a/crates/agent/src/agent_diff.rs b/crates/agent/src/agent_diff.rs
index 437e180e028..2af96251010 100644
--- a/crates/agent/src/agent_diff.rs
+++ b/crates/agent/src/agent_diff.rs
@@ -324,10 +324,6 @@ fn keep_edits_in_ranges(
window: &mut Window,
cx: &mut Context<Editor>,
) {
- if thread.read(cx).is_generating() {
- return;
- }
-
let diff_hunks_in_ranges = editor
.diff_hunks_in_ranges(&ranges, buffer_snapshot)
.collect::<Vec<_>>();
@@ -353,10 +349,6 @@ fn reject_edits_in_ranges(
window: &mut Window,
cx: &mut Context<Editor>,
) {
- if thread.read(cx).is_generating() {
- return;
- }
-
let diff_hunks_in_ranges = editor
.diff_hunks_in_ranges(&ranges, buffer_snapshot)
.collect::<Vec<_>>();
@@ -703,10 +695,6 @@ fn render_diff_hunk_controls(
) -> AnyElement {
let editor = editor.clone();
- if thread.read(cx).is_generating() {
- return Empty.into_any();
- }
-
h_flex()
.h(line_height)
.mr_0p5()