acp_thread: Preserve tool presentation on invalid content (#64784)

- Prepare all incoming tool content before changing presentation fields
or shared display entities. A missing terminal or failed content
conversion no longer leaves a partially updated title, metadata, content
list, or terminal command label.
- Share preparation between creation and updates, filtering unsupported
entries before positional reconciliation without constructing a
disposable second set of views.
- Preserve raw-input Markdown identity across snapshots and skip
rendering unchanged input.
- Reuse unchanged diffs without constructing discarded entities, and
include the path in the reuse check so identical text at a different
path does not retain the old file.

Reported status remains authoritative even when content conversion
fails. Nonterminal updates preserve an open permission request; terminal
status still settles it and resumes sleep prevention as before. The
existing failed-tool update/upsert lifecycle tests remain unchanged.

This makes presentation updates atomic, not the whole tool update.
Existing error propagation, v1 omission semantics, raw-output fallback,
and specialized native diff/terminal updates remain intact. It does not
add v2 tri-state APIs, a canonical wire-state store, or protocol
negotiation.

Release Notes:

- acp: Fixed partial tool-call display updates when content references
an unavailable terminal.
20e3812408Ben Brandt committed on 9/28/2026, 9:47:17 AM· committed by GitHubparent8a4fd57
1 file changedLine totals unavailable