pub struct CompactOutcome {
pub tokens_before: usize,
pub tokens_after: usize,
pub messages_before: usize,
pub messages_after: usize,
pub dropped_transcript: String,
}Expand description
Outcome of Session::compact for autocompact circuit breakers.
Fields§
§tokens_before: usize§tokens_after: usize§messages_before: usize§messages_after: usize§dropped_transcript: StringText of messages that were dropped (capped). Empty when nothing trimmed. Used by the agent LLM-compact path so the summary covers history, not the already-kept tail.
Implementations§
Source§impl CompactOutcome
impl CompactOutcome
Sourcepub fn still_over(&self, threshold: usize) -> bool
pub fn still_over(&self, threshold: usize) -> bool
Still above the autocompact threshold after the pass.
Sourcepub fn failed(&self, threshold: usize) -> bool
pub fn failed(&self, threshold: usize) -> bool
Failed to relieve pressure: still over threshold and no reduction.
Sourcepub fn dropped_messages(&self) -> bool
pub fn dropped_messages(&self) -> bool
True when at least one prefix message was removed (not just tool caps).
Trait Implementations§
Source§impl Clone for CompactOutcome
impl Clone for CompactOutcome
Source§impl Debug for CompactOutcome
impl Debug for CompactOutcome
Auto Trait Implementations§
impl Freeze for CompactOutcome
impl RefUnwindSafe for CompactOutcome
impl Send for CompactOutcome
impl Sync for CompactOutcome
impl Unpin for CompactOutcome
impl UnsafeUnpin for CompactOutcome
impl UnwindSafe for CompactOutcome
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
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 more