

























@@ -134,7 +134,9 @@ describe("sanitizeToolUseResultPairing", () => {
134134"toolResult",
135135"user",
136136]);
137-expect(getAssistantToolCallBlocks(result.messages)).toMatchObject([
137+expect(
138+getAssistantToolCallBlocks(result.messages).map(({ id, name }) => ({ id, name })),
139+).toEqual([
138140{ id: "call_1", name: "read" },
139141{ id: "call_2", name: "exec" },
140142{ id: "call_3", name: "write" },
@@ -339,7 +341,7 @@ describe("sanitizeToolCallInputs legacy block filtering", () => {
339341340342const out = sanitizeToolCallInputs(input, { allowedToolNames: ["write", "exec"] });
341343342-expect(getAssistantToolCallBlocks(out)).toMatchObject([
344+expect(getAssistantToolCallBlocks(out).map(({ type, name }) => ({ type, name }))).toEqual([
343345{ type: "tool_call", name: "write" },
344346{ type: "function_call", name: "exec" },
345347]);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。