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

Function remove_atomic_hooks

atomic-agent/src/hooks/gemini_cli.rs:824–830  ·  view source on GitHub ↗

Remove all Atomic hooks from a matcher list. Preserves non-Atomic hooks. Removes empty matchers (those with no remaining hooks after Atomic hooks are removed).

(matchers: &mut Vec<GeminiHookMatcher>)

Source from the content-addressed store, hash-verified

822/// Preserves non-Atomic hooks. Removes empty matchers (those with no
823/// remaining hooks after Atomic hooks are removed).
824fn remove_atomic_hooks(matchers: &mut Vec<GeminiHookMatcher>) {
825 for m in matchers.iter_mut() {
826 m.hooks.retain(|h| !is_atomic_hook(&h.command));
827 }
828 // Remove empty matchers
829 matchers.retain(|m| !m.hooks.is_empty());
830}
831
832// Tests
833

Callers 4

install_toMethod · 0.70
uninstall_fromMethod · 0.70
test_remove_atomic_hooksFunction · 0.70

Calls 3

iter_mutMethod · 0.80
is_atomic_hookFunction · 0.70
is_emptyMethod · 0.45