






























@@ -34,14 +34,14 @@ describe("resolveDiscordPreflightAudioMentionContext", () => {
3434 cfg,
3535});
363637-expect(transcribeFirstAudioMock).toHaveBeenCalledWith(
38-expect.objectContaining({
39-ctx: expect.objectContaining({
40- MediaUrls: ["https://cdn.discordapp.com/attachments/voice.ogg"],
41- MediaTypes: ["audio/ogg"],
42- }),
43-}),
44-);
37+expect(transcribeFirstAudioMock).toHaveBeenCalledWith({
38+ctx: {
39+MediaUrls: ["https://cdn.discordapp.com/attachments/voice.ogg"],
40+MediaTypes: ["audio/ogg"],
41+},
42+cfg,
43+agentDir: undefined,
44+});
4545expect(result).toEqual({
4646hasAudioAttachment: true,
4747hasTypedText: false,
@@ -67,14 +67,14 @@ describe("resolveDiscordPreflightAudioMentionContext", () => {
6767 cfg,
6868});
696970-expect(transcribeFirstAudioMock).toHaveBeenCalledWith(
71-expect.objectContaining({
72-ctx: expect.objectContaining({
73- MediaUrls: ["https://cdn.discordapp.com/attachments/voice.opus"],
74- MediaTypes: ["audio/opus"],
75- }),
76-}),
77-);
70+expect(transcribeFirstAudioMock).toHaveBeenCalledWith({
71+ctx: {
72+MediaUrls: ["https://cdn.discordapp.com/attachments/voice.opus"],
73+MediaTypes: ["audio/opus"],
74+},
75+cfg,
76+agentDir: undefined,
77+});
7878});
79798080it("preflights Discord voice attachments by waveform metadata", async () => {
@@ -97,14 +97,14 @@ describe("resolveDiscordPreflightAudioMentionContext", () => {
9797 cfg,
9898});
9999100-expect(transcribeFirstAudioMock).toHaveBeenCalledWith(
101-expect.objectContaining({
102-ctx: expect.objectContaining({
103- MediaUrls: ["https://cdn.discordapp.com/attachments/voice"],
104- MediaTypes: ["audio/ogg"],
105- }),
106-}),
107-);
100+expect(transcribeFirstAudioMock).toHaveBeenCalledWith({
101+ctx: {
102+MediaUrls: ["https://cdn.discordapp.com/attachments/voice"],
103+MediaTypes: ["audio/ogg"],
104+},
105+cfg,
106+agentDir: undefined,
107+});
108108});
109109110110it("does not preflight typed direct-message audio", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。