#[non_exhaustive]pub enum CompactionStage {
BudgetReduce,
Snip,
Microcompact,
ContextCollapse,
AutoCompact,
}Expand description
The 5 progressive compaction stages (DESIGN.md §9 — borrowed from Claude Code).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BudgetReduce
60% — trim redundant tool results, keep recent full turns.
Snip
70% — drop stale file reads, keep path + hash.
Microcompact
80% — summarise older conversation segments with a cheaper model.
ContextCollapse
90% — collapse all file reads into a single inventory + key excerpts.
AutoCompact
95% — rewrite the entire conversation in compressed form with the main model.
Implementations§
Source§impl CompactionStage
impl CompactionStage
Sourcepub const ALL: [CompactionStage; 5]
pub const ALL: [CompactionStage; 5]
Stages, in order. Higher stages imply running all lower stages first.
Trait Implementations§
Source§impl Clone for CompactionStage
impl Clone for CompactionStage
Source§fn clone(&self) -> CompactionStage
fn clone(&self) -> CompactionStage
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 moreimpl Copy for CompactionStage
Source§impl Debug for CompactionStage
impl Debug for CompactionStage
Source§impl<'de> Deserialize<'de> for CompactionStage
impl<'de> Deserialize<'de> for CompactionStage
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompactionStage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompactionStage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CompactionStage
Source§impl Hash for CompactionStage
impl Hash for CompactionStage
Source§impl PartialEq for CompactionStage
impl PartialEq for CompactionStage
Source§fn eq(&self, other: &CompactionStage) -> bool
fn eq(&self, other: &CompactionStage) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CompactionStage
impl Serialize for CompactionStage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CompactionStage
Auto Trait Implementations§
impl Freeze for CompactionStage
impl RefUnwindSafe for CompactionStage
impl Send for CompactionStage
impl Sync for CompactionStage
impl Unpin for CompactionStage
impl UnsafeUnpin for CompactionStage
impl UnwindSafe for CompactionStage
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.