#[derive(Debug, Clone)]
pub struct DoctorReport {
pub detections: Vec<super::ToolDetection>,
pub health_results: Vec<super::HealthCheckResult>,
pub system_info: SystemInfo,
pub timestamp: chrono::DateTime<chrono::Utc>,
}
#[derive(Debug, Clone)]
pub struct SystemInfo {
pub os: String,
pub arch: String,
pub shell: Option<String>,
pub git_version: Option<String>,
}
impl SystemInfo {
pub fn new() -> Self {
let os = std::env::consts::OS.to_string();
let arch = std::env::consts::ARCH.to_string();
let shell = std::env::var("SHELL").ok();
let git_version = std::process::Command::new("git")
.arg("--version")
.output()
.ok()
.and_then(|output| String::from_utf8(output.stdout).ok());
Self {
os,
arch,
shell,
git_version,
}
}
}