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

Method from_optional_config

crates/opencode-agent/src/agent.rs:478–483  ·  view source on GitHub ↗
(config: Option<&LoadedConfig>)

Source from the content-addressed store, hash-verified

476 }
477
478 pub fn from_optional_config(config: Option<&LoadedConfig>) -> Self {
479 if let Some(config) = config {
480 return Self::from_config(config);
481 }
482 Self::new()
483 }
484
485 pub fn from_project_dir(project_dir: impl AsRef<Path>) -> Self {
486 match load_config(project_dir) {

Callers

nothing calls this directly

Calls 2

from_configFunction · 0.85
newFunction · 0.85

Tested by

no test coverage detected