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)
| 231 | /// Mirrors `atomic agent enable --hooks`: removes only the entries whose |
| 232 | /// command matches the manifest's `command_prefix` from its target file. |
| 233 | fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> { |
| 234 | use atomic_agent::hooks::manifest::uninstall_from_manifest; |
| 235 | |
| 236 | match uninstall_from_manifest(manifest) { |
| 237 | Ok(outcome) => { |
| 238 | if outcome.removed > 0 { |
| 239 | print_success(&format!( |
| 240 | "Removed {} hook command(s) from {}", |
| 241 | outcome.removed, |
| 242 | outcome.target.display(), |
| 243 | )); |
| 244 | println!(); |
| 245 | println!("Agent turns will no longer be recorded automatically."); |
| 246 | } else { |
| 247 | println!("No Atomic hooks found in {}.", outcome.target.display()); |
| 248 | } |
| 249 | } |
| 250 | Err(e) => { |
| 251 | print_error(&format!( |
| 252 | "Failed to remove hooks from manifest {}: {}", |
| 253 | manifest.display(), |
| 254 | e, |
| 255 | )); |
| 256 | } |
| 257 | } |
| 258 | Ok(()) |
| 259 | } |
| 260 | |
| 261 | /// Remove hooks from global agent settings. |
| 262 | /// |
no test coverage detected