MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / list

Method list

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

Source from the content-addressed store, hash-verified

616 }
617
618 pub fn list(&self) -> Vec<&AgentInfo> {
619 let mut agents: Vec<&AgentInfo> = self.agents.values().filter(|a| !a.hidden).collect();
620 agents.sort_by(|a, b| {
621 let a_is_build = a.name == "build";
622 let b_is_build = b.name == "build";
623 if a_is_build {
624 return std::cmp::Ordering::Less;
625 }
626 if b_is_build {
627 return std::cmp::Ordering::Greater;
628 }
629 a.name.cmp(&b.name)
630 });
631 agents
632 }
633
634 pub fn list_all(&self) -> Vec<&AgentInfo> {
635 self.agents.values().collect()

Callers 1

get_providerMethod · 0.45

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected