use std::process::Command;
use crate::profiles::switch_to_profile;
pub fn switch_and_launch_claude(profile_name: &str, extra_args: &[String]) -> ! {
switch_to_profile(profile_name);
#[cfg(unix)]
{
use std::os::unix::process::CommandExt;
let err = Command::new("claude").args(extra_args).exec();
panic!("Failed to launch claude: {}", err);
}
#[cfg(windows)]
{
let status = Command::new("claude")
.args(extra_args)
.status()
.expect("Failed to launch claude");
std::process::exit(status.code().unwrap_or(1));
}
}