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)
| 177 | /// Mirrors `atomic agent enable --hooks`: removes only the entries whose |
| 178 | /// command matches the manifest's `command_prefix` from its target file. |
| 179 | fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> { |
| 180 | use atomic_agent::hooks::manifest::uninstall_from_manifest; |
| 181 | |
| 182 | match uninstall_from_manifest(manifest) { |
| 183 | Ok(outcome) => { |
| 184 | if outcome.removed > 0 { |
| 185 | print_success(&format!( |
| 186 | "Removed {} hook command(s) from {}", |
| 187 | outcome.removed, |
| 188 | outcome.target.display(), |
| 189 | )); |
| 190 | println!(); |
| 191 | println!("Agent turns will no longer be recorded automatically."); |
| 192 | } else { |
| 193 | println!("No Atomic hooks found in {}.", outcome.target.display()); |
| 194 | } |
| 195 | } |
| 196 | Err(e) => { |
| 197 | print_error(&format!( |
| 198 | "Failed to remove hooks from manifest {}: {}", |
| 199 | manifest.display(), |
| 200 | e, |
| 201 | )); |
| 202 | } |
| 203 | } |
| 204 | Ok(()) |
| 205 | } |
| 206 | |
| 207 | /// Remove hooks from global agent settings. |
| 208 | /// |
no test coverage detected