Skip to main content

Module repair

Module repair 

Source

Functions§

pending_tool_calls_from_messages
Pending tool calls after the last assistant turn in preloaded history.
reconstruct_messages_with_fallback
Reconstructs full messages from a sequence of events. For SessionEvent::Compressed events:
repair_events
Repair event log entries in place for recovery minimum set completeness.
repair_events_with_cap
repair_llm_completed
Normalize a single LlmCompleted for recovery (message fields only).
repair_llm_completed_with_cap
sanitize_recovery_text
Sanitize text for recovery paths: ensure valid UTF-8 and apply an optional byte cap derived from the caller’s context config. When max_bytes is 0 no cap is applied.
sanitize_recovery_text_bounded