fix: sync built-in channel enablement across config paths

This commit is contained in:
Peter Steinberger
2026-02-23 19:40:32 +00:00
parent 69b17a37e8
commit 87603b5c45
10 changed files with 213 additions and 86 deletions

View File

@@ -1,21 +1 @@
import type { OpenClawConfig } from "../config/config.js";
export function setPluginEnabledInConfig(
config: OpenClawConfig,
pluginId: string,
enabled: boolean,
): OpenClawConfig {
return {
...config,
plugins: {
...config.plugins,
entries: {
...config.plugins?.entries,
[pluginId]: {
...(config.plugins?.entries?.[pluginId] as object | undefined),
enabled,
},
},
},
};
}
export { setPluginEnabledInConfig } from "../plugins/toggle-config.js";