Skip to main content

insert_breadcrumb_deduped

Function insert_breadcrumb_deduped 

pub fn insert_breadcrumb_deduped(
    history: &mut Vec<ChatMessage>,
    crumb_present: bool,
) -> bool
Expand description

Insert the trim breadcrumb after the leading system messages unless the owner’s crumb_present record says one is already sitting there. Returns whether a breadcrumb is present after the call, so the caller can store it as the population’s authoritative provenance instead of re-inferring it from text later.