Remove hooks described by an integration-supplied manifest file. Mirrors `atomic agent enable --hooks`: removes only the entries whose command matches the manifest's `command_prefix` from its target file.
(&self, manifest: &std::path::Path)
| 266 | /// Mirrors `atomic agent enable --hooks`: removes only the entries whose |
| 267 | /// command matches the manifest's `command_prefix` from its target file. |
| 268 | fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> { |
| 269 | use atomic_agent::hooks::manifest::uninstall_from_manifest; |
| 270 | |
| 271 | match uninstall_from_manifest(manifest) { |
| 272 | Ok(outcome) => { |
| 273 | if outcome.removed > 0 { |
| 274 | print_success(&format!( |
| 275 | "Removed {} hook command(s) from {}", |
| 276 | outcome.removed, |
| 277 | outcome.target.display(), |
| 278 | )); |
| 279 | println!(); |
| 280 | println!("Agent turns will no longer be recorded automatically."); |
| 281 | } else { |
| 282 | println!("No Atomic hooks found in {}.", outcome.target.display()); |
| 283 | } |
| 284 | } |
| 285 | Err(e) => { |
| 286 | print_error(&format!( |
| 287 | "Failed to remove hooks from manifest {}: {}", |
| 288 | manifest.display(), |
| 289 | e, |
| 290 | )); |
| 291 | } |
| 292 | } |
| 293 | Ok(()) |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | // Tests |
no test coverage detected