openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
14 lines (13 loc) • 734 B
JavaScript
import { t as getChannelEnvVars } from "./channel-env-vars-CNrr7ug9.mjs";
import { r as resolveChannelConfigRecord, t as hasMeaningfulChannelConfigShallow } from "./channel-config-activation-D7BTlH2V.mjs";
//#region src/config/channel-configured-shared.ts
/** Detects static channel configuration from known env vars or `channels.<id>` config. */
function isStaticallyChannelConfigured(cfg, channelId, env = process.env) {
for (const envVar of getChannelEnvVars(channelId, {
config: cfg,
env
})) if (typeof env[envVar] === "string" && env[envVar].trim().length > 0) return true;
return hasMeaningfulChannelConfigShallow(resolveChannelConfigRecord(cfg, channelId));
}
//#endregion
export { isStaticallyChannelConfigured as t };