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:
Antonio Scandurra 2025-04-23 11:42:43 +02:00 committed by GitHub
parent 5e31d86f1f
commit 55ea481707
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 77 additions and 63 deletions

View file

@ -159,7 +159,7 @@ impl Tool for CodeActionTool {
};
action_log.update(cx, |action_log, cx| {
action_log.buffer_read(buffer.clone(), cx);
action_log.track_buffer(buffer.clone(), cx);
})?;
let range = {