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

Method load_all_with_remote

crates/opencode-config/src/loader.rs:226–232  ·  view source on GitHub ↗

Loads all config sources including remote `.well-known/opencode` endpoints. Merge order (low -> high precedence): 1. Remote .well-known/opencode (org defaults) -- lowest priority 2. Global config (~/.config/opencode/opencode.json{,c}) 3. Custom config (OPENCODE_CONFIG) 4. Project config (opencode.json{,c}) 5. .opencode directories 6. Inline config (OPENCODE_CONFIG_CONTENT) 7. Managed config direct

(&mut self, project_dir: P)

Source from the content-addressed store, hash-verified

224 /// 6. Inline config (OPENCODE_CONFIG_CONTENT)
225 /// 7. Managed config directory (enterprise, highest priority)
226 pub async fn load_all_with_remote<P: AsRef<Path>>(&mut self, project_dir: P) -> Result<Config> {
227 let wellknown_config = crate::wellknown::load_wellknown().await;
228 self.config.merge(wellknown_config);
229
230 // Delegate to load_all which handles everything else
231 self.load_all(project_dir)
232 }
233
234 /// Load managed config files from enterprise directory (highest priority).
235 fn load_managed_config(&mut self) -> Result<()> {

Callers 1

load_config_with_remoteFunction · 0.80

Calls 3

load_wellknownFunction · 0.85
mergeMethod · 0.45
load_allMethod · 0.45

Tested by

no test coverage detected