Skip to main content

generate_ambient_narration

Function generate_ambient_narration 

Source
pub(crate) async fn generate_ambient_narration(
    mstore: &Store,
    block_id: &str,
    event_id: &str,
    generation: u64,
    kind: &str,
    context: &str,
) -> Option<String>
Expand description

Generate a short user-facing line narrating an autonomous action.

Best-effort by construction — every failure path returns None and the caller simply says nothing. A UI state change must NEVER be gated on this: if Haiku is slow, capped out, or absent, the thing being narrated still happened and the UI must already reflect it.