# agent: Fix a panic when splitting streamed-in edits inside of a multibyte character \(\#57100\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/14befe215158182be6b505b26bccf25538831213)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 14befe215158182be6b505b26bccf25538831213

Requested commit: 14befe215158182be6b505b26bccf25538831213

Commit: 14befe215158182be6b505b26bccf25538831213

Tree: b5bf7a19ae231eab4e00d1ce7bc64609f3ee953a

Author: Marshall Bowers

Committer: GitHub

## Message

```
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.
```

## Parents

- [8ca194d833a4d2e9a3f3c43f84e806a36c3839c4](https://git.cafe/gitcafe/zed/commit/8ca194d833a4d2e9a3f3c43f84e806a36c3839c4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/14befe215158182be6b505b26bccf25538831213?format=markdown)
