MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / is_installed_in

Method is_installed_in

atomic-agent/src/hooks/gemini_cli.rs:475–491  ·  view source on GitHub ↗

Check if Atomic hooks are installed in a settings file.

(settings_path: &Path)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

read_settingsFunction · 0.85
has_any_atomic_hookFunction · 0.70
existsMethod · 0.45

Tested by

no test coverage detected