[codex] Fix Discord progress mode dropping final replies (#83443) · openclaw/openclaw@a9407d2
compoodment
·
2026-05-18
·
via Recent Commits to openclaw:main
File tree
extensions/discord/src/monitor
| Original file line number | Diff line number | Diff line change |
|---|
@@ -39,6 +39,7 @@ Docs: https://docs.openclaw.ai
|
39 | 39 | |
40 | 40 | - Agents/code mode: preserve agent, session, run, and channel context in `before_tool_call` hooks for top-level `exec`/`wait` dispatches. Fixes #83387. |
41 | 41 | - Replies: keep final payload delivery after live preview updates so channels can finalize or send the completed answer instead of losing preview-only drafts. (#83468) |
| 42 | +- Discord: deliver final replies in progress-mode preview streams instead of deduplicating the final visible message. (#83443) Thanks @compoodment. |
42 | 43 | - Providers/Xiaomi: replay MiMo Anthropic-compatible `reasoning_content` as provider-required thinking blocks even when OpenClaw thinking is disabled, fixing follow-up tool turns for `mimo-v2-flash`. Fixes #83407. Thanks @Xgenious7. |
43 | 44 | - Agents/exec approvals: forward approval-runtime credentials on agent-owned Gateway approval calls so approved async commands complete through the existing runtime path instead of stalling on unauthenticated follow-up calls. Thanks @IWhatsskill, @Patrick-Erichsen, and @jesse-merhi. |
44 | 45 | - Gateway/skills: preflight remote macOS skill-bin refreshes with a WebSocket connectivity check so stale node sessions skip quickly instead of logging slow `system.which` timeout warnings. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1712,6 +1712,7 @@ describe("processDiscordMessage draft streaming", () => {
|
1712 | 1712 | |
1713 | 1713 | it("defaults unset Discord preview streaming to progress mode without drafting text-only turns", async () => { |
1714 | 1714 | await runSingleChunkFinalScenario({ maxLinesPerMessage: 5 }); |
| 1715 | +expect(getLastDispatchReplyOptions()?.onPartialReply).toBeUndefined(); |
1715 | 1716 | expect(createDiscordDraftStream).toHaveBeenCalledTimes(1); |
1716 | 1717 | expect(editMessageDiscord).not.toHaveBeenCalled(); |
1717 | 1718 | expect(deliverDiscordReply).toHaveBeenCalledTimes(1); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -808,9 +808,10 @@ export async function processDiscordMessage(
|
808 | 808 | (typeof resolvedBlockStreamingEnabled === "boolean" |
809 | 809 | ? !resolvedBlockStreamingEnabled |
810 | 810 | : undefined)), |
811 | | -onPartialReply: draftPreview.draftStream |
812 | | - ? (payload) => draftPreview.updateFromPartial(payload.text) |
813 | | - : undefined, |
| 811 | +onPartialReply: |
| 812 | +draftPreview.draftStream && !draftPreview.isProgressMode |
| 813 | + ? (payload) => draftPreview.updateFromPartial(payload.text) |
| 814 | + : undefined, |
814 | 815 | onAssistantMessageStart: draftPreview.draftStream |
815 | 816 | ? () => draftPreview.handleAssistantMessageBoundary() |
816 | 817 | : undefined, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。