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

推荐订阅源

P
Proofpoint News Feed
U
Unit 42
V
Visual Studio Blog
D
DataBreaches.Net
F
Fortinet All Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
博客园 - 叶小钗
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MongoDB | Blog
MongoDB | Blog
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
D
Docker
G
Google Developers Blog
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
S
SegmentFault 最新的问题

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): ping mention-bearing final replies · opencl...
openperf · 2026-05-31 · via Recent Commits to openclaw:main

@@ -1952,6 +1952,95 @@ describe("processDiscordMessage draft streaming", () => {

19521952

expectSinglePreviewEdit();

19531953

});

195419541955+

it("delivers a fresh message instead of a preview edit when the final reply resolves a mention alias", async () => {

1956+

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

1957+

await params?.dispatcher.sendFinalReply({ text: "On it @Sentinel" });

1958+

return { queuedFinal: true, counts: { final: 1, tool: 0, block: 0 } };

1959+

});

1960+1961+

const ctx = await createAutomaticSourceDeliveryContext({

1962+

discordConfig: { streamMode: "partial", maxLinesPerMessage: 5 },

1963+

cfg: {

1964+

channels: { discord: { mentionAliases: { Sentinel: "1485891428809707651" } } },

1965+

},

1966+

});

1967+1968+

await runProcessDiscordMessage(ctx);

1969+1970+

// Discord only fires mention notifications on create, never on edits, so the

1971+

// streamed preview must be abandoned and the mention delivered fresh.

1972+

expect(editMessageDiscord).not.toHaveBeenCalled();

1973+

expect(deliverDiscordReply).toHaveBeenCalledTimes(1);

1974+

});

1975+1976+

it("delivers a fresh message instead of a preview edit for a literal user mention in the final reply", async () => {

1977+

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

1978+

await params?.dispatcher.sendFinalReply({ text: "On it <@1485891428809707651>" });

1979+

return { queuedFinal: true, counts: { final: 1, tool: 0, block: 0 } };

1980+

});

1981+1982+

const ctx = await createAutomaticSourceDeliveryContext({

1983+

discordConfig: { streamMode: "partial", maxLinesPerMessage: 5 },

1984+

});

1985+1986+

await runProcessDiscordMessage(ctx);

1987+1988+

expect(editMessageDiscord).not.toHaveBeenCalled();

1989+

expect(deliverDiscordReply).toHaveBeenCalledTimes(1);

1990+

});

1991+1992+

it("still finalizes via preview edit when an unaliased handle stays plain text", async () => {

1993+

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

1994+

await params?.dispatcher.sendFinalReply({ text: "On it @Sentinel" });

1995+

return { queuedFinal: true, counts: { final: 1, tool: 0, block: 0 } };

1996+

});

1997+1998+

const ctx = await createAutomaticSourceDeliveryContext({

1999+

discordConfig: { streamMode: "partial", maxLinesPerMessage: 5 },

2000+

});

2001+2002+

await runProcessDiscordMessage(ctx);

2003+2004+

expect(editMessageDiscord).toHaveBeenCalledTimes(1);

2005+

expect(deliverDiscordReply).not.toHaveBeenCalled();

2006+

});

2007+2008+

it("still finalizes via preview edit for broadcast mentions like @everyone", async () => {

2009+

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

2010+

await params?.dispatcher.sendFinalReply({ text: "heads up @everyone" });

2011+

return { queuedFinal: true, counts: { final: 1, tool: 0, block: 0 } };

2012+

});

2013+2014+

const ctx = await createAutomaticSourceDeliveryContext({

2015+

discordConfig: { streamMode: "partial", maxLinesPerMessage: 5 },

2016+

});

2017+2018+

await runProcessDiscordMessage(ctx);

2019+2020+

expect(editMessageDiscord).toHaveBeenCalledTimes(1);

2021+

expect(deliverDiscordReply).not.toHaveBeenCalled();

2022+

});

2023+2024+

it("still finalizes via preview edit when a targeted mention is mixed with @everyone", async () => {

2025+

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

2026+

await params?.dispatcher.sendFinalReply({ text: "heads up @Sentinel @everyone" });

2027+

return { queuedFinal: true, counts: { final: 1, tool: 0, block: 0 } };

2028+

});

2029+2030+

const ctx = await createAutomaticSourceDeliveryContext({

2031+

discordConfig: { streamMode: "partial", maxLinesPerMessage: 5 },

2032+

cfg: {

2033+

channels: { discord: { mentionAliases: { Sentinel: "1485891428809707651" } } },

2034+

},

2035+

});

2036+2037+

await runProcessDiscordMessage(ctx);

2038+2039+

// Mixed targeted + broadcast must not escalate into a create that pings @everyone.

2040+

expect(editMessageDiscord).toHaveBeenCalledTimes(1);

2041+

expect(deliverDiscordReply).not.toHaveBeenCalled();

2042+

});

2043+19552044

it("accepts streaming=true alias for partial preview mode", async () => {

19562045

await runSingleChunkFinalScenario({ streaming: true, maxLinesPerMessage: 5 });

19572046

expectSinglePreviewEdit();