1mod chat;
4mod claude;
5
6pub use chat::ChatCommand;
7
8use anyhow::Result;
9use clap::{Parser, Subcommand};
10
11#[derive(Parser)]
13pub struct AiCommand {
14 #[command(subcommand)]
16 pub command: AiSubcommands,
17}
18
19#[derive(Subcommand)]
21pub enum AiSubcommands {
22 Chat(ChatCommand),
24 Claude(claude::ClaudeCommand),
26}
27
28impl AiCommand {
29 pub async fn execute(self) -> Result<()> {
31 match self.command {
32 AiSubcommands::Chat(cmd) => cmd.execute().await,
33 AiSubcommands::Claude(cmd) => cmd.execute(),
34 }
35 }
36}