agent: Fix a panic when splitting streamed-in edits inside of a multibyte character (#57100)

This PR fixes a panic that could occur in the `edit_file` tool where
streaming in text could split in the middle of a multibyte character.

Closes FR-3 and [ZED-7ZX](https://zed-dev.sentry.io/issues/7480598098).

Release Notes:

- Fixed a panic that could occur when streaming in text with the
`edit_file` tool.
14befe2151Marshall Bowers committed on 5/19/2026, 6:44:48 AM· committed by GitHubparent8ca194d
1 file changedLine totals unavailable