Expand description
Daemon-side display projection of api_messages (PLAN-phase4 §2.3).
EXACTLY the filter the TUI’s rebuild_display_messages applied at
741b6b60 (helpers.rs:170-224): skip <context-summary> messages, skip
<event …>…</event> payloads, project user text and assistant
thinking/text/tool_use blocks. Both LocalTransport and Digest socket
clients build their transcript from this, so they cannot drift.
No TUI types here — this crate never depends on agent-tui.
Structs§
- Display
Tail - The last
items.len()display items of a history;omitted= how many display items were dropped from the front to fit the cap.
Enums§
Functions§
- display_
items - Every display item of
msgs(no cap). - display_
tail - The last
max_itemsdisplay items (0= unbounded). Walks from the back and stops once the cap is met; the head is only counted (no allocation), so a 20 MB history costs O(tail) allocations + one O(n) scan. - is_
event_ payload - True iff
contentis a canonical agent-event payload (format_event_for_agent):<event id=… …>…</event>.