pub struct RequestUserInputTool;Expand description
Tool declaration for requesting structured user input mid-turn.
This tool allows the LLM to ask 1-3 short questions with optional multiple-choice options.
The actual interactive UI implementation is provided by the VT Code front-end (TUI runloop) which can intercept this tool call and present a modal.
Trait Implementations§
Source§impl Tool for RequestUserInputTool
impl Tool for RequestUserInputTool
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
_args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
_args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool with given arguments Read more
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get the tool’s description
Source§fn parameter_schema(&self) -> Option<Value>
fn parameter_schema(&self) -> Option<Value>
Optional JSON schema for the tool’s parameters, if available.
Source§fn default_permission(&self) -> ToolPolicy
fn default_permission(&self) -> ToolPolicy
Default execution policy for this tool.
Source§fn is_mutating(&self) -> bool
fn is_mutating(&self) -> bool
Whether this tool mutates state (files, environment, etc). Read more
Source§fn is_parallel_safe(&self) -> bool
fn is_parallel_safe(&self) -> bool
Whether this tool is safe to run in parallel with other tools. Read more
Source§fn kind(&self) -> &'static str
fn kind(&self) -> &'static str
Get the kind/category of this tool for matching against policies. Read more
Source§fn execute_dual<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<SplitToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_dual<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<SplitToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute with dual-channel output (LLM summary + UI content) Read more
Source§fn config_schema(&self) -> Option<Value>
fn config_schema(&self) -> Option<Value>
Optional JSON schema for the tool’s configuration, if available.
Source§fn state_schema(&self) -> Option<Value>
fn state_schema(&self) -> Option<Value>
Optional JSON schema describing state persisted by the tool, if any.
Source§fn prompt_path(&self) -> Option<Cow<'static, str>>
fn prompt_path(&self) -> Option<Cow<'static, str>>
Optional prompt path metadata (e.g., for loading companion prompts).
Source§fn allow_patterns(&self) -> Option<&'static [&'static str]>
fn allow_patterns(&self) -> Option<&'static [&'static str]>
Optional allowlist patterns the tool considers pre-approved.
Source§fn deny_patterns(&self) -> Option<&'static [&'static str]>
fn deny_patterns(&self) -> Option<&'static [&'static str]>
Optional denylist patterns the tool considers blocked.
Source§fn matches_kind(&self, pattern: &str) -> bool
fn matches_kind(&self, pattern: &str) -> bool
Check if this tool matches a given kind pattern. Read more
Source§fn resource_hints(&self, _args: &Value) -> Vec<String>
fn resource_hints(&self, _args: &Value) -> Vec<String>
Resources this tool might access (paths, URLs, etc). Read more
Source§fn execution_cost(&self) -> u8
fn execution_cost(&self) -> u8
Estimated execution cost (1-10 scale). Read more
Auto Trait Implementations§
impl Forget for RequestUserInputTool
impl Freeze for RequestUserInputTool
impl Move for RequestUserInputTool
impl RefUnwindSafe for RequestUserInputTool
impl Send for RequestUserInputTool
impl Sync for RequestUserInputTool
impl Unpin for RequestUserInputTool
impl UnsafeUnpin for RequestUserInputTool
impl UnwindSafe for RequestUserInputTool
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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> 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