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

推荐订阅源

B
Blog
The Cloudflare Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
L
LangChain Blog
Recent Announcements
Recent Announcements
Hugging Face - Blog
Hugging Face - Blog
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
I
InfoQ
博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
H
Help Net Security
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

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(channels): suppress verbose failed-tool dumps (#84354...
clawsweeper · 2026-05-20 · via Recent Commits to openclaw:main

@@ -652,6 +652,35 @@ describe("dispatchTelegramMessage draft streaming", () => {

652652

expect(deliverReplies).not.toHaveBeenCalled();

653653

});

654654655+

it("suppresses text-only tool output after media-only final Telegram replies", async () => {

656+

deliverInboundReplyWithMessageSendContext.mockResolvedValue({

657+

status: "handled_visible",

658+

delivery: {

659+

messageIds: ["1002"],

660+

visibleReplySent: true,

661+

},

662+

});

663+

dispatchReplyWithBufferedBlockDispatcher.mockImplementation(async ({ dispatcherOptions }) => {

664+

await dispatcherOptions.deliver({ mediaUrl: "file:///tmp/final.png" }, { kind: "final" });

665+

await dispatcherOptions.deliver({ text: "late tool output" }, { kind: "tool" });

666+

return { queuedFinal: true };

667+

});

668+669+

await dispatchWithContext({

670+

context: createContext(),

671+

streamMode: "off",

672+

telegramDeps: telegramDepsForTest,

673+

});

674+675+

expect(deliverInboundReplyWithMessageSendContext).toHaveBeenCalledTimes(1);

676+

const outbound = expectRecordFields(mockCallArg(deliverInboundReplyWithMessageSendContext), {

677+

channel: "telegram",

678+

info: { kind: "final" },

679+

});

680+

expectRecordFields(outbound.payload, { mediaUrl: "file:///tmp/final.png" });

681+

expect(deliverReplies).not.toHaveBeenCalled();

682+

});

683+655684

it("skips answer draft stream for same-chat selected quotes", async () => {

656685

dispatchReplyWithBufferedBlockDispatcher.mockImplementation(async ({ dispatcherOptions }) => {

657686

await dispatcherOptions.deliver({ text: "Hello", replyToId: "1001" }, { kind: "final" });

@@ -943,6 +972,24 @@ describe("dispatchTelegramMessage draft streaming", () => {

943972

});

944973

});

945974975+

it("suppresses text-only tool payloads delivered after the final answer", async () => {

976+

const { answerDraftStream } = setupDraftStreams({ answerMessageId: 2001 });

977+

dispatchReplyWithBufferedBlockDispatcher.mockImplementation(async ({ dispatcherOptions }) => {

978+

await dispatcherOptions.deliver({ text: "Final answer" }, { kind: "final" });

979+

await dispatcherOptions.deliver(

980+

{ text: "failed command output", isError: true },

981+

{ kind: "tool" },

982+

);

983+

return { queuedFinal: true };

984+

});

985+986+

await dispatchWithContext({ context: createContext() });

987+988+

expect(answerDraftStream.update).toHaveBeenCalledTimes(1);

989+

expect(answerDraftStream.update).toHaveBeenCalledWith("Final answer");

990+

expect(deliverReplies).not.toHaveBeenCalled();

991+

});

992+946993

it("mirrors preview-finalized finals into the session transcript", async () => {

947994

setupDraftStreams({ answerMessageId: 2001 });

948995

const context = createContext();

@@ -1627,6 +1674,66 @@ describe("dispatchTelegramMessage draft streaming", () => {

16271674

expectDeliveredReply(0, { text: "Branch is up to date" });

16281675

});

162916761677+

it("does not restart progress drafts for command output after final answer delivery", async () => {

1678+

const { answerDraftStream } = setupDraftStreams({ answerMessageId: 2001 });

1679+

dispatchReplyWithBufferedBlockDispatcher.mockImplementation(

1680+

async ({ dispatcherOptions, replyOptions }) => {

1681+

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

1682+

await dispatcherOptions.deliver({ text: "Branch is up to date" }, { kind: "final" });

1683+

await replyOptions?.onCommandOutput?.({

1684+

phase: "end",

1685+

title: "Exec",

1686+

name: "exec",

1687+

status: "failed",

1688+

exitCode: 1,

1689+

});

1690+

return { queuedFinal: true };

1691+

},

1692+

);

1693+1694+

await dispatchWithContext({

1695+

context: createContext(),

1696+

streamMode: "progress",

1697+

telegramCfg: { streaming: { mode: "progress", progress: { label: "Shelling" } } },

1698+

});

1699+1700+

expect(answerDraftStream.update).toHaveBeenCalledTimes(1);

1701+

expect(answerDraftStream.update).toHaveBeenCalledWith("Shelling\n\n`🛠️ Exec`");

1702+

expectDeliveredReply(0, { text: "Branch is up to date" });

1703+

});

1704+1705+

it("does not restart progress drafts for command output while final answer delivery is pending", async () => {

1706+

const { answerDraftStream } = setupDraftStreams({ answerMessageId: 2001 });

1707+

dispatchReplyWithBufferedBlockDispatcher.mockImplementation(

1708+

async ({ dispatcherOptions, replyOptions }) => {

1709+

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

1710+

const finalDelivery = dispatcherOptions.deliver(

1711+

{ text: "Branch is up to date" },

1712+

{ kind: "final" },

1713+

);

1714+

await replyOptions?.onCommandOutput?.({

1715+

phase: "end",

1716+

title: "Exec",

1717+

name: "exec",

1718+

status: "failed",

1719+

exitCode: 1,

1720+

});

1721+

await finalDelivery;

1722+

return { queuedFinal: true };

1723+

},

1724+

);

1725+1726+

await dispatchWithContext({

1727+

context: createContext(),

1728+

streamMode: "progress",

1729+

telegramCfg: { streaming: { mode: "progress", progress: { label: "Shelling" } } },

1730+

});

1731+1732+

expect(answerDraftStream.update).toHaveBeenCalledTimes(1);

1733+

expect(answerDraftStream.update).toHaveBeenCalledWith("Shelling\n\n`🛠️ Exec`");

1734+

expectDeliveredReply(0, { text: "Branch is up to date" });

1735+

});

1736+16301737

it("uses the transcript final when progress-mode final text is truncated", async () => {

16311738

setupDraftStreams({ answerMessageId: 2001 });

16321739

const fullAnswer =