Revert "Start tracking edits performed by the agent" (#27077)
Reverts zed-industries/zed#27064
This commit is contained in:
parent
584a70ca5e
commit
3edf930007
13 changed files with 346 additions and 1425 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue