Skip to main content

render_messages

Function render_messages 

Source
pub fn render_messages(
    messages: &[ChatMessage],
    session_id: Option<&str>,
    model: Option<&str>,
    format: HumanExportFormat,
) -> String
Expand description

The lower-level entry point render_transcript delegates to: render a bare messages slice (no Session wrapper required) — for a caller (e.g. the CLI’s sessions export) that already has the parsed ChatMessages and a session name/model but not a full Session (which is #[non_exhaustive] and cannot be constructed outside this crate). Same read-only/idempotent contract as render_transcript.