MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / get_by_category

Method get_by_category

crates/opencode-tui/src/command.rs:523–533  ·  view source on GitHub ↗
(&self, category: &CommandCategory)

Source from the content-addressed store, hash-verified

521 }
522
523 pub fn get_by_category(&self, category: &CommandCategory) -> Vec<&SlashCommand> {
524 self.by_category
525 .get(category)
526 .map(|names| {
527 names
528 .iter()
529 .filter_map(|name| self.commands.get(name))
530 .collect()
531 })
532 .unwrap_or_default()
533 }
534
535 pub fn all_commands(&self) -> Vec<&SlashCommand> {
536 let mut seen = std::collections::HashSet::new();

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected