Public declaration syntax from harness-sdk/src/commands/slash.rs Original source SHA-256: fc991eb86bed5eb30892607133dcf385bffeda020cc41ffd3dc0741407ca2ffe Function bodies and constant values are omitted. This is not the complete implementation. Source line 14 #[derive(Debug, Clone)] pub enum SlashResult { /// Command executed, display message to user. Message(String), /// Switch to the specified mode. SwitchMode(Mode), /// Stop the current autonomy session. StopAutonomy, /// Clear the chat history. ClearHistory, /// Show help text. ShowHelp(String), /// Quit the application. Quit, /// Command not found. NotFound(String), /// Toggle the command palette. TogglePalette, /// List available agents. ListAgents, /// Show session status. ShowStatus, /// Send expanded text as a chat message to the active agent. SendAsChat(String), } Source line 41 #[derive(Debug, Clone)] pub struct SlashArg { /// Argument name (e.g., "mode"). pub name: String, /// Whether this argument is required. pub required: bool, /// Possible values (e.g., \["chat", "auto"\]). pub options: Vec, /// Short description (e.g., "The mode to switch to"). pub description: String } Source line 54 #[derive(Debug, Clone)] pub struct SlashCommand { /// Command name (without the `/` prefix). pub name: String, /// Short description. pub description: String, /// Source label ("built-in" or plugin name). pub source: String, /// Aliases for this command. pub aliases: Vec, /// Usage template (e.g., "/mode "). pub usage: String, /// Structured argument definitions. pub args: Vec } Source line 80 pub struct SlashCommandRegistry { } Source line 87 #[must_use] pub fn new() -> Self; Source line 95 #[must_use] pub fn with_builtins() -> Self; Source line 225 #[must_use] pub fn lookup(&self, name: &str) -> Option<&SlashCommand>; Source line 230 pub fn register(&mut self, command: SlashCommand); Source line 239 #[must_use] pub fn list_commands(&self) -> Vec<&SlashCommand>; Source line 252 #[must_use] pub fn command_hints(&self) -> Vec; Source line 261 #[must_use] pub fn dropdown_items(&self) -> Vec; Source line 293 pub fn dispatch_slash(input: &str, registry: &SlashCommandRegistry) -> SlashResult;