Function projected_entry_count
pub fn projected_entry_count(messages: &[ConversationMessage]) -> usizeExpand description
Count the conversation entries a transcript projects into, without
materializing them. One entry per chat message; an assistant tool-call
message contributes its non-empty text plus one entry per call; a tool
result folds into the entry of a call still awaiting a result (FIFO by
tool_call_id) and otherwise counts as its own orphan entry.
The ACP session store maintains a persisted per-session counter with the
same semantics. Runtime projection (conversation_message_entries) and
this function are two expressions of one counting rule and must agree on
every input.