(dc: &mut DoctorCounters, home: &Path)
| 254 | } |
| 255 | |
| 256 | fn doctor_check_cli_plugin(dc: &mut DoctorCounters, home: &Path) { |
| 257 | let plugin_path = cli_plugin_path(home); |
| 258 | |
| 259 | if !plugin_path.exists() { |
| 260 | dc.warn(&format!( |
| 261 | "{} not found — run `tracedecay install --agent antigravity` if you use the Antigravity CLI (#85)", |
| 262 | plugin_path.display() |
| 263 | )); |
| 264 | return; |
| 265 | } |
| 266 | |
| 267 | let settings = load_json_file(&plugin_path); |
| 268 | let server = settings.get("mcpServers").and_then(|v| v.get("tracedecay")); |
| 269 | |
| 270 | if server.and_then(|v| v.as_object()).is_some() { |
| 271 | dc.pass(&format!( |
| 272 | "CLI plugin registered in {}", |
| 273 | plugin_path.display() |
| 274 | )); |
| 275 | } else { |
| 276 | dc.fail(&format!( |
| 277 | "CLI plugin file exists but lacks `mcpServers.tracedecay` in {} — run `tracedecay install --agent antigravity`", |
| 278 | plugin_path.display() |
| 279 | )); |
| 280 | } |
| 281 | } |
no test coverage detected