assistant edit tool: Fix editing files in context (#26751)

When the user attached context in the thread, the editor model request
would fail because its tool use wouldn't be removed properly leading to
an API error.

Also, after an edit, we'd keep the old file snapshot in the context.
This would make the model think that the edits didn't apply and make it
go in a loop.

Release Notes:

- N/A
1bf1c7223fAgus Zubiaga committed on 3/14/2025, 8:07:43 PM· committed by GitHubparentba8b9ec
19 files changedLine totals unavailable