openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
23 lines (22 loc) • 1.12 kB
JavaScript
import { O as setRuntimeConfigSnapshot, c as getRuntimeConfigSourceSnapshot } from "./runtime-snapshot-WbwbY5b7.mjs";
import { t as captureRuntimeConfigAsyncReader } from "./io.runtime-DsJ2dLCQ.mjs";
import "./config-CMA-J084.mjs";
import { c as getModelsCommandSecretTargetIds } from "./command-secret-targets-CH2XIeV_.mjs";
import { t as resolveCommandConfigWithSecrets } from "./command-config-resolution-Bv3V6f3-.mjs";
//#region src/commands/models/load-config.ts
/** Config loader for model commands with command-scoped secret resolution. */
/** Loads config, resolves model command secrets, and preserves the source snapshot. */
async function loadModelsConfig(e) {
const t = await captureRuntimeConfigAsyncReader(e.skipPluginValidation ? { skipPluginValidation: true } : void 0)();
const n = getRuntimeConfigSourceSnapshot() ?? t;
const { resolvedConfig: r } = await resolveCommandConfigWithSecrets({
config: t,
commandName: e.commandName,
targetIds: getModelsCommandSecretTargetIds(),
runtime: e.runtime
});
setRuntimeConfigSnapshot(r, n);
return r;
}
//#endregion
export { loadModelsConfig as t };