pub struct AssistantCommandInvocation {
pub name: String,
pub input: Option<String>,
}Expand description
A harness command a turn invokes.
ACP delivers a command as ORDINARY PROMPT TEXT — /name followed by
whatever input was typed after it, which is exactly what the schema’s
unstructured input form says the agent receives. So this is not an
alternative transport; it is a statement of intent the server turns into the
spec’s own delivery form, checks against what the agent advertised, and
records verbatim so the transcript says a command was invoked rather than
leaving a reader to infer it from a leading slash.
Fields§
§name: StringThe advertised command’s name, without the leading /.
input: Option<String>The text typed after the command name, when any was.
Implementations§
Source§impl AssistantCommandInvocation
impl AssistantCommandInvocation
Sourcepub fn prompt_line(&self) -> String
pub fn prompt_line(&self) -> String
The prompt line ACP delivers this invocation as.
/name alone, or /name input — the one place the delivery form is
spelled, so the wire tests and the turn path cannot disagree about it.
Trait Implementations§
Source§impl Clone for AssistantCommandInvocation
impl Clone for AssistantCommandInvocation
Source§fn clone(&self) -> AssistantCommandInvocation
fn clone(&self) -> AssistantCommandInvocation
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 AssistantCommandInvocation
impl Debug for AssistantCommandInvocation
Source§impl<'de> Deserialize<'de> for AssistantCommandInvocation
impl<'de> Deserialize<'de> for AssistantCommandInvocation
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>,
impl Eq for AssistantCommandInvocation
impl StructuralPartialEq for AssistantCommandInvocation
Source§impl TS for AssistantCommandInvocation
impl TS for AssistantCommandInvocation
Source§type WithoutGenerics = AssistantCommandInvocation
type WithoutGenerics = AssistantCommandInvocation
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = AssistantCommandInvocation
type OptionInnerType = AssistantCommandInvocation
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read more