pub struct SessionSettings {
pub autosave: bool,
pub compact_at_context_pct: f32,
pub max_context_tokens: usize,
pub keep_turns: usize,
}Fields§
§autosave: bool§compact_at_context_pct: f32Fraction of context window (0.0..=1.0) at which autocompact triggers.
Name keeps _pct for spec/JSON-config compatibility, but the value is
always interpreted as a 0.0–1.0 fraction. 0.0 disables autocompact.
max_context_tokens: usizeTotal LLM context window in tokens. Used by AutocompactExtension
to compute the absolute compaction threshold. Default 200_000
matches motosan-agent-loop’s AutocompactConfig::default. Override
for newer models (Sonnet 4.5+ supports 1_000_000).
keep_turns: usizeNumber of recent user-turn boundaries kept verbatim during compaction.
Trait Implementations§
Source§impl Clone for SessionSettings
impl Clone for SessionSettings
Source§fn clone(&self) -> SessionSettings
fn clone(&self) -> SessionSettings
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 SessionSettings
impl Debug for SessionSettings
Source§impl Default for SessionSettings
impl Default for SessionSettings
Source§impl<'de> Deserialize<'de> for SessionSettings
impl<'de> Deserialize<'de> for SessionSettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SessionSettings
impl PartialEq for SessionSettings
Source§fn eq(&self, other: &SessionSettings) -> bool
fn eq(&self, other: &SessionSettings) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SessionSettings
impl Serialize for SessionSettings
impl StructuralPartialEq for SessionSettings
Auto Trait Implementations§
impl Freeze for SessionSettings
impl RefUnwindSafe for SessionSettings
impl Send for SessionSettings
impl Sync for SessionSettings
impl Unpin for SessionSettings
impl UnsafeUnpin for SessionSettings
impl UnwindSafe for SessionSettings
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