refactor: centralize config update logging

This commit is contained in:
Peter Steinberger
2026-01-23 04:01:11 +00:00
parent 246ee490f6
commit e750ad5e75
20 changed files with 73 additions and 70 deletions

View File

@@ -29,12 +29,12 @@ import type {
import { formatCliCommand } from "../cli/command-format.js";
import type { ClawdbotConfig } from "../config/config.js";
import {
CONFIG_PATH_CLAWDBOT,
DEFAULT_GATEWAY_PORT,
readConfigFileSnapshot,
resolveGatewayPort,
writeConfigFile,
} from "../config/config.js";
import { logConfigUpdated } from "../config/logging.js";
import type { RuntimeEnv } from "../runtime.js";
import { defaultRuntime } from "../runtime.js";
import { resolveUserPath } from "../utils.js";
@@ -306,7 +306,7 @@ export async function runOnboardingWizard(
let nextConfig = await promptRemoteGatewayConfig(baseConfig, prompter);
nextConfig = applyWizardMetadata(nextConfig, { command: "onboard", mode });
await writeConfigFile(nextConfig);
runtime.log(`Updated ${CONFIG_PATH_CLAWDBOT}`);
logConfigUpdated(runtime);
await prompter.outro("Remote gateway configured.");
return;
}
@@ -405,7 +405,7 @@ export async function runOnboardingWizard(
}
await writeConfigFile(nextConfig);
runtime.log(`Updated ${CONFIG_PATH_CLAWDBOT}`);
logConfigUpdated(runtime);
await ensureWorkspaceAndSessions(workspaceDir, runtime, {
skipBootstrap: Boolean(nextConfig.agents?.defaults?.skipBootstrap),
});