pub struct CompactionPreparation {
pub first_kept_entry_id: String,
pub messages_to_summarize: Vec<AgentMessage>,
pub turn_prefix_messages: Vec<AgentMessage>,
pub is_split_turn: bool,
pub tokens_before: u64,
pub previous_summary: Option<String>,
pub file_ops: FileOperations,
pub settings: CompactionSettings,
}Expand description
Pure preparation produced by prepare_compaction for hooks / compact.
Fields§
§first_kept_entry_id: StringUUID of the first kept entry.
messages_to_summarize: Vec<AgentMessage>Messages that will be summarized and discarded.
turn_prefix_messages: Vec<AgentMessage>Turn-prefix messages when splitting a turn.
is_split_turn: boolWhether this is a split-turn cut.
tokens_before: u64Context tokens before compaction.
previous_summary: Option<String>Previous compaction summary for iterative update.
file_ops: FileOperationsFile operations extracted from messages / previous details.
settings: CompactionSettingsCompaction settings used for this preparation.
Trait Implementations§
Source§impl Clone for CompactionPreparation
impl Clone for CompactionPreparation
Source§fn clone(&self) -> CompactionPreparation
fn clone(&self) -> CompactionPreparation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompactionPreparation
impl RefUnwindSafe for CompactionPreparation
impl Send for CompactionPreparation
impl Sync for CompactionPreparation
impl Unpin for CompactionPreparation
impl UnsafeUnpin for CompactionPreparation
impl UnwindSafe for CompactionPreparation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.