pub struct SystemPromptContext {
pub session_id: SessionId,
pub locale: Option<String>,
pub file_store: Option<Arc<dyn SessionFileSystem>>,
pub model: Option<String>,
}Expand description
Context provided to capabilities when resolving dynamic system prompt contributions.
This gives capabilities access to session-specific resources (filesystem, etc.) so they can generate system prompt content at runtime rather than returning only static text.
Fields§
§session_id: SessionIdThe current session ID
locale: Option<String>Optional locale for localized prompts and tool behavior.
file_store: Option<Arc<dyn SessionFileSystem>>Optional file store for reading session files (e.g., AGENTS.md)
model: Option<String>The model the agent will run on, when known at collection time.
Enables model-adaptive capabilities (see Capability::resolve_for_model,
e.g. auto_tool_search). None when the model is not yet resolved; such
capabilities then fall back to their provider-agnostic behavior.
Implementations§
Source§impl SystemPromptContext
impl SystemPromptContext
Sourcepub fn without_file_store(session_id: SessionId) -> Self
pub fn without_file_store(session_id: SessionId) -> Self
Create context with no file store (for callers that don’t need filesystem access)
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Set the model the agent will run on (drives model-adaptive capabilities).
Auto Trait Implementations§
impl !RefUnwindSafe for SystemPromptContext
impl !UnwindSafe for SystemPromptContext
impl Freeze for SystemPromptContext
impl Send for SystemPromptContext
impl Sync for SystemPromptContext
impl Unpin for SystemPromptContext
impl UnsafeUnpin for SystemPromptContext
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request