# acp_thread: Add keyed message updates \(\#64773\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 3794e5e979a6278d2e8b45e7a834b2e79b260753

Requested commit: 3794e5e979a6278d2e8b45e7a834b2e79b260753

Commit: 3794e5e979a6278d2e8b45e7a834b2e79b260753

Tree: 3bfda49e1e2ae53349af31a5152e1e68b27e9acf

Author: Ben Brandt

Committer: GitHub

## Message

```
acp_thread: Add keyed message updates (#64773)

Stacked on #64765, with `benbrandt/acp-message-updates` as the base
branch.

- Add typed SDK v2 user-message, assistant-message, and thought upserts,
plus keyed chunk appends, using the existing transcript records.
- Keep legacy optional-ID adjacency and optimistic echo behavior
separate. Keyed records retain their first-seen positions; conflicting
message kinds fail before mutation.
- Apply omitted/null/value content and message metadata independently.
Full snapshots replace content; later chunks append. Chunk-envelope
metadata does not patch message metadata.
- Reconcile rendered text runs and preserve compatible Markdown/image
entities. Replacing a message discards only its superseded streaming
cursor.
- Keep read-only user messages synchronized, including empty snapshots,
without resetting selection on metadata-only or identical updates. A
compact source-change token avoids caching another payload copy.

This does not select v2 connections or change prompt acceptance and
turn-completion semantics. Keyed lookup scans the existing records;
there is no second transcript or maintained ID index.

Release Notes:

- N/A
```

## Parents

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

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