Skip to main content

start_auto_compaction

Function start_auto_compaction 

Source
pub fn start_auto_compaction(
    app: &mut App,
    original_user_turn: String,
) -> Option<Msg>
Expand description

Start an automatic compaction triggered by preflight context pressure.

original_user_turn is the user turn that was about to be sent to the provider; it is restarted after the summary is applied. The user turn is already in the transcript, so the covered range starts from sequence 1.

Returns None (without spawning) when compaction cannot start, leaving the submitted turn recoverable.