Skip to main content

hh_cli/cli/tui/
commands.rs

1#[derive(Clone)]
2pub struct SlashCommand {
3    pub name: String,
4    pub description: String,
5}
6
7impl SlashCommand {
8    pub fn new(name: &str, description: &str) -> Self {
9        Self {
10            name: name.to_string(),
11            description: description.to_string(),
12        }
13    }
14}
15
16pub fn get_default_commands() -> Vec<SlashCommand> {
17    vec![
18        SlashCommand::new("/new", "Start a new session"),
19        SlashCommand::new("/model", "List or switch active model"),
20        SlashCommand::new("/compact", "Compact context for this session"),
21        SlashCommand::new("/quit", "Exit the application"),
22        SlashCommand::new("/resume", "Resume a previous session"),
23    ]
24}