#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum SlashCategory {
Session,
Model,
Info,
Memory,
Tools,
Debug,
Planning,
Advanced,
}
impl SlashCategory {
#[must_use]
pub fn as_str(self) -> &'static str {
match self {
Self::Session => "Session",
Self::Model => "Model",
Self::Info => "Info",
Self::Memory => "Memory",
Self::Tools => "Tools",
Self::Debug => "Debug",
Self::Planning => "Planning",
Self::Advanced => "Advanced",
}
}
}
pub struct SlashCommandInfo {
pub name: &'static str,
pub args: &'static str,
pub description: &'static str,
pub category: SlashCategory,
pub feature_gate: Option<&'static str>,
}
pub const COMMANDS: &[SlashCommandInfo] = &[
SlashCommandInfo {
name: "/help",
args: "",
description: "Show this help message",
category: SlashCategory::Info,
feature_gate: None,
},
SlashCommandInfo {
name: "/status",
args: "",
description: "Show current session status (provider, model, tokens, uptime)",
category: SlashCategory::Info,
feature_gate: None,
},
SlashCommandInfo {
name: "/skills",
args: "",
description: "List loaded skills",
category: SlashCategory::Info,
feature_gate: None,
},
SlashCommandInfo {
name: "/log",
args: "",
description: "Toggle verbose log output",
category: SlashCategory::Info,
feature_gate: None,
},
SlashCommandInfo {
name: "/exit",
args: "",
description: "Exit the agent (also: /quit)",
category: SlashCategory::Session,
feature_gate: None,
},
SlashCommandInfo {
name: "/clear",
args: "",
description: "Clear conversation history",
category: SlashCategory::Session,
feature_gate: None,
},
SlashCommandInfo {
name: "/clear-queue",
args: "",
description: "Discard queued messages",
category: SlashCategory::Session,
feature_gate: None,
},
SlashCommandInfo {
name: "/compact",
args: "",
description: "Compact the context window",
category: SlashCategory::Session,
feature_gate: None,
},
SlashCommandInfo {
name: "/model",
args: "[id|refresh]",
description: "Show or switch the active model",
category: SlashCategory::Model,
feature_gate: None,
},
SlashCommandInfo {
name: "/feedback",
args: "<skill> <message>",
description: "Submit feedback for a skill",
category: SlashCategory::Memory,
feature_gate: None,
},
SlashCommandInfo {
name: "/graph",
args: "[subcommand]",
description: "Query or manage the knowledge graph",
category: SlashCategory::Memory,
feature_gate: None,
},
SlashCommandInfo {
name: "/skill",
args: "<name>",
description: "Load and display a skill body",
category: SlashCategory::Tools,
feature_gate: None,
},
SlashCommandInfo {
name: "/mcp",
args: "[add|list|tools|remove]",
description: "Manage MCP servers",
category: SlashCategory::Tools,
feature_gate: None,
},
SlashCommandInfo {
name: "/image",
args: "<path>",
description: "Attach an image to the next message",
category: SlashCategory::Tools,
feature_gate: None,
},
SlashCommandInfo {
name: "/agent",
args: "[subcommand]",
description: "Manage sub-agents",
category: SlashCategory::Tools,
feature_gate: None,
},
SlashCommandInfo {
name: "/plan",
args: "[goal|confirm|cancel|status|list|resume|retry]",
description: "Create or manage execution plans",
category: SlashCategory::Planning,
feature_gate: None,
},
SlashCommandInfo {
name: "/debug-dump",
args: "[path]",
description: "Enable or toggle debug dump output",
category: SlashCategory::Debug,
feature_gate: None,
},
SlashCommandInfo {
name: "/dump-format",
args: "<json|raw|trace>",
description: "Switch debug dump format at runtime",
category: SlashCategory::Debug,
feature_gate: None,
},
#[cfg(feature = "scheduler")]
SlashCommandInfo {
name: "/scheduler",
args: "[list]",
description: "List scheduled tasks",
category: SlashCategory::Tools,
feature_gate: Some("scheduler"),
},
#[cfg(feature = "experiments")]
SlashCommandInfo {
name: "/experiment",
args: "[subcommand]",
description: "Experimental features",
category: SlashCategory::Advanced,
feature_gate: Some("experiments"),
},
#[cfg(feature = "lsp-context")]
SlashCommandInfo {
name: "/lsp",
args: "",
description: "Show LSP context status",
category: SlashCategory::Advanced,
feature_gate: Some("lsp-context"),
},
];