pub struct InteractiveCodingHooks;Expand description
Interactive hooks for the coding agent.
Tool safety is controlled by active tool selection and extension hooks, not by a core interactive permission popup.
Implementations§
Trait Implementations§
Source§impl AgentHooks for InteractiveCodingHooks
impl AgentHooks for InteractiveCodingHooks
Source§fn convert_to_llm(
&self,
messages: &[AgentMessage],
) -> Result<Vec<Message>, AgentError>
fn convert_to_llm( &self, messages: &[AgentMessage], ) -> Result<Vec<Message>, AgentError>
Convert agent messages to provider-facing messages.
Source§fn transform_context(
&self,
messages: Vec<AgentMessage>,
_signal: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentMessage>, AgentError>> + Send>>
fn transform_context( &self, messages: Vec<AgentMessage>, _signal: CancellationToken, ) -> Pin<Box<dyn Future<Output = Result<Vec<AgentMessage>, AgentError>> + Send>>
Transform messages before conversion to LLM format.
Source§fn should_stop_after_turn(
&self,
_ctx: ShouldStopAfterTurnContext,
) -> Pin<Box<dyn Future<Output = bool> + Send>>
fn should_stop_after_turn( &self, _ctx: ShouldStopAfterTurnContext, ) -> Pin<Box<dyn Future<Output = bool> + Send>>
Decide whether the loop should stop after this turn.
Source§fn before_tool_call(
&self,
_ctx: BeforeToolCallContext,
) -> Pin<Box<dyn Future<Output = BeforeToolCallResult> + Send>>
fn before_tool_call( &self, _ctx: BeforeToolCallContext, ) -> Pin<Box<dyn Future<Output = BeforeToolCallResult> + Send>>
Hook called before a tool is executed.
Source§fn after_tool_call(
&self,
_ctx: AfterToolCallContext,
) -> Pin<Box<dyn Future<Output = AfterToolCallResult> + Send>>
fn after_tool_call( &self, _ctx: AfterToolCallContext, ) -> Pin<Box<dyn Future<Output = AfterToolCallResult> + Send>>
Hook called after a tool has been executed.
Source§fn prepare_next_turn(
&self,
_ctx: PrepareNextTurnContext,
) -> Pin<Box<dyn Future<Output = Option<AgentLoopTurnUpdate>> + Send>>
fn prepare_next_turn( &self, _ctx: PrepareNextTurnContext, ) -> Pin<Box<dyn Future<Output = Option<AgentLoopTurnUpdate>> + Send>>
Prepare context before the next turn begins.
Auto Trait Implementations§
impl Freeze for InteractiveCodingHooks
impl RefUnwindSafe for InteractiveCodingHooks
impl Send for InteractiveCodingHooks
impl Sync for InteractiveCodingHooks
impl Unpin for InteractiveCodingHooks
impl UnsafeUnpin for InteractiveCodingHooks
impl UnwindSafe for InteractiveCodingHooks
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more