use codex_wrapper::{Codex, CodexCommand, ReviewCommand};
#[tokio::main]
async fn main() -> codex_wrapper::Result<()> {
let codex = Codex::builder().build()?;
let output = ReviewCommand::new()
.uncommitted()
.ephemeral()
.execute(&codex)
.await?;
println!("{}", output.stdout);
let result = ReviewCommand::new()
.uncommitted()
.ephemeral()
.execute_json(&codex)
.await?;
println!("--- typed ---");
println!("thread: {:?}", result.thread_id);
println!("comments: {}", result.result);
println!("tokens: {:?}", result.usage.and_then(|u| u.total()));
Ok(())
}