mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:50:43 +00:00
fix(slack): skip empty progress refreshes
This commit is contained in:
@@ -744,6 +744,7 @@ describe("dispatchPreparedSlackMessage preview fallback", () => {
|
||||
mockedReplyOptionEvents = [
|
||||
{ kind: "item", progressText: "tool one" },
|
||||
{ kind: "item", progressText: "tool two" },
|
||||
{ kind: "partial", text: "partial answer" },
|
||||
];
|
||||
|
||||
await dispatchPreparedSlackMessage(
|
||||
|
||||
@@ -984,13 +984,15 @@ export async function dispatchPreparedSlackMessage(prepared: PreparedSlackMessag
|
||||
if (statusUpdateCount > 1 && statusUpdateCount % 4 !== 0) {
|
||||
return;
|
||||
}
|
||||
draftStream?.update(
|
||||
formatChannelProgressDraftText({
|
||||
entry: account.config,
|
||||
lines: previewToolProgressLines,
|
||||
seed: progressSeed,
|
||||
}),
|
||||
);
|
||||
const previewText = formatChannelProgressDraftText({
|
||||
entry: account.config,
|
||||
lines: previewToolProgressLines,
|
||||
seed: progressSeed,
|
||||
});
|
||||
if (!previewText) {
|
||||
return;
|
||||
}
|
||||
draftStream?.update(previewText);
|
||||
hasStreamedMessage = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user