pub struct SlashCommand {
pub id: String,
pub name: String,
pub full_command: String,
pub scope: String,
pub namespace: Option<String>,
pub file_path: String,
pub content: String,
pub description: Option<String>,
pub allowed_tools: Vec<String>,
pub has_bash_commands: bool,
pub has_file_references: bool,
pub accepts_arguments: bool,
}Expand description
Represents a slash command with its metadata and content.
A slash command is a reusable prompt template that can be invoked
by the user using the / prefix. Commands can be namespaced and
may include special syntax for bash commands, file references,
and argument placeholders.
Fields§
§id: StringUnique identifier for the command (e.g., “project-commands-build-md”).
name: StringThe command name without namespace (e.g., “build”).
full_command: StringThe full command including namespace prefix (e.g., “/dev:build”).
scope: StringThe scope where the command is defined: “default”, “project”, or “user”.
namespace: Option<String>Optional namespace for the command (e.g., “dev” for “/dev:build”).
file_path: StringAbsolute path to the command file on disk.
content: StringThe Markdown content of the command (body only, without frontmatter).
description: Option<String>Human-readable description of what the command does.
allowed_tools: Vec<String>List of tool names that this command is allowed to use. If empty, all tools are allowed.
has_bash_commands: boolWhether the command contains bash command syntax (!...).
has_file_references: boolWhether the command contains file reference syntax (@file).
accepts_arguments: boolWhether the command accepts $ARGUMENTS placeholder.
Trait Implementations§
Source§impl Clone for SlashCommand
impl Clone for SlashCommand
Source§fn clone(&self) -> SlashCommand
fn clone(&self) -> SlashCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more