Improve tracking for agent edits (#27857)
Release Notes: - N/A --------- Co-authored-by: Nathan Sobo <nathan@zed.dev> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
d26c477d86
commit
4a252515b1
19 changed files with 757 additions and 795 deletions
|
@ -92,10 +92,11 @@ impl Tool for CreateFileTool {
|
|||
})?
|
||||
.await
|
||||
.map_err(|err| anyhow!("Unable to open buffer for {destination_path}: {err}"))?;
|
||||
let edit_id = buffer.update(cx, |buffer, cx| buffer.set_text(contents, cx))?;
|
||||
|
||||
action_log.update(cx, |action_log, cx| {
|
||||
action_log.will_create_buffer(buffer.clone(), edit_id, cx)
|
||||
cx.update(|cx| {
|
||||
buffer.update(cx, |buffer, cx| buffer.set_text(contents, cx));
|
||||
action_log.update(cx, |action_log, cx| {
|
||||
action_log.will_create_buffer(buffer.clone(), cx)
|
||||
});
|
||||
})?;
|
||||
|
||||
project
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue