pub fn parse_command(input: &str) -> Option<ChatCommand>Expand description
Parses user input for slash commands.
Returns Some(ChatCommand) if the input is a valid command,
or None if it should be treated as a regular message.
ยงExamples
assert!(parse_command("/quit").is_some());
assert!(parse_command("/model claude-sonnet-4-0").is_some());
assert!(parse_command("Hello, Claude!").is_none());