fix(feishu): preserve long streaming replies

Keep a bounded streaming preview, then deliver the complete final answer across multiple cards. Preserve all provider message IDs and cover long snapshots and Unicode boundaries with regression tests.

Fixes #78
This commit is contained in:
xmanrui 2026-08-28 10:50:35 +08:00
parent 71ca552113
commit 6c6d4af936
7 changed files with 522 additions and 239 deletions

View file

@ -49,6 +49,7 @@ import { askInWorkspaceSession } from '../shared/workspace-session.mjs';
import { deliverOutboundArtifacts } from '../shared/semantic/artifact-delivery.mjs';
import {
createDeliveryReceipt,
providerMessageIdsFor,
} from '../shared/semantic/delivery.mjs';
import {
channelDeliveryFailure,
@ -3315,7 +3316,7 @@ export class FeishuHarnessBridge {
createDeliveryReceipt({
deliveryId: messageId,
presentation: 'feishu-cardkit',
providerMessageIds: stream?.messageId ? [stream.messageId] : [],
providerMessageIds: providerMessageIdsFor(stream),
}),
);
this.#status.streamResponses = (this.#status.streamResponses ?? 0) + 1;