pub struct SessionInit {
pub session_id: Option<SessionId>,
pub parent_session_id: Option<SessionId>,
pub working_dir: PathBuf,
pub system_prompt_seed: Vec<PromptSegment>,
pub max_turns: Option<u32>,
pub default_model: Option<ModelId>,
pub subagent_model: Option<ModelId>,
pub subagent_event_forwarding: Option<SubagentEventForwarding>,
pub subagent_depth: u32,
}Expand description
Options used when creating a new session.
Fields§
§session_id: Option<SessionId>§parent_session_id: Option<SessionId>§working_dir: PathBuf§system_prompt_seed: Vec<PromptSegment>§max_turns: Option<u32>§default_model: Option<ModelId>§subagent_model: Option<ModelId>§subagent_event_forwarding: Option<SubagentEventForwarding>§subagent_depth: u32Implementations§
Source§impl SessionInit
impl SessionInit
Sourcepub fn with_default_model(self, model: impl Into<ModelId>) -> Self
pub fn with_default_model(self, model: impl Into<ModelId>) -> Self
Override the default model for the new session.
Sourcepub fn with_subagent_model(self, model: impl Into<ModelId>) -> Self
pub fn with_subagent_model(self, model: impl Into<ModelId>) -> Self
Override the subagent model for the new session.
Sourcepub fn with_subagent_event_forwarding(
self,
mode: SubagentEventForwarding,
) -> Self
pub fn with_subagent_event_forwarding( self, mode: SubagentEventForwarding, ) -> Self
Override subagent event forwarding for the new session.
Trait Implementations§
Source§impl Clone for SessionInit
impl Clone for SessionInit
Source§fn clone(&self) -> SessionInit
fn clone(&self) -> SessionInit
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 SessionInit
impl Debug for SessionInit
Auto Trait Implementations§
impl Freeze for SessionInit
impl RefUnwindSafe for SessionInit
impl Send for SessionInit
impl Sync for SessionInit
impl Unpin for SessionInit
impl UnsafeUnpin for SessionInit
impl UnwindSafe for SessionInit
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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