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

Method new

crates/opencode-agent/src/agent.rs:461–470  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

459
460impl AgentRegistry {
461 pub fn new() -> Self {
462 let mut agents = HashMap::new();
463 for builtin in BuiltinAgent::all() {
464 let agent = AgentInfo::from_builtin(builtin);
465 agents.insert(builtin.as_str().to_string(), agent);
466 }
467 // Legacy hidden agent kept for backward compatibility with older task flows.
468 agents.insert("summary".to_string(), AgentInfo::summary());
469 Self { agents }
470 }
471
472 pub fn from_config(config: &LoadedConfig) -> Self {
473 let mut registry = Self::new();

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
as_strMethod · 0.45

Tested by

no test coverage detected