mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 20:35:39 -06:00
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:
@@ -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: () => ({
|
||||
|
||||
Reference in New Issue
Block a user