@workclaw/openclaw-workclaw 1.0.332 → 1.0.333
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,13 +28,13 @@ async function writeConfigFile(newConfig, cfg, log) {
|
|
|
28
28
|
const runtime = getWorkclawRuntime();
|
|
29
29
|
const configApi = runtime.config;
|
|
30
30
|
if (typeof configApi.mutateConfigFile === "function") {
|
|
31
|
-
await configApi.mutateConfigFile(
|
|
32
|
-
Object.assign(existing, newConfig)
|
|
31
|
+
await configApi.mutateConfigFile({
|
|
32
|
+
mutate: (existing) => Object.assign(existing, newConfig)
|
|
33
33
|
});
|
|
34
34
|
logger.info(`[智小途-配置] 通过 runtime.config.mutateConfigFile 增量写入配置`);
|
|
35
35
|
} else {
|
|
36
|
-
await configApi.writeConfigFile(
|
|
37
|
-
logger.info(`[智小途-配置] 通过 runtime.config.writeConfigFile
|
|
36
|
+
await configApi.writeConfigFile(cfg);
|
|
37
|
+
logger.info(`[智小途-配置] 通过 runtime.config.writeConfigFile 写入配置`);
|
|
38
38
|
}
|
|
39
39
|
Object.assign(cfg, newConfig);
|
|
40
40
|
} catch (err) {
|