test: verify ACP error guidance · openclaw/openclaw@5dde25c
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,13 +7,15 @@ describe("formatAcpRuntimeErrorText", () => {
|
7 | 7 | const text = formatAcpRuntimeErrorText( |
8 | 8 | new AcpRuntimeError("ACP_BACKEND_MISSING", "backend missing"), |
9 | 9 | ); |
10 | | -expect(text).toContain("ACP error (ACP_BACKEND_MISSING): backend missing"); |
11 | | -expect(text).toContain("next:"); |
| 10 | +expect(text).toBe( |
| 11 | +"ACP error (ACP_BACKEND_MISSING): backend missing\nnext: Run `/acp doctor`, install/enable the backend plugin, then retry.", |
| 12 | +); |
12 | 13 | }); |
13 | 14 | |
14 | 15 | it("returns consistent ACP error envelope for runtime failures", () => { |
15 | 16 | const text = formatAcpRuntimeErrorText(new AcpRuntimeError("ACP_TURN_FAILED", "turn failed")); |
16 | | -expect(text).toContain("ACP error (ACP_TURN_FAILED): turn failed"); |
17 | | -expect(text).toContain("next:"); |
| 17 | +expect(text).toBe( |
| 18 | +"ACP error (ACP_TURN_FAILED): turn failed\nnext: Retry, or use `/acp cancel` and send the message again.", |
| 19 | +); |
18 | 20 | }); |
19 | 21 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。