Skip to content

Commit b9350e0

Browse files
committed
fix(feishu): disable block streaming to prevent silent reply drops
When blockStreamingDefault is 'on' (the default), the block streaming pipeline calls feishu's deliver with kind 'block'. Feishu's deliver silently drops these chunks when renderMode is 'auto' and text has no code blocks/tables. The pipeline then marks didStream=true (no error was thrown), so the final reply is also suppressed — resulting in zero replies delivered. Set disableBlockStreaming: true in replyOptions so the agent bypasses the block streaming pipeline entirely for Feishu. Streaming cards via onPartialReply remain unaffected. Closes #38258
1 parent ae96a81 commit b9350e0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

extensions/feishu/src/reply-dispatcher.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,17 @@ describe("createFeishuReplyDispatcher streaming behavior", () => {
219219
expect(sendMediaFeishuMock).not.toHaveBeenCalled();
220220
});
221221

222+
it("sets disableBlockStreaming in replyOptions to prevent silent reply drops", async () => {
223+
const result = createFeishuReplyDispatcher({
224+
cfg: {} as never,
225+
agentId: "agent",
226+
runtime: {} as never,
227+
chatId: "oc_chat",
228+
});
229+
230+
expect(result.replyOptions).toHaveProperty("disableBlockStreaming", true);
231+
});
232+
222233
it("uses streaming session for auto mode markdown payloads", async () => {
223234
createFeishuReplyDispatcher({
224235
cfg: {} as never,

extensions/feishu/src/reply-dispatcher.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ export function createFeishuReplyDispatcher(params: CreateFeishuReplyDispatcherP
382382
replyOptions: {
383383
...replyOptions,
384384
onModelSelected: prefixContext.onModelSelected,
385+
disableBlockStreaming: true,
385386
onPartialReply: streamingEnabled
386387
? (payload: ReplyPayload) => {
387388
if (!payload.text) {

0 commit comments

Comments
 (0)