pub struct CommandExecutionContext {
pub session_id: SessionId,
pub host: Arc<dyn CommandHost>,
}Expand description
Context handed to crate::capabilities::Capability::execute_command when a
system command is dispatched. Carries only data that is safe to expose
across the trait surface; capabilities that need handles to host-internal
state (provider store, file system, etc.) own those references directly via
the capability’s constructor. Context-aware commands (out-of-band LLM call
over the session’s context, e.g. /btw) use the host facilities instead —
see crate::command_host::CommandHost.
Fields§
§session_id: SessionIdSession the command is being executed against.
host: Arc<dyn CommandHost>Host facilities: turn-context assembly and tool-less session
completions. Hosts that cannot provide them use
crate::command_host::DisabledCommandHost.
Implementations§
Source§impl CommandExecutionContext
impl CommandExecutionContext
pub fn new(session_id: SessionId, host: Arc<dyn CommandHost>) -> Self
Sourcepub fn without_host(session_id: SessionId) -> Self
pub fn without_host(session_id: SessionId) -> Self
Context for hosts that dispatch commands without turn-context/LLM facilities; context-aware commands then fail with a clear error.
Trait Implementations§
Source§impl Clone for CommandExecutionContext
impl Clone for CommandExecutionContext
Source§fn clone(&self) -> CommandExecutionContext
fn clone(&self) -> CommandExecutionContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more