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

Function group_has_command

atomic-agent/src/hooks/codex.rs:526–537  ·  view source on GitHub ↗
(group: &Value, command: &str)

Source from the content-addressed store, hash-verified

524}
525
526fn group_has_command(group: &Value, command: &str) -> bool {
527 group
528 .get("hooks")
529 .and_then(Value::as_array)
530 .is_some_and(|hooks| {
531 hooks.iter().any(|hook| {
532 hook.get("command")
533 .and_then(Value::as_str)
534 .is_some_and(|cmd| cmd == command)
535 })
536 })
537}
538
539fn group_has_hook_spec(
540 group: &Value,

Callers 1

add_hook_to_groupsFunction · 0.85

Calls 2

getMethod · 0.65
iterMethod · 0.45

Tested by

no test coverage detected