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