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

Function group_has_command

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

Source from the content-addressed store, hash-verified

457}
458
459fn group_has_command(group: &Value, command: &str) -> bool {
460 group
461 .get("hooks")
462 .and_then(Value::as_array)
463 .is_some_and(|hooks| {
464 hooks.iter().any(|hook| {
465 hook.get("command")
466 .and_then(Value::as_str)
467 .is_some_and(|cmd| cmd == command)
468 })
469 })
470}
471
472fn remove_atomic_hooks(hooks: &mut Map<String, Value>) {
473 for value in hooks.values_mut() {

Callers 1

add_hook_to_groupsFunction · 0.85

Calls 2

getMethod · 0.65
iterMethod · 0.45

Tested by

no test coverage detected