Check if Atomic hooks are installed in a settings file.
(settings_path: &Path)
| 473 | |
| 474 | /// Check if Atomic hooks are installed in a settings file. |
| 475 | fn is_installed_in(settings_path: &Path) -> bool { |
| 476 | if !settings_path.exists() { |
| 477 | return false; |
| 478 | } |
| 479 | |
| 480 | match Self::read_settings(settings_path) { |
| 481 | Ok((_, hooks)) => { |
| 482 | has_any_atomic_hook(&hooks.session_start) |
| 483 | || has_any_atomic_hook(&hooks.session_end) |
| 484 | || has_any_atomic_hook(&hooks.before_agent) |
| 485 | || has_any_atomic_hook(&hooks.after_agent) |
| 486 | || has_any_atomic_hook(&hooks.before_tool) |
| 487 | || has_any_atomic_hook(&hooks.after_tool) |
| 488 | } |
| 489 | Err(_) => false, |
| 490 | } |
| 491 | } |
| 492 | |
| 493 | // Global install/uninstall (same pattern as Claude Code) |
| 494 |
nothing calls this directly
no test coverage detected