Skip to main content

Module display

Module display 

Source
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§

DisplayTail
The last items.len() display items of a history; omitted = how many display items were dropped from the front to fit the cap.

Enums§

DisplayItem

Functions§

display_items
Every display item of msgs (no cap).
display_tail
The last max_items display 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 content is a canonical agent-event payload (format_event_for_agent): <event id=… …>…</event>.