Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
import { getRuntimeConfigSnapshot } from "../../config/runtime-snapshot.js";
import type { OpenClawConfig } from "../../config/types.openclaw.js";
import { coerceSecretRef } from "../../config/types.secrets.js";
function hasConfiguredSkillApiKeyRef(config?: OpenClawConfig): boolean {
const entries = config?.skills?.entries;
if (!entries || typeof entries !== "object") {
return false;
}
for (const skillConfig of Object.values(entries)) {
if (!skillConfig || typeof skillConfig !== "object") {
continue;
}
if (coerceSecretRef(skillConfig.apiKey) !== null) {
return true;
}
}
return false;
}
export function resolveSkillRuntimeConfig(config?: OpenClawConfig): OpenClawConfig | undefined {
const runtimeConfig = getRuntimeConfigSnapshot();
if (!runtimeConfig) {
return config;
}
if (!config) {
return runtimeConfig;
}
const runtimeHasRawSkillSecretRefs = hasConfiguredSkillApiKeyRef(runtimeConfig);
const configHasRawSkillSecretRefs = hasConfiguredSkillApiKeyRef(config);
if (runtimeHasRawSkillSecretRefs && !configHasRawSkillSecretRefs) {
return config;
}
return runtimeConfig;
}
¤ Dauer der Verarbeitung: 0.16 Sekunden
(vorverarbeitet am 2026-04-27)
¤
*© Formatika GbR, Deutschland