Revert "Start tracking edits performed by the agent" (#27077)

Reverts zed-industries/zed#27064
This commit is contained in:
Antonio Scandurra 2025-03-19 15:33:08 +01:00 committed by GitHub
parent 584a70ca5e
commit 3edf930007
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 346 additions and 1425 deletions

View file

@ -274,17 +274,7 @@ impl EditToolRequest {
self.bad_searches.push(invalid_replace);
}
DiffResult::Diff(diff) => {
let edit_ids = buffer.update(cx, |buffer, cx| {
buffer.finalize_last_transaction();
buffer.apply_diff(diff, cx);
let transaction = buffer.finalize_last_transaction();
transaction.map_or(Vec::new(), |transaction| transaction.edit_ids.clone())
})?;
self.action_log
.update(cx, |log, cx| {
log.buffer_edited(buffer.clone(), edit_ids, cx)
})?
.await?;
let _clock = buffer.update(cx, |buffer, cx| buffer.apply_diff(diff, cx))?;
write!(&mut self.output, "\n\n{}", source)?;
self.changed_buffers.insert(buffer);
@ -332,6 +322,10 @@ impl EditToolRequest {
.await?;
}
self.action_log
.update(cx, |log, cx| log.buffer_edited(self.changed_buffers, cx))
.log_err();
let errors = self.parser.errors();
if errors.is_empty() && self.bad_searches.is_empty() {