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

Function hook_command_exists

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

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

Callers 1

install_toMethod · 0.70

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected