pub struct SplitResult {
pub to_compact: Vec<Message>,
pub preserved: Vec<Message>,
pub compact_tokens: u64,
pub preserved_tokens: u64,
pub split_index: usize,
}Expand description
Result of splitting a conversation into old and recent portions.
Fields§
§to_compact: Vec<Message>Messages to compact or summarize (the old portion).
These are the messages before the split point. They are candidates for summarization, truncation, or removal by the compactor.
preserved: Vec<Message>Messages to preserve as-is (the recent portion).
These are the messages after the split point. They are kept untouched in the conversation history.
compact_tokens: u64Estimated token count of the old portion (to_compact).
Approximate token usage of the messages eligible for summarization or removal, computed from the pre-split history so callers can budget how much context compaction should reclaim.
preserved_tokens: u64Estimated token count of the recent portion (preserved).
Approximate token usage of the messages kept intact after the split, giving callers the residual context footprint that will carry into the next model call.
split_index: usizeThe index in the original message list where the split occurred.
Zero when no split was needed (the entire conversation was preserved).
Trait Implementations§
Source§impl Clone for SplitResult
impl Clone for SplitResult
Source§fn clone(&self) -> SplitResult
fn clone(&self) -> SplitResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more