Restore file to original content when rejecting file recreated by agent (#29264)
Release Notes: - Fixed a bug that could sometimes cause a file to be deleted when rejecting an agent change.
This commit is contained in:
parent
5e31d86f1f
commit
55ea481707
11 changed files with 77 additions and 63 deletions
|
@ -134,7 +134,7 @@ impl Tool for ReadFileTool {
|
|||
})?;
|
||||
|
||||
action_log.update(cx, |log, cx| {
|
||||
log.buffer_read(buffer, cx);
|
||||
log.track_buffer(buffer, cx);
|
||||
})?;
|
||||
|
||||
Ok(result)
|
||||
|
@ -147,7 +147,7 @@ impl Tool for ReadFileTool {
|
|||
let result = buffer.read_with(cx, |buffer, _cx| buffer.text())?;
|
||||
|
||||
action_log.update(cx, |log, cx| {
|
||||
log.buffer_read(buffer, cx);
|
||||
log.track_buffer(buffer, cx);
|
||||
})?;
|
||||
|
||||
Ok(result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue