pub struct SystemPromptContext {
pub session_id: SessionId,
pub locale: Option<String>,
pub file_store: Option<Arc<dyn SessionFileSystem>>,
pub model: Option<String>,
pub session_storage: Option<Arc<dyn SessionStorageStore>>,
}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.
session_storage: Option<Arc<dyn SessionStorageStore>>Optional session key/value store, for capabilities whose contribution is
persisted session state rather than static text (e.g. channel_context
reading the accumulated ThreadContext). None for callers that do not
provide one; such capabilities then contribute nothing.
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).