mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 11:15:00 +00:00
refactor: centralize config update logging
This commit is contained in:
@@ -1,16 +1,12 @@
|
||||
import { formatCliCommand } from "../cli/command-format.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import {
|
||||
CONFIG_PATH_CLAWDBOT,
|
||||
readConfigFileSnapshot,
|
||||
resolveGatewayPort,
|
||||
writeConfigFile,
|
||||
} from "../config/config.js";
|
||||
import { readConfigFileSnapshot, resolveGatewayPort, writeConfigFile } from "../config/config.js";
|
||||
import { logConfigUpdated } from "../config/logging.js";
|
||||
import { ensureControlUiAssetsBuilt } from "../infra/control-ui-assets.js";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
import { defaultRuntime } from "../runtime.js";
|
||||
import { note } from "../terminal/note.js";
|
||||
import { resolveUserPath, shortenHomePath } from "../utils.js";
|
||||
import { resolveUserPath } from "../utils.js";
|
||||
import { createClackPrompter } from "../wizard/clack-prompter.js";
|
||||
import { WizardCancelledError } from "../wizard/prompts.js";
|
||||
import { removeChannelConfigWizard } from "./configure.channels.js";
|
||||
@@ -253,7 +249,7 @@ export async function runConfigureWizard(
|
||||
mode,
|
||||
});
|
||||
await writeConfigFile(remoteConfig);
|
||||
runtime.log(`Updated ${shortenHomePath(CONFIG_PATH_CLAWDBOT)}`);
|
||||
logConfigUpdated(runtime);
|
||||
outro("Remote gateway configured.");
|
||||
return;
|
||||
}
|
||||
@@ -286,7 +282,7 @@ export async function runConfigureWizard(
|
||||
mode,
|
||||
});
|
||||
await writeConfigFile(nextConfig);
|
||||
runtime.log(`Updated ${shortenHomePath(CONFIG_PATH_CLAWDBOT)}`);
|
||||
logConfigUpdated(runtime);
|
||||
};
|
||||
|
||||
if (opts.sections) {
|
||||
|
||||
Reference in New Issue
Block a user