mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 18:03:56 +00:00
chore: update readme (#98)
This commit is contained in:
parent
c0800e1a43
commit
dc2a2b1687
19 changed files with 379 additions and 136 deletions
28
gigacode/src/main.rs
Normal file
28
gigacode/src/main.rs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
use clap::Parser;
|
||||
use sandbox_agent::cli::{
|
||||
CliConfig, CliError, Command, GigacodeCli, OpencodeArgs, init_logging, run_command,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
if let Err(err) = run() {
|
||||
tracing::error!(error = %err, "gigacode failed");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
fn run() -> Result<(), CliError> {
|
||||
let cli = GigacodeCli::parse();
|
||||
let config = CliConfig {
|
||||
token: cli.token,
|
||||
no_token: cli.no_token,
|
||||
gigacode: true,
|
||||
};
|
||||
let command = cli
|
||||
.command
|
||||
.unwrap_or_else(|| Command::Opencode(OpencodeArgs::default()));
|
||||
if let Err(err) = init_logging(&command) {
|
||||
eprintln!("failed to init logging: {err}");
|
||||
return Err(err);
|
||||
}
|
||||
run_command(&command, &config)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue