pub struct NoopHandler;Expand description
A SessionHandler that leaves permission requests and external tool calls pending.
This is the default used when no handler is set on
SessionConfig::handler. It lets consumers
observe permission.requested and external_tool.requested events and later resolve
them with the corresponding pending-request RPC methods.
Trait Implementations§
Source§impl Clone for NoopHandler
impl Clone for NoopHandler
Source§fn clone(&self) -> NoopHandler
fn clone(&self) -> NoopHandler
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 NoopHandler
impl Debug for NoopHandler
Source§impl SessionHandler for NoopHandler
impl SessionHandler for NoopHandler
Source§fn on_event<'life0, 'async_trait>(
&'life0 self,
event: HandlerEvent,
) -> Pin<Box<dyn Future<Output = HandlerResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_event<'life0, 'async_trait>(
&'life0 self,
event: HandlerEvent,
) -> Pin<Box<dyn Future<Output = HandlerResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle an event from the session. Read more
Source§fn on_session_event<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_event: SessionEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_session_event<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_event: SessionEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Informational timeline event (assistant messages, tool execution
markers, session idle, etc.). Fire-and-forget — the return value is
ignored. Read more
Source§fn on_permission_request<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_request_id: RequestId,
_data: PermissionRequestData,
) -> Pin<Box<dyn Future<Output = PermissionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_permission_request<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_request_id: RequestId,
_data: PermissionRequestData,
) -> Pin<Box<dyn Future<Output = PermissionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The CLI is asking whether the agent may perform a privileged action. Read more
Source§fn on_user_input<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_question: String,
_choices: Option<Vec<String>>,
_allow_freeform: Option<bool>,
) -> Pin<Box<dyn Future<Output = Option<UserInputResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_user_input<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_question: String,
_choices: Option<Vec<String>>,
_allow_freeform: Option<bool>,
) -> Pin<Box<dyn Future<Output = Option<UserInputResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The CLI is asking the user a question (optionally with a list of
choices). Read more
Source§fn on_external_tool<'life0, 'async_trait>(
&'life0 self,
invocation: ToolInvocation,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_external_tool<'life0, 'async_trait>(
&'life0 self,
invocation: ToolInvocation,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The CLI wants to invoke a client-defined (“external”) tool. Read more
Source§fn on_elicitation<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_request_id: RequestId,
_request: ElicitationRequest,
) -> Pin<Box<dyn Future<Output = ElicitationResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_elicitation<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_request_id: RequestId,
_request: ElicitationRequest,
) -> Pin<Box<dyn Future<Output = ElicitationResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The CLI is requesting an elicitation (structured form / URL prompt). Read more
Source§fn on_exit_plan_mode<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_data: ExitPlanModeData,
) -> Pin<Box<dyn Future<Output = ExitPlanModeResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_exit_plan_mode<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_data: ExitPlanModeData,
) -> Pin<Box<dyn Future<Output = ExitPlanModeResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The CLI is asking the user whether to exit plan mode. Read more
Source§fn on_auto_mode_switch<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_error_code: Option<String>,
_retry_after_seconds: Option<f64>,
) -> Pin<Box<dyn Future<Output = AutoModeSwitchResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_auto_mode_switch<'life0, 'async_trait>(
&'life0 self,
_session_id: SessionId,
_error_code: Option<String>,
_retry_after_seconds: Option<f64>,
) -> Pin<Box<dyn Future<Output = AutoModeSwitchResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The CLI is asking whether to switch to auto model after an eligible
rate limit. Read more
Auto Trait Implementations§
impl Freeze for NoopHandler
impl RefUnwindSafe for NoopHandler
impl Send for NoopHandler
impl Sync for NoopHandler
impl Unpin for NoopHandler
impl UnsafeUnpin for NoopHandler
impl UnwindSafe for NoopHandler
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