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

Method custom

crates/opencode-agent/src/agent.rs:367–388  ·  view source on GitHub ↗
(name: impl Into<String>)

Source from the content-addressed store, hash-verified

365 }
366
367 pub fn custom(name: impl Into<String>) -> Self {
368 let name = name.into();
369 Self {
370 name: name.clone(),
371 description: None,
372 mode: AgentMode::All,
373 model: None,
374 model_preference: None,
375 system_prompt: None,
376 temperature: None,
377 top_p: None,
378 max_tokens: None,
379 max_steps: Some(100),
380 allowed_tools: Vec::new(),
381 options: HashMap::new(),
382 permission: build_agent_ruleset(&name, &[]),
383 hidden: false,
384 native: false,
385 variant: None,
386 color: None,
387 }
388 }
389
390 pub fn with_model(
391 mut self,

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
build_agent_rulesetFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected