MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / resolve_default_file_plugin_config

Function resolve_default_file_plugin_config

crates/core/src/plugin.rs:1098–1104  ·  view source on GitHub ↗

Resolves the default `plugins.toml` layering into one JSON document, or an empty object when no plugin file exists.

()

Source from the content-addressed store, hash-verified

1096/// Resolves the default `plugins.toml` layering into one JSON document, or an
1097/// empty object when no plugin file exists.
1098fn resolve_default_file_plugin_config() -> Result<Json> {
1099 let paths =
1100 default_plugin_config_paths(std::env::current_dir().ok().as_deref(), user_config_dir());
1101 Ok(load_plugin_config_files(paths)?
1102 .map(|(value, _sources)| value)
1103 .unwrap_or_else(|| Json::Object(Map::new())))
1104}
1105
1106use std::path::{Path, PathBuf};
1107

Callers 1

initialize_pluginsFunction · 0.85

Calls 4

load_plugin_config_filesFunction · 0.85
okMethod · 0.80
user_config_dirFunction · 0.70

Tested by

no test coverage detected