feat: add provider-native request switches (#5254)
This commit is contained in:
@@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";
|
||||
|
||||
import {
|
||||
canonicalToolTrace,
|
||||
mergeToolProgressTraceLines,
|
||||
mergeUniqueToolTraceLines,
|
||||
} from "@/lib/tool-traces";
|
||||
|
||||
@@ -26,4 +27,18 @@ describe("tool trace identity", () => {
|
||||
added: true,
|
||||
});
|
||||
});
|
||||
|
||||
it("replaces an empty streaming placeholder when hosted search arguments arrive", () => {
|
||||
expect(mergeToolProgressTraceLines(
|
||||
["web_search()"],
|
||||
[{ phase: "start", call_id: "ws-1", name: "web_search", arguments: {} }],
|
||||
['web_search({"query":"nanobot news"})'],
|
||||
[{
|
||||
phase: "end",
|
||||
call_id: "ws-1",
|
||||
name: "web_search",
|
||||
arguments: { query: "nanobot news" },
|
||||
}],
|
||||
)).toEqual(['web_search({"query":"nanobot news"})']);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user