Skip to content

Commit a5745dd

Browse files
author
damaozi
committed
fix(doctor): replace nonexistent auth add command with openclaw onboard (#24220)
1 parent 5a0eb69 commit a5745dd

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Docs: https://docs.openclaw.ai
1313
### Fixes
1414

1515
- Security/Skills: escape user-controlled prompt, filename, and output-path values in `openai-image-gen` HTML gallery generation to prevent stored XSS in generated `index.html` output. (#12538) Thanks @CornBrother0x.
16+
- CLI/Doctor: replace nonexistent `openclaw auth add` command suggestion with `openclaw onboard` in memory search health check. (#24220)
1617
- Security/OTEL: redact sensitive values (API keys, tokens, credential fields) from diagnostics-otel log bodies, log attributes, and error/reason span fields before OTLP export. (#12542) Thanks @brandonwise.
1718
- Providers/OpenRouter: remove conflicting top-level `reasoning_effort` when injecting nested `reasoning.effort`, preventing OpenRouter 400 payload-validation failures for reasoning models. (#24120) thanks @tenequm.
1819
- Skills/Python: add CI + pre-commit linting (`ruff`) and pytest discovery coverage for Python scripts/tests under `skills/`, including package test execution from repo root. Thanks @vincentkoc.

src/commands/doctor-memory-search.test.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,38 @@ describe("noteMemorySearchHealth", () => {
126126
});
127127
expect(note).not.toHaveBeenCalled();
128128
});
129+
130+
it("suggests valid CLI commands when provider key is missing (#24220)", async () => {
131+
resolveMemorySearchConfig.mockReturnValue({
132+
provider: "openai",
133+
local: {},
134+
remote: {},
135+
});
136+
resolveApiKeyForProvider.mockRejectedValue(new Error("no key"));
137+
138+
await noteMemorySearchHealth(cfg);
139+
140+
expect(note).toHaveBeenCalledTimes(1);
141+
const message = note.mock.calls[0][0] as string;
142+
expect(message).not.toContain("openclaw auth add");
143+
expect(message).toContain("openclaw onboard");
144+
});
145+
146+
it("suggests valid CLI commands in auto mode when all keys are missing (#24220)", async () => {
147+
resolveMemorySearchConfig.mockReturnValue({
148+
provider: "auto",
149+
local: {},
150+
remote: {},
151+
});
152+
resolveApiKeyForProvider.mockRejectedValue(new Error("no key"));
153+
154+
await noteMemorySearchHealth(cfg);
155+
156+
expect(note).toHaveBeenCalledTimes(1);
157+
const message = note.mock.calls[0][0] as string;
158+
expect(message).not.toContain("openclaw auth add");
159+
expect(message).toContain("openclaw onboard");
160+
});
129161
});
130162

131163
describe("detectLegacyWorkspaceDirs", () => {

src/commands/doctor-memory-search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export async function noteMemorySearchHealth(cfg: OpenClawConfig): Promise<void>
6262
"",
6363
"Fix (pick one):",
6464
`- Set ${envVar} in your environment`,
65-
`- Add credentials: ${formatCliCommand(`openclaw auth add --provider ${resolved.provider}`)}`,
65+
`- Add credentials: ${formatCliCommand("openclaw onboard")}`,
6666
`- To disable: ${formatCliCommand("openclaw config set agents.defaults.memorySearch.enabled false")}`,
6767
"",
6868
`Verify: ${formatCliCommand("openclaw memory status --deep")}`,
@@ -89,7 +89,7 @@ export async function noteMemorySearchHealth(cfg: OpenClawConfig): Promise<void>
8989
"",
9090
"Fix (pick one):",
9191
"- Set OPENAI_API_KEY, GEMINI_API_KEY, VOYAGE_API_KEY, or MISTRAL_API_KEY in your environment",
92-
`- Add credentials: ${formatCliCommand("openclaw auth add --provider openai")}`,
92+
`- Add credentials: ${formatCliCommand("openclaw onboard")}`,
9393
`- For local embeddings: configure agents.defaults.memorySearch.provider and local model path`,
9494
`- To disable: ${formatCliCommand("openclaw config set agents.defaults.memorySearch.enabled false")}`,
9595
"",

0 commit comments

Comments
 (0)