




















@@ -500,12 +500,13 @@ describe("applyMediaUnderstanding", () => {
500500expect(transcribeAudio).not.toHaveBeenCalled();
501501expect(result.appliedAudio).toBe(true);
502502expect(result.outputs).toEqual([
503-expect.objectContaining({
503+{
504504kind: "audio.transcription",
505+attachmentIndex: 0,
505506text: "[Voice note could not be transcribed because the audio attachment was too small]",
506507provider: "openclaw",
507508model: "synthetic-empty-audio",
508-}),
509+},
509510]);
510511expect(ctx.Transcript).toBe(
511512"[Voice note could not be transcribed because the audio attachment was too small]",
@@ -545,12 +546,13 @@ describe("applyMediaUnderstanding", () => {
545546expect(transcribeAudio).not.toHaveBeenCalled();
546547expect(result.appliedAudio).toBe(true);
547548expect(result.outputs).toEqual([
548-expect.objectContaining({
549+{
549550kind: "audio.transcription",
551+attachmentIndex: 0,
550552text: "[Voice note could not be transcribed because the audio attachment was too small]",
551553provider: "openclaw",
552554model: "synthetic-empty-audio",
553-}),
555+},
554556]);
555557expect(ctx.Transcript).toBe(
556558"[Voice note could not be transcribed because the audio attachment was too small]",
@@ -1021,12 +1023,12 @@ describe("applyMediaUnderstanding", () => {
10211023expect(transcribeAudio).not.toHaveBeenCalled();
10221024expect(result.appliedAudio).toBe(false);
10231025expect(ctx.Transcript).toBe("preflight transcript");
1024-expect(result.decisions).toContainEqual(
1025- expect.objectContaining({
1026- capability: "audio",
1027- outcome: "no-attachment",
1028-}),
1029-);
1026+const audioDecision = result.decisions.find((decision) => decision.capability === "audio");
1027+expect(audioDecision).toEqual({
1028+capability: "audio",
1029+outcome: "no-attachment",
1030+attachments: [],
1031+});
10301032});
1031103310321034it("handles multiple audio attachments when attachment mode is all", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。