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