use clap::Subcommand;
use super::{create, logs, instructions};
#[derive(Subcommand)]
pub enum Commands {
Create {
#[command(subcommand)]
command: create::Commands,
},
Instructions {
#[command(subcommand)]
command: instructions::Commands,
},
Logs {
#[command(subcommand)]
command: logs::Commands,
},
}
impl Commands {
pub async fn handle(self, cli_config: &crate::Config, handle: &objectiveai_cli_sdk::output::Handle) -> Result<(), crate::error::Error> {
match self {
Commands::Create { command } => command.handle(cli_config, handle).await,
Commands::Instructions { command } => command.handle(cli_config, handle).await,
Commands::Logs { command } => command.handle(cli_config, handle).await,
}
}
}