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

Method list

atomic-agent/src/hooks/mod.rs:417–421  ·  view source on GitHub ↗

Returns a list of all registered agent names, sorted alphabetically. # Example ```rust use atomic_agent::hooks::AgentRegistry; let registry = AgentRegistry::with_defaults(); let names = registry.list(); assert!(!names.is_empty()); ```

(&self)

Source from the content-addressed store, hash-verified

415 /// assert!(!names.is_empty());
416 /// ```
417 pub fn list(&self) -> Vec<&str> {
418 let mut names: Vec<&str> = self.agents.iter().map(|a| a.name()).collect();
419 names.sort_unstable();
420 names
421 }
422
423 /// Returns the number of registered agents.
424 pub fn count(&self) -> usize {

Callers 5

requireMethod · 0.45
fmtMethod · 0.45
for_each_hookFunction · 0.45

Calls 3

collectMethod · 0.45
iterMethod · 0.45
nameMethod · 0.45

Tested by 3

for_each_hookFunction · 0.36