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

Method is_installed_in

atomic-agent/src/hooks/gemini_cli.rs:471–487  ·  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

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

Callers

nothing calls this directly

Calls 3

read_settingsFunction · 0.85
has_any_atomic_hookFunction · 0.85
existsMethod · 0.45

Tested by

no test coverage detected