# agent_ui: Only allow editing when agent supports truncation \(\#53886\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0a0da3f31e84660aa455da4b43023e65410bb9bd

Requested commit: 0a0da3f31e84660aa455da4b43023e65410bb9bd

Commit: 0a0da3f31e84660aa455da4b43023e65410bb9bd

Tree: 82d0600f72a08ecda6b6e4945f17196a56f6bdee

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
agent_ui: Only allow editing when agent supports truncation (#53886)

Follow up to #53850. #53850 fixed the panic, but had the side effect
that we would allow editing messages in the UI, even if the agent did
not support it.

Related #53735

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
```

## Parents

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

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