fix(progress): preserve callback acceptance results (#120171)

* fix(progress): preserve callback acceptance results

* fix(progress): require transport acknowledgements

* fix(progress): preserve direct acceptance outcomes
This commit is contained in:
Josh Avant
2026-08-07 14:40:33 -05:00
committed by GitHub
parent b99c507ce6
commit c691f2e41c
50 changed files with 858 additions and 303 deletions
+14 -18
View File
@@ -707,10 +707,11 @@ export function createFeishuReplyDispatcher(params: CreateFeishuReplyDispatcherP
statusLine = nextStatusLine;
const hasStreamingSession = Boolean(streaming?.isActive() || streamingStartPromise);
if (!hasStreamingSession && (options?.startIfNeeded === false || renderMode !== "card")) {
return;
return false;
}
startStreaming();
flushStreamingCardUpdate(buildCombinedStreamText(reasoningText, streamText));
return false;
};
const sendChunkedTextReply = async (paramsLocal: {
@@ -1523,32 +1524,34 @@ export function createFeishuReplyDispatcher(params: CreateFeishuReplyDispatcherP
onPartialReply: previewStreamingEnabled
? (payload: ReplyPayload) => {
if (!payload.text) {
return;
return false;
}
const cleaned = stripReasoningTagsFromText(payload.text, {
mode: "strict",
trim: "both",
});
if (!cleaned) {
return;
return false;
}
startStreaming();
queueStreamingUpdate(cleaned, {
dedupeWithLastPartial: true,
mode: "snapshot",
});
return false;
}
: undefined,
onReasoningStream: reasoningPreviewEnabled
? (payload: ReplyPayload) => {
if (!payload.text) {
return;
return false;
}
startStreaming();
queueReasoningUpdate(formatReasoningMessage(payload.text));
return false;
}
: undefined,
onReasoningEnd: reasoningPreviewEnabled ? () => {} : undefined,
onReasoningEnd: reasoningPreviewEnabled ? () => false : undefined,
onToolStart: previewStreamingEnabled
? (payload: {
name?: string;
@@ -1557,7 +1560,7 @@ export function createFeishuReplyDispatcher(params: CreateFeishuReplyDispatcherP
detailMode?: "explain" | "raw";
}) => {
if (!isChannelProgressDraftWorkToolName(payload.name)) {
return;
return false;
}
const statusLineLocal = formatChannelProgressDraftLineForEntry(
account.config,
@@ -1572,25 +1575,18 @@ export function createFeishuReplyDispatcher(params: CreateFeishuReplyDispatcherP
},
);
if (statusLineLocal) {
updateStreamingStatusLine(statusLineLocal);
return updateStreamingStatusLine(statusLineLocal);
}
return false;
}
: undefined,
onAssistantMessageStart: previewStreamingEnabled
? () => {
updateStreamingStatusLine("", { startIfNeeded: false });
}
? () => updateStreamingStatusLine("", { startIfNeeded: false })
: undefined,
onCompactionStart: previewStreamingEnabled
? () => {
updateStreamingStatusLine("📦 **Compacting context...**");
}
: undefined,
onCompactionEnd: previewStreamingEnabled
? () => {
updateStreamingStatusLine("");
}
? () => updateStreamingStatusLine("📦 **Compacting context...**")
: undefined,
onCompactionEnd: previewStreamingEnabled ? () => updateStreamingStatusLine("") : undefined,
},
ensureNoVisibleReplyFallback,
getVisibleReplyState: () => ({