mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 11:04:58 +00:00
feat: gigacode (#92)
This commit is contained in:
parent
0a73d1d8e8
commit
a02393436c
40 changed files with 2736 additions and 1327 deletions
28
server/packages/gigacode/src/main.rs
Normal file
28
server/packages/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