pub enum BashCommandAction {
Command {
command: String,
is_background: bool,
allow_multi: bool,
},
StatusCheck {
status_check: bool,
bg_command_id: Option<String>,
scrollback_lines: Option<usize>,
verbose: bool,
},
SendText {
send_text: String,
bg_command_id: Option<String>,
submit: bool,
},
SendSpecials {
send_specials: Vec<SpecialKey>,
bg_command_id: Option<String>,
submit: bool,
},
SendAscii {
send_ascii: Vec<u8>,
bg_command_id: Option<String>,
submit: bool,
},
}Expand description
Types of actions that can be performed with the BashCommand tool
Variants§
Command
Execute a shell command
Fields
allow_multi: boolOpt out of the single-top-level-statement guard. By default winx
rejects multi-statement commands (a; b, a && b; c, etc.) so the
agent has to be explicit about what it’s running. Set this to true
when you knowingly want to run a composite command without
wrapping it in bash -lc '...'.
StatusCheck
Check the status of a running command.
By default returns only what changed since the previous call — agents
driving long-lived TUIs do not need the cumulative buffer on every poll.
Set verbose: true to receive a fresh snapshot regardless of the dedup
hash, or scrollback_lines: Some(N) to also pull the last N lines from
the PTY ringbuffer.
Fields
SendText
Send text to a running command. Set submit to true to append a carriage
return after the bytes so the target program receives the input as a
completed line (matches what hitting Enter would do in a TUI).
SendSpecials
Send special keys to a running command. submit works the same as in
SendText.
SendAscii
Send ASCII characters to a running command. submit works the same as in
SendText.
Trait Implementations§
Source§impl Clone for BashCommandAction
impl Clone for BashCommandAction
Source§fn clone(&self) -> BashCommandAction
fn clone(&self) -> BashCommandAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BashCommandAction
impl Debug for BashCommandAction
Source§impl<'de> Deserialize<'de> for BashCommandAction
impl<'de> Deserialize<'de> for BashCommandAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for BashCommandAction
impl JsonSchema for BashCommandAction
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for BashCommandAction
impl RefUnwindSafe for BashCommandAction
impl Send for BashCommandAction
impl Sync for BashCommandAction
impl Unpin for BashCommandAction
impl UnsafeUnpin for BashCommandAction
impl UnwindSafe for BashCommandAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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)
&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)
&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
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>
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>
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