Function message_image_summary
pub fn message_image_summary(message: &ChatMessage) -> ImageMarkerSummaryExpand description
Byte count of the text a message contributes and the number of images it
contributes, following preparation. A tool-result carrier counts its
declared IMAGE attachments and is never body-scanned, so marker syntax
quoted in a carrier body is text, and a legacy carrier (nothing declared
at the fixed position) contributes no images at all. A carrier’s
text_bytes is its retained body length: the envelope’s content string
for a native carrier, and the carrier text with its image attachment
lines lifted (non-image lines retained) for a prompt carrier. That is
what a current-turn dispatch delivers; a stale carrier is priced as its
bytes by the estimator instead (see ImageMarkerDisposition::Stripped).
Every other message falls back to the text-level image_marker_summary
scan of its content.