assistant edit tool: Use buffer search and replace in background (#26679)

Instead of getting the whole text from the buffer, replacing with
`String::replace`, and getting a whole diff, we'll now use `SearchQuery`
to get a range, diff only that range, and apply it (all in the
background).

When we match zero strings, we'll record a "bad search", keep going and
report it to the model at the end.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
8ec0309645Agus Zubiaga committed on 3/13/2025, 3:25:49 PM· committed by GitHubparent6767e98
2 files changedLine totals unavailable