refactor: normalize cli command hints
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
waitForGatewayReachable,
|
||||
resolveControlUiLinks,
|
||||
} from "../commands/onboard-helpers.js";
|
||||
import { formatCliCommand } from "../cli/command-format.js";
|
||||
import type { OnboardOptions } from "../commands/onboard-types.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import { resolveGatewayService } from "../daemon/service.js";
|
||||
@@ -396,7 +397,7 @@ export async function finalizeOnboardingWizard(options: FinalizeOnboardingOption
|
||||
"Clawdbot uses Brave Search for the `web_search` tool. Without a Brave Search API key, web search won’t work.",
|
||||
"",
|
||||
"Set it up interactively:",
|
||||
"- Run: clawdbot configure --section web",
|
||||
`- Run: ${formatCliCommand("clawdbot configure --section web")}`,
|
||||
"- Enable web_search and paste your Brave Search API key",
|
||||
"",
|
||||
"Alternative: set BRAVE_API_KEY in the Gateway environment (no config changes).",
|
||||
|
||||
@@ -26,6 +26,7 @@ import type {
|
||||
OnboardOptions,
|
||||
ResetScope,
|
||||
} from "../commands/onboard-types.js";
|
||||
import { formatCliCommand } from "../cli/command-format.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import {
|
||||
CONFIG_PATH_CLAWDBOT,
|
||||
@@ -97,7 +98,7 @@ export async function runOnboardingWizard(
|
||||
|
||||
if (!snapshot.valid) {
|
||||
await prompter.outro(
|
||||
"Config invalid. Run `clawdbot doctor` to repair it, then re-run onboarding.",
|
||||
`Config invalid. Run \`${formatCliCommand("clawdbot doctor")}\` to repair it, then re-run onboarding.`,
|
||||
);
|
||||
runtime.exit(1);
|
||||
return;
|
||||
@@ -133,7 +134,7 @@ export async function runOnboardingWizard(
|
||||
}
|
||||
}
|
||||
|
||||
const quickstartHint = "Configure details later via clawdbot configure.";
|
||||
const quickstartHint = `Configure details later via ${formatCliCommand("clawdbot configure")}.`;
|
||||
const advancedHint = "Configure port, network, Tailscale, and auth options.";
|
||||
const explicitFlowRaw = opts.flow?.trim();
|
||||
if (explicitFlowRaw && explicitFlowRaw !== "quickstart" && explicitFlowRaw !== "advanced") {
|
||||
|
||||
Reference in New Issue
Block a user