Skip to main content

Module message

Module message 

Source

Structs§

Message
A structured message with typed parts for context management.
MessageSequence
Part
PartAttachment
RenderedPrompt

Enums§

MessageOrigin
MessageRole
MessageSequenceIter
PartKind
PruneState

Functions§

append_rendered_prompt
messages_are_prompt_resume_safe
render_prompt
render_transcript_prompt
shared_parts
Wrap a Vec<Part> for the Message::parts field. Use this in struct literals and tests (parts: shared_parts(vec![Part { ... }])) so the call sites stay short and uniform.

Type Aliases§

BaseRenderCache
Memoized render of a MessageSequence’s base. Shared across the per-iteration MessageSequence instances that wrap the same base (typically the SessionGraphCache’s projected messages) so the chat projector’s render_prompt walk happens once per turn instead of once per LLM iteration.