use std::path::Path;
use std::process::Command;
use crate::agent::backend::MAX_CONCURRENT_SUBAGENTS;
pub(crate) fn build_codex_app_server_command(folder: &Path, model: &str) -> Command {
let mut command = Command::new("codex");
command
.arg("--model")
.arg(model)
.arg("-c")
.arg(format!(
"agents.max_concurrent_threads_per_session={MAX_CONCURRENT_SUBAGENTS}"
))
.arg("app-server")
.arg("--listen")
.arg("stdio://")
.current_dir(folder);
command
}
pub(crate) fn build_gemini_acp_command(folder: &Path, model: &str) -> Command {
let mut command = Command::new("gemini");
command
.arg("--acp")
.arg("--model")
.arg(model)
.current_dir(folder);
command
}