use rlx_gemma::{cli, multimodal_cli};
use std::process::ExitCode;
fn main() -> ExitCode {
let raw: Vec<String> = std::env::args().skip(1).collect();
let (multimodal, args): (bool, Vec<String>) = if raw.iter().any(|a| a == "--multimodal") {
(
true,
raw.into_iter().filter(|a| a != "--multimodal").collect(),
)
} else {
(false, raw)
};
let result = if multimodal {
multimodal_cli::run(&args)
} else {
cli::run(&args)
};
match result {
Ok(()) => ExitCode::SUCCESS,
Err(e) => {
eprintln!("rlx-gemma: {e:#}");
ExitCode::FAILURE
}
}
}