test ai-blog

This commit is contained in:
2025-07-15 17:32:20 +09:00
parent 75f108e7b8
commit 0110773592
73 changed files with 9000 additions and 30 deletions

View File

@@ -107,6 +107,8 @@ enum Commands {
#[command(subcommand)]
command: OauthCommands,
},
/// Interactive blog writing mode (default)
Interactive,
}
#[derive(Subcommand)]
@@ -189,10 +191,8 @@ async fn main() -> Result<()> {
return Ok(());
}
// Require subcommand if no version flag
let command = cli.command.ok_or_else(|| {
anyhow::anyhow!("No subcommand provided. Use --help for usage information.")
})?;
// If no subcommand provided, start interactive mode
let command = cli.command.unwrap_or(Commands::Interactive);
match command {
Commands::Init { path } => {
@@ -280,6 +280,9 @@ async fn main() -> Result<()> {
}
}
}
Commands::Interactive => {
commands::interactive::run().await?;
}
}
Ok(())