pub struct NewSessionMeta {
pub system_prompt: Option<SystemPromptMeta>,
pub claude_code: Option<ClaudeCodeMeta>,
pub disable_built_in_tools: bool,
}Expand description
Combined meta configuration for new session requests
Parses all supported meta fields from ACP request’s _meta field.
Fields§
§system_prompt: Option<SystemPromptMeta>System prompt configuration
claude_code: Option<ClaudeCodeMeta>Claude Code specific configuration
disable_built_in_tools: boolWhether to disable built-in tools
Implementations§
Source§impl NewSessionMeta
impl NewSessionMeta
Sourcepub fn with_resume(session_id: &str) -> Self
pub fn with_resume(session_id: &str) -> Self
Create a NewSessionMeta with just the resume option
This is useful for loadSession where we want to resume
from a specific session ID.
Sourcepub fn from_request_meta(meta: Option<&Value>) -> Self
pub fn from_request_meta(meta: Option<&Value>) -> Self
Sourcepub fn get_system_prompt_append(&self) -> Option<&str>
pub fn get_system_prompt_append(&self) -> Option<&str>
Get the text to append to the system prompt, if any
Sourcepub fn get_system_prompt_replace(&self) -> Option<&str>
pub fn get_system_prompt_replace(&self) -> Option<&str>
Get the text to replace the system prompt, if any
Sourcepub fn get_resume_session_id(&self) -> Option<&str>
pub fn get_resume_session_id(&self) -> Option<&str>
Get the session ID to resume, if any
Sourcepub fn get_max_thinking_tokens(&self) -> Option<u32>
pub fn get_max_thinking_tokens(&self) -> Option<u32>
Get the max thinking tokens setting, if any
Sourcepub fn should_resume(&self) -> bool
pub fn should_resume(&self) -> bool
Check if this session should resume from a previous session
Trait Implementations§
Source§impl Clone for NewSessionMeta
impl Clone for NewSessionMeta
Source§fn clone(&self) -> NewSessionMeta
fn clone(&self) -> NewSessionMeta
Returns a duplicate of the value. Read more
1.0.0 · 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 NewSessionMeta
impl Debug for NewSessionMeta
Source§impl Default for NewSessionMeta
impl Default for NewSessionMeta
Source§fn default() -> NewSessionMeta
fn default() -> NewSessionMeta
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NewSessionMeta
impl RefUnwindSafe for NewSessionMeta
impl Send for NewSessionMeta
impl Sync for NewSessionMeta
impl Unpin for NewSessionMeta
impl UnwindSafe for NewSessionMeta
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,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
fn into_option(self) -> Option<T>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request