Skip to content

Commit e9bb131

Browse files
committed
test(agents): align direct media block delivery coverage
1 parent 5dd5fba commit e9bb131

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/auto-reply/reply/agent-runner.media-paths.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ describe("runReplyAgent media path normalization", () => {
268268
}),
269269
);
270270

271-
expect(result).toMatchObject({
271+
expect(result).toBeUndefined();
272+
expect(onBlockReply).toHaveBeenCalledWith({
272273
text: "here is the chart",
273274
mediaUrl: "/tmp/outbound-media/1-chart.png",
274275
mediaUrls: ["/tmp/outbound-media/1-chart.png"],
@@ -277,7 +278,6 @@ describe("runReplyAgent media path normalization", () => {
277278
audioAsVoice: false,
278279
});
279280
expect(resolveOutboundAttachmentFromUrlMock).toHaveBeenCalledTimes(1);
280-
expect(onBlockReply).not.toHaveBeenCalled();
281281
});
282282

283283
it("does not create a second media context inside runAgentTurnWithFallback when onBlockReply is provided", async () => {

src/auto-reply/reply/reply-delivery.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ export function createBlockReplyDeliveryHandler(params: {
158158
payload: blockPayload,
159159
});
160160
} else if (blockHasMedia) {
161-
// Media-bearing block replies (including text+media tool attachments) are not reliably
162-
// reconstructible from the assistant's final text, so send them directly when streaming is off.
163161
await sendDirectBlockReply({
164162
onBlockReply: params.onBlockReply,
165163
directlySentBlockKeys: params.directlySentBlockKeys,

0 commit comments

Comments
 (0)