test: tighten context pruning placeholder assertion · openclaw/openclaw@e84eb59
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
File tree
src/agents/pi-hooks/context-pruning
| Original file line number | Diff line number | Diff line change |
|---|
@@ -390,7 +390,7 @@ describe("pruneContextMessages", () => {
|
390 | 390 | |
391 | 391 | const toolResult = result[1] as Extract<AgentMessage, { role: "toolResult" }>; |
392 | 392 | expect(toolResult.content).toHaveLength(1); |
393 | | -expect(toolResult.content[0]).toMatchObject({ type: "text" }); |
| 393 | +expect(toolResult.content[0]?.type).toBe("text"); |
394 | 394 | const textBlock = toolResult.content[0] as { type: "text"; text: string }; |
395 | 395 | expect(textBlock.text).toContain("[image removed during context pruning]"); |
396 | 396 | expect(textBlock.text).toContain( |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。