# acp_thread: Preserve ordered mixed content in agent messages \(\#64456\) · gitcafe/zed

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

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

Visibility: public

Requested revision: df673c1b8560666ebad97fbedfdb1c69078ecc09

Requested commit: df673c1b8560666ebad97fbedfdb1c69078ecc09

Commit: df673c1b8560666ebad97fbedfdb1c69078ecc09

Tree: 7e6db093ade4b3cc7025876ee91fcbaa5f47056c

Author: Ben Brandt

Committer: GitHub

## Message

```
acp_thread: Preserve ordered mixed content in agent messages (#64456)

Preserve ordered mixed content in agent messages without disrupting text
streaming for existing native/v1 agents. The previous single-block
reduction could replace images with placeholders or lose non-text
content as subsequent chunks arrived.

- Introduce [ordered message display
content](https://github.com/zed-industries/zed/blob/929fba3e16f7a378eb1dca3d85ac2f1df2b902c6/crates/acp_thread/src/acp_thread.rs#L1500),
reusing adjacent text entities while retaining image/resource-preview
boundaries.
- Update rendering, text search, response copy/export, Mermaid cache
invalidation, and CLI output to visit the collection.
- Use block-local context menus and existing Markdown getters so copy
commands target the clicked part rather than another part's cached
state.
- Keep existing link/mention formatting, resource-button and blob-label
search behavior, compact prompt mentions, and original user-message
chunks.
- Preserve the separator between a leading resource link and subsequent
direct or streamed text.

Release Notes:

- N/A
```

## Parents

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

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