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

Function hook_command_exists

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

Check if a specific hook command already exists in a matcher list.

(matchers: &[GeminiHookMatcher], matcher_str: &str, command: &str)

Source from the content-addressed store, hash-verified

764
765/// Check if a specific hook command already exists in a matcher list.
766fn hook_command_exists(matchers: &[GeminiHookMatcher], matcher_str: &str, command: &str) -> bool {
767 matchers
768 .iter()
769 .any(|m| m.matcher == matcher_str && m.hooks.iter().any(|h| h.command == command))
770}
771
772/// Add a hook command to a matcher list, creating the matcher if needed.
773fn add_hook_to_matcher(

Callers 1

install_toMethod · 0.70

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected