fix(cli): replace stale doctor/restart command hints (#24485)

* fix(cli): replace stale doctor and restart hints

* fix: add changelog for CLI hint updates (#24485) (thanks @chilu18)

---------

Co-authored-by: Muhammed Mukhthar CM <mukhtharcm@gmail.com>
This commit is contained in:
Peter Machona
2026-02-24 09:19:59 +00:00
committed by GitHub
parent 1c228dc249
commit 097a6a83a0
6 changed files with 24 additions and 7 deletions

View File

@@ -143,7 +143,7 @@ describe("noteMemorySearchHealth", () => {
expect(message).toContain("reports memory embeddings are ready");
});
it("uses configure hint when gateway probe is unavailable and API key is missing", async () => {
it("uses model configure hint when gateway probe is unavailable and API key is missing", async () => {
resolveMemorySearchConfig.mockReturnValue({
provider: "gemini",
local: {},
@@ -160,8 +160,23 @@ describe("noteMemorySearchHealth", () => {
const message = note.mock.calls[0]?.[0] as string;
expect(message).toContain("Gateway memory probe for default agent is not ready");
expect(message).toContain("openclaw configure");
expect(message).not.toContain("auth add");
expect(message).toContain("openclaw configure --section model");
expect(message).not.toContain("openclaw auth add --provider");
});
it("uses model configure hint in auto mode when no provider credentials are found", async () => {
resolveMemorySearchConfig.mockReturnValue({
provider: "auto",
local: {},
remote: {},
});
await noteMemorySearchHealth(cfg);
expect(note).toHaveBeenCalledTimes(1);
const message = String(note.mock.calls[0]?.[0] ?? "");
expect(message).toContain("openclaw configure --section model");
expect(message).not.toContain("openclaw auth add --provider");
});
});

View File

@@ -84,7 +84,7 @@ export async function noteMemorySearchHealth(
"",
"Fix (pick one):",
`- Set ${envVar} in your environment`,
`- Configure credentials: ${formatCliCommand("openclaw configure")}`,
`- Configure credentials: ${formatCliCommand("openclaw configure --section model")}`,
`- To disable: ${formatCliCommand("openclaw config set agents.defaults.memorySearch.enabled false")}`,
"",
`Verify: ${formatCliCommand("openclaw memory status --deep")}`,
@@ -125,7 +125,7 @@ export async function noteMemorySearchHealth(
"",
"Fix (pick one):",
"- Set OPENAI_API_KEY, GEMINI_API_KEY, VOYAGE_API_KEY, or MISTRAL_API_KEY in your environment",
`- Configure credentials: ${formatCliCommand("openclaw configure")}`,
`- Configure credentials: ${formatCliCommand("openclaw configure --section model")}`,
`- For local embeddings: configure agents.defaults.memorySearch.provider and local model path`,
`- To disable: ${formatCliCommand("openclaw config set agents.defaults.memorySearch.enabled false")}`,
"",