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

Function group_has_command

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

Source from the content-addressed store, hash-verified

453}
454
455fn group_has_command(group: &Value, command: &str) -> bool {
456 group
457 .get("hooks")
458 .and_then(Value::as_array)
459 .is_some_and(|hooks| {
460 hooks.iter().any(|hook| {
461 hook.get("command")
462 .and_then(Value::as_str)
463 .is_some_and(|cmd| cmd == command)
464 })
465 })
466}
467
468fn remove_atomic_hooks(hooks: &mut Map<String, Value>) {
469 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