Restore original file content when rejecting an overwritten file (#29974)

Release Notes:

- Fixed a bug that would cause rejecting a hunk from the agent to delete
the file if the agent had decided to rewrite that file from scratch.
This commit is contained in:
Antonio Scandurra 2025-05-06 09:05:55 +02:00 committed by GitHub
parent 86cc5c2b55
commit 210c338df4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 105 additions and 20 deletions

View file

@ -957,7 +957,7 @@ impl EditAgentTest {
cx.spawn(async move |cx| {
let agent_model =
Self::load_model("google", "gemini-2.5-pro-preview-03-25", cx).await;
Self::load_model("anthropic", "claude-3-7-sonnet-latest", cx).await;
let judge_model =
Self::load_model("anthropic", "claude-3-7-sonnet-latest", cx).await;
(agent_model.unwrap(), judge_model.unwrap())