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

Function matcher_list_has_atomic

atomic-agent/src/hooks/agy.rs:1132–1139  ·  view source on GitHub ↗

Returns `true` if any matcher group contains an Atomic hook.

(list: &[Value])

Source from the content-addressed store, hash-verified

1130
1131/// Returns `true` if any matcher group contains an Atomic hook.
1132fn matcher_list_has_atomic(list: &[Value]) -> bool {
1133 list.iter().any(|group| {
1134 group
1135 .get("hooks")
1136 .and_then(Value::as_array)
1137 .is_some_and(|hooks| direct_list_has_atomic(hooks))
1138 })
1139}
1140
1141/// Check whether the given event list (direct or matcher-wrapped) already
1142/// contains an Atomic hook command.

Callers 1

event_list_has_atomicFunction · 0.85

Calls 3

direct_list_has_atomicFunction · 0.85
getMethod · 0.65
iterMethod · 0.45

Tested by

no test coverage detected