






















@@ -4,6 +4,7 @@ import {
44buildRealtimeVoiceAgentConsultPrompt,
55collectRealtimeVoiceAgentConsultVisibleText,
66parseRealtimeVoiceAgentConsultArgs,
7+REALTIME_VOICE_AGENT_CONSULT_TOOL,
78REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME,
89resolveRealtimeVoiceAgentConsultToolPolicy,
910resolveRealtimeVoiceAgentConsultTools,
@@ -28,13 +29,17 @@ describe("realtime voice agent consult tool", () => {
2829});
29303031it("accepts provider question aliases from realtime tool calls", () => {
31-expect(parseRealtimeVoiceAgentConsultArgs({ prompt: " Check the repo. " })).toMatchObject({
32+expect(parseRealtimeVoiceAgentConsultArgs({ prompt: " Check the repo. " })).toStrictEqual({
33+context: undefined,
3234question: "Check the repo.",
35+responseStyle: undefined,
3336});
3437expect(
3538parseRealtimeVoiceAgentConsultArgs({ query: " Send a Discord message. " }),
36-).toMatchObject({
39+).toStrictEqual({
40+context: undefined,
3741question: "Send a Discord message.",
42+responseStyle: undefined,
3843});
3944});
4045@@ -76,8 +81,8 @@ describe("realtime voice agent consult tool", () => {
7681expect(resolveRealtimeVoiceAgentConsultToolPolicy("bad", "safe-read-only")).toBe(
7782"safe-read-only",
7883);
79-expect(resolveRealtimeVoiceAgentConsultTools("safe-read-only")).toEqual([
80-expect.objectContaining({ name: REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME }),
84+expect(resolveRealtimeVoiceAgentConsultTools("safe-read-only")).toStrictEqual([
85+REALTIME_VOICE_AGENT_CONSULT_TOOL,
8186]);
8287expect(resolveRealtimeVoiceAgentConsultTools("none")).toStrictEqual([]);
8388expect(resolveRealtimeVoiceAgentConsultToolsAllow("safe-read-only")).toEqual([
@@ -103,10 +108,7 @@ describe("realtime voice agent consult tool", () => {
103108104109expect(
105110resolveRealtimeVoiceAgentConsultTools("safe-read-only", [duplicateConsultTool, customTool]),
106-).toEqual([
107-expect.objectContaining({ name: REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME }),
108-customTool,
109-]);
111+).toStrictEqual([REALTIME_VOICE_AGENT_CONSULT_TOOL, customTool]);
110112expect(resolveRealtimeVoiceAgentConsultTools("none", [customTool])).toEqual([customTool]);
111113});
112114});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。