refactor: normalize cli command hints

This commit is contained in:
Peter Steinberger
2026-01-20 07:42:21 +00:00
parent 11b9b6dba5
commit 6d5195c890
106 changed files with 521 additions and 220 deletions

View File

@@ -13,6 +13,7 @@ import {
} from "../agents/auth-profiles.js";
import type { ClawdbotConfig } from "../config/config.js";
import { note } from "../terminal/note.js";
import { formatCliCommand } from "../cli/command-format.js";
import type { DoctorPrompter } from "./doctor-prompter.js";
export async function maybeRepairAnthropicOAuthProfileId(
@@ -49,9 +50,9 @@ function formatAuthIssueHint(issue: AuthIssue): string | null {
return "Run `claude setup-token` on the gateway host.";
}
if (issue.provider === "openai-codex" && issue.profileId === CODEX_CLI_PROFILE_ID) {
return "Run `codex login` (or `clawdbot configure` → OpenAI Codex OAuth).";
return `Run \`codex login\` (or \`${formatCliCommand("clawdbot configure")}\` → OpenAI Codex OAuth).`;
}
return "Re-auth via `clawdbot configure` or `clawdbot onboard`.";
return `Re-auth via \`${formatCliCommand("clawdbot configure")}\` or \`${formatCliCommand("clawdbot onboard")}\`.`;
}
function formatAuthIssueLine(issue: AuthIssue): string {