#[non_exhaustive]pub struct InfiniteSessionConfig {
pub enabled: Option<bool>,
pub background_compaction_threshold: Option<f64>,
pub buffer_exhaustion_threshold: Option<f64>,
}Expand description
Configures infinite sessions: persistent workspaces with automatic context-window compaction.
When enabled (default), sessions automatically manage context limits through background compaction and persist state to a workspace directory.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enabled: Option<bool>Whether infinite sessions are enabled. Defaults to true on the CLI.
background_compaction_threshold: Option<f64>Context utilization (0.0–1.0) at which background compaction starts. Default: 0.80.
buffer_exhaustion_threshold: Option<f64>Context utilization (0.0–1.0) at which the session blocks until compaction completes. Default: 0.95.
Implementations§
Source§impl InfiniteSessionConfig
impl InfiniteSessionConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct an empty InfiniteSessionConfig; all fields default to
unset (the CLI applies its own defaults).
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Toggle infinite sessions on or off. Defaults to true on the CLI
when unset.
Sourcepub fn with_background_compaction_threshold(self, threshold: f64) -> Self
pub fn with_background_compaction_threshold(self, threshold: f64) -> Self
Set the context utilization (0.0–1.0) at which background compaction starts.
Sourcepub fn with_buffer_exhaustion_threshold(self, threshold: f64) -> Self
pub fn with_buffer_exhaustion_threshold(self, threshold: f64) -> Self
Set the context utilization (0.0–1.0) at which the session blocks until compaction completes.
Trait Implementations§
Source§impl Clone for InfiniteSessionConfig
impl Clone for InfiniteSessionConfig
Source§fn clone(&self) -> InfiniteSessionConfig
fn clone(&self) -> InfiniteSessionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more