oli_server/app/
commands.rs

1use serde::{Deserialize, Serialize};
2
3/// Special command definition
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct SpecialCommand {
6    pub name: String,
7    pub description: String,
8}
9
10impl SpecialCommand {
11    pub fn new(name: &str, description: &str) -> Self {
12        Self {
13            name: name.to_string(),
14            description: description.to_string(),
15        }
16    }
17}
18
19/// Get available commands
20pub fn get_available_commands() -> Vec<SpecialCommand> {
21    vec![
22        SpecialCommand::new("/help", "Show help and available commands"),
23        SpecialCommand::new("/clear", "Clear conversation history"),
24        SpecialCommand::new("/exit", "Exit the application"),
25    ]
26}