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

Method list_subagents

crates/opencode-agent/src/agent.rs:658–666  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

656 }
657
658 pub fn list_subagents(&self) -> Vec<&AgentInfo> {
659 let mut agents: Vec<&AgentInfo> = self
660 .agents
661 .values()
662 .filter(|a| matches!(a.mode, AgentMode::Subagent) && !a.hidden)
663 .collect();
664 agents.sort_by(|a, b| a.name.cmp(&b.name));
665 agents
666 }
667
668 pub fn default_agent(&self) -> &AgentInfo {
669 if let Some(general) = self.get(BuiltinAgent::General.as_str()) {

Callers

nothing calls this directly

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected