惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
人人都是产品经理
人人都是产品经理
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
小众软件
小众软件
B
Blog
博客园 - 叶小钗
Microsoft Azure Blog
Microsoft Azure Blog
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
V
V2EX

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(discord): keep progress drafts for tool-only replies ...
steipete · 2026-05-17 · via Recent Commits to openclaw:main

File tree

  • extensions/discord/src/monitor

Original file line numberDiff line numberDiff line change

@@ -29,6 +29,7 @@ Docs: https://docs.openclaw.ai

2929

- Agents/edit tool: honor `file_path` and related path aliases when resolving edit-recovery targets, so post-write errors no longer surface false edit failures after the file actually changed. Fixes #81909. Thanks @giodl73-repo.

3030

- QQBot: treat only explicit truthy `QQBOT_DEBUG` values as enabling debug logs, so false-like values such as `0` no longer expose debug output. Fixes #82644. (#82697) Thanks @leno23.

3131

- Agents/session_status: resolve implicit no-arg status lookups against the live run session, so `/think` changes report the current thinking level instead of stale sandbox state. Fixes #82669. (#82696) Thanks @leno23.

32+

- Discord: keep progress drafts visible for message-tool-only guild replies under the default coding tool profile. Fixes #82747. Thanks @eliranwong.

3233

- Gateway/diagnostics: add opt-in critical memory pressure stability snapshots with gateway logs, V8 heap, cgroup, active-resource, and redacted large session-file evidence. Fixes #82518.

3334

- Doctor/Gateway: avoid treating unrelated macOS LaunchAgents as legacy gateways just because their environment values mention old checkout paths.

3435

- CLI/setup: collapse raw gateway config keys in existing-config summaries into friendly `Model` and `Gateway` rows.

Original file line numberDiff line numberDiff line change

@@ -48,8 +48,10 @@ export function createDiscordDraftPreviewController(params: {

4848

const accountBlockStreamingEnabled =

4949

resolveChannelStreamingBlockEnabled(params.discordConfig) ??

5050

params.cfg.agents?.defaults?.blockStreamingDefault === "on";

51+

const canStreamProgressDraftForToolOnlySource =

52+

params.sourceRepliesAreToolOnly && discordStreamMode === "progress";

5153

const canStreamDraft =

52-

!params.sourceRepliesAreToolOnly &&

54+

(!params.sourceRepliesAreToolOnly || canStreamProgressDraftForToolOnlySource) &&

5355

discordStreamMode !== "off" &&

5456

!accountBlockStreamingEnabled;

5557

const draftStream = canStreamDraft

Original file line numberDiff line numberDiff line change

@@ -145,6 +145,7 @@ type DispatchInboundParams = {

145145

onCompactionEnd?: () => Promise<void> | void;

146146

onPartialReply?: (payload: { text?: string }) => Promise<void> | void;

147147

onAssistantMessageStart?: () => Promise<void> | void;

148+

allowProgressCallbacksWhenSourceDeliverySuppressed?: boolean;

148149

};

149150

};

150151

const dispatchInboundMessage = vi.hoisted(() =>

@@ -1530,6 +1531,32 @@ describe("processDiscordMessage draft streaming", () => {

15301531

expect(deliverDiscordReply).not.toHaveBeenCalled();

15311532

});

15321533
1534+

it("streams Discord tool progress for coding-profile message-tool-only guild replies", async () => {

1535+

const draftStream = createMockDraftStreamForTest();

1536+
1537+

dispatchInboundMessage.mockImplementationOnce(async (params?: DispatchInboundParams) => {

1538+

expect(params?.replyOptions?.sourceReplyDeliveryMode).toBe("message_tool_only");

1539+

expect(params?.replyOptions?.allowProgressCallbacksWhenSourceDeliverySuppressed).toBe(true);

1540+

await params?.replyOptions?.onToolStart?.({ name: "exec", phase: "start" });

1541+

await params?.replyOptions?.onItemEvent?.({ progressText: "exec done" });

1542+

return createNoQueuedDispatchResult();

1543+

});

1544+
1545+

const ctx = await createBaseContext({

1546+

cfg: {

1547+

tools: { profile: "coding" },

1548+

session: { store: "/tmp/openclaw-discord-process-test-sessions.json" },

1549+

},

1550+

route: BASE_CHANNEL_ROUTE,

1551+

});

1552+
1553+

await runProcessDiscordMessage(ctx);

1554+
1555+

expect(getLastDispatchReplyOptions()?.sourceReplyDeliveryMode).toBe("message_tool_only");

1556+

expect(draftStream.update).toHaveBeenCalledWith("Pinching...\n🛠️ Exec\n• exec done");

1557+

expect(deliverDiscordReply).not.toHaveBeenCalled();

1558+

});

1559+
15331560

it("keeps Discord preview streaming off when explicitly disabled", async () => {

15341561

await runSingleChunkFinalScenario({ streaming: { mode: "off" }, maxLinesPerMessage: 5 });

15351562

expect(createDiscordDraftStream).not.toHaveBeenCalled();

Original file line numberDiff line numberDiff line change

@@ -656,6 +656,10 @@ export async function processDiscordMessage(

656656

abortSignal,

657657

skillFilter: channelConfig?.skills,

658658

sourceReplyDeliveryMode,

659+

allowProgressCallbacksWhenSourceDeliverySuppressed:

660+

sourceRepliesAreToolOnly && draftPreview.draftStream && draftPreview.isProgressMode

661+

? true

662+

: undefined,

659663

disableBlockStreaming: sourceRepliesAreToolOnly

660664

? true

661665

: (draftPreview.disableBlockStreamingForDraft ??