#[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,
},
#[cfg(feature = "guardrail")]
SlashCommandInfo {
name: "/guardrail",
args: "",
description: "Show guardrail status (provider, model, action, timeout, stats)",
category: SlashCategory::Info,
feature_gate: Some("guardrail"),
},
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: "/reset",
args: "",
description: "Reset conversation history (alias for /clear, replies with confirmation)",
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: "/provider",
args: "[name|status]",
description: "List configured providers or switch to one by name",
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: "/memory",
args: "[tiers|promote <id>...]",
description: "Show memory tier stats or manually promote messages to semantic tier",
category: SlashCategory::Memory,
feature_gate: None,
},
#[cfg(feature = "compression-guidelines")]
SlashCommandInfo {
name: "/guidelines",
args: "",
description: "Show current compression guidelines",
category: SlashCategory::Memory,
feature_gate: Some("compression-guidelines"),
},
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"),
},
#[cfg(feature = "policy-enforcer")]
SlashCommandInfo {
name: "/policy",
args: "[status|check <tool> [args_json]]",
description: "Inspect policy status or dry-run evaluation",
category: SlashCategory::Tools,
feature_gate: Some("policy-enforcer"),
},
#[cfg(feature = "context-compression")]
SlashCommandInfo {
name: "/focus",
args: "",
description: "Show Focus Agent status (active session, knowledge block size)",
category: SlashCategory::Advanced,
feature_gate: Some("context-compression"),
},
#[cfg(feature = "context-compression")]
SlashCommandInfo {
name: "/sidequest",
args: "",
description: "Show SideQuest eviction stats (passes run, tokens freed)",
category: SlashCategory::Advanced,
feature_gate: Some("context-compression"),
},
];