fix(cli): explain plugin and secrets failures

This commit is contained in:
Vincent Koc
2026-05-09 08:07:28 +08:00
parent d47b64609c
commit 05414e2ac3
4 changed files with 64 additions and 17 deletions

View File

@@ -3,6 +3,7 @@ import { defaultRuntime } from "../runtime.js";
import { formatDocsLink } from "../terminal/links.js";
import { theme } from "../terminal/theme.js";
import { resolveOptionFromCommand, runCommandWithRuntime } from "./cli-utils.js";
import { formatCliCommand } from "./command-format.js";
function runModelsCommand(action: () => Promise<void>) {
return runCommandWithRuntime(defaultRuntime, action);
@@ -14,7 +15,7 @@ function rejectAgentScopedModelWrite(command: Command, commandName: "set" | "set
return;
}
throw new Error(
`\`openclaw models ${commandName}\` does not support \`--agent\`; it only updates global model defaults. Remove \`--agent\` or use agent config to set a per-agent model override.`,
`openclaw models ${commandName} does not support --agent; it only updates global model defaults. Remove --agent, or run ${formatCliCommand("openclaw agents list")} and set the per-agent model in agent config.`,
);
}