mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 10:30:43 +00:00
20 lines
625 B
TypeScript
20 lines
625 B
TypeScript
import {
|
|
getRuntimeConfigSnapshot,
|
|
getRuntimeConfigSourceSnapshot,
|
|
} from "../config/runtime-snapshot.js";
|
|
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
|
|
|
export function resolvePluginActivationSourceConfig(params: {
|
|
config?: OpenClawConfig;
|
|
activationSourceConfig?: OpenClawConfig;
|
|
}): OpenClawConfig {
|
|
if (params.activationSourceConfig !== undefined) {
|
|
return params.activationSourceConfig;
|
|
}
|
|
const sourceSnapshot = getRuntimeConfigSourceSnapshot();
|
|
if (sourceSnapshot && params.config === getRuntimeConfigSnapshot()) {
|
|
return sourceSnapshot;
|
|
}
|
|
return params.config ?? {};
|
|
}
|