pub enum PruneStrategy {
SlidingWindow,
Summarize,
}Expand description
Strategy for handling context overflow.
Variants§
SlidingWindow
Drop oldest message pairs (keep system + most recent turns).
Summarize
Summarize the oldest turns into a single pinned summary message instead of dropping them outright. The summarization itself is performed by the agent (it needs the LLM backend); the context pipeline still prunes with a sliding window once the summary is in place.
Trait Implementations§
Source§impl Clone for PruneStrategy
impl Clone for PruneStrategy
Source§fn clone(&self) -> PruneStrategy
fn clone(&self) -> PruneStrategy
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 moreSource§impl Debug for PruneStrategy
impl Debug for PruneStrategy
impl Eq for PruneStrategy
Source§impl PartialEq for PruneStrategy
impl PartialEq for PruneStrategy
Source§fn eq(&self, other: &PruneStrategy) -> bool
fn eq(&self, other: &PruneStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PruneStrategy
Auto Trait Implementations§
impl Freeze for PruneStrategy
impl RefUnwindSafe for PruneStrategy
impl Send for PruneStrategy
impl Sync for PruneStrategy
impl Unpin for PruneStrategy
impl UnsafeUnpin for PruneStrategy
impl UnwindSafe for PruneStrategy
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