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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
Blog — PlanetScale
Blog — PlanetScale
V
Visual Studio Blog
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
博客园 - Franky
IT之家
IT之家
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
腾讯CDC
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
人人都是产品经理
人人都是产品经理
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
博客园_首页
G
Google Developers Blog

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(reply): keep native command replies visible · opencla...
obviyus · 2026-04-29 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -4335,6 +4335,35 @@ describe("sendPolicy deny — suppress delivery, not processing (#53328)", () =>

43354335

expect(dispatcher.sendFinalReply).not.toHaveBeenCalled();

43364336

});

43374337
4338+

it("keeps native command replies visible in group/channel turns", async () => {

4339+

setNoAbort();

4340+

const dispatcher = createDispatcher();

4341+

const replyResolver = vi.fn(async (_ctx: MsgContext, opts?: GetReplyOptions) => {

4342+

expect(opts?.sourceReplyDeliveryMode).toBe("automatic");

4343+

expect(opts?.suppressTyping).toBe(false);

4344+

return { text: "status reply" } satisfies ReplyPayload;

4345+

});

4346+
4347+

const result = await dispatchReplyFromConfig({

4348+

ctx: buildTestCtx({

4349+

ChatType: "group",

4350+

CommandSource: "native",

4351+

CommandAuthorized: true,

4352+

WasMentioned: true,

4353+

SessionKey: "test:telegram:group:G1",

4354+

}),

4355+

cfg: emptyConfig,

4356+

dispatcher,

4357+

replyResolver,

4358+

});

4359+
4360+

expect(replyResolver).toHaveBeenCalledTimes(1);

4361+

expect(result.queuedFinal).toBe(true);

4362+

expect(dispatcher.sendFinalReply).toHaveBeenCalledWith(

4363+

expect.objectContaining({ text: "status reply" }),

4364+

);

4365+

});

4366+
43384367

it("allows config to keep group/channel source delivery automatic", async () => {

43394368

setNoAbort();

43404369

const dispatcher = createDispatcher();

Original file line numberDiff line numberDiff line change

@@ -42,6 +42,15 @@ describe("resolveSourceReplyDeliveryMode", () => {

4242

}),

4343

).toBe("automatic");

4444

});

45+
46+

it("treats native commands as explicit replies in groups", () => {

47+

expect(

48+

resolveSourceReplyDeliveryMode({

49+

cfg: emptyConfig,

50+

ctx: { ChatType: "group", CommandSource: "native" },

51+

}),

52+

).toBe("automatic");

53+

});

4554

});

4655
4756

describe("resolveSourceReplyVisibilityPolicy", () => {

@@ -83,6 +92,22 @@ describe("resolveSourceReplyVisibilityPolicy", () => {

8392

});

8493

});

8594
95+

it("keeps native command replies visible in groups", () => {

96+

expect(

97+

resolveSourceReplyVisibilityPolicy({

98+

cfg: emptyConfig,

99+

ctx: { ChatType: "group", CommandSource: "native" },

100+

sendPolicy: "allow",

101+

}),

102+

).toMatchObject({

103+

sourceReplyDeliveryMode: "automatic",

104+

suppressAutomaticSourceDelivery: false,

105+

suppressDelivery: false,

106+

suppressHookReplyLifecycle: false,

107+

suppressTyping: false,

108+

});

109+

});

110+
86111

it("keeps configured automatic group delivery visible", () => {

87112

expect(

88113

resolveSourceReplyVisibilityPolicy({

Original file line numberDiff line numberDiff line change

@@ -5,6 +5,7 @@ import type { SourceReplyDeliveryMode } from "../get-reply-options.types.js";

55
66

export type SourceReplyDeliveryModeContext = {

77

ChatType?: string;

8+

CommandSource?: "text" | "native";

89

};

910
1011

export function resolveSourceReplyDeliveryMode(params: {

@@ -15,6 +16,9 @@ export function resolveSourceReplyDeliveryMode(params: {

1516

if (params.requested) {

1617

return params.requested;

1718

}

19+

if (params.ctx.CommandSource === "native") {

20+

return "automatic";

21+

}

1822

const chatType = normalizeChatType(params.ctx.ChatType);

1923

if (chatType === "group" || chatType === "channel") {

2024

return params.cfg.messages?.groupChat?.visibleReplies === "automatic"