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

推荐订阅源

有赞技术团队
有赞技术团队
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium
WordPress大学
WordPress大学
罗磊的独立博客
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Docker
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
I
InfoQ
J
Java Code Geeks
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
美团技术团队
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
C
Check Point 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(discord): apply tool status emojis immediately to avo...
lzyyzznl · 2026-06-16 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

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

184184

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

185185

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

186186

allowProgressCallbacksWhenSourceDeliverySuppressed?: boolean;

187+

allowToolLifecycleWhenProgressHidden?: boolean;

187188

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

188189

};

189190

};

@@ -984,6 +985,7 @@ describe("processDiscordMessage ack reactions", () => {

984985
985986

await runProcessDiscordMessage(ctx);

986987
988+

expect(getLastDispatchReplyOptions()?.allowToolLifecycleWhenProgressHidden).toBe(true);

987989

const emojis = getReactionEmojis();

988990

expect(emojis).toContain("👀");

989991

expect(emojis).toContain(DEFAULT_EMOJIS.done);

@@ -1152,6 +1154,7 @@ describe("processDiscordMessage ack reactions", () => {

11521154
11531155

await runProcessDiscordMessage(ctx);

11541156
1157+

expect(getLastDispatchReplyOptions()?.allowToolLifecycleWhenProgressHidden).toBeUndefined();

11551158

expect(getReactionEmojis()).toEqual(["👀"]);

11561159

});

11571160
Original file line numberDiff line numberDiff line change

@@ -1004,6 +1004,7 @@ async function processDiscordMessageInner(

10041004

draftPreview.suppressDefaultToolProgressMessages

10051005

? true

10061006

: undefined,

1007+

allowToolLifecycleWhenProgressHidden: statusReactionsEnabled ? true : undefined,

10071008

commentaryProgressEnabled: draftPreview.isProgressMode

10081009

? draftPreview.commentaryProgressEnabled

10091010

: undefined,

Original file line numberDiff line numberDiff line change

@@ -45,6 +45,8 @@ let capturedReplyOptions:

4545

| {

4646

disableBlockStreaming?: boolean;

4747

suppressDefaultToolProgressMessages?: boolean;

48+

allowProgressCallbacksWhenSourceDeliverySuppressed?: boolean;

49+

allowToolLifecycleWhenProgressHidden?: boolean;

4850

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

4951

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

5052

onReasoningStream?: (payload?: {

@@ -1749,6 +1751,8 @@ describe("dispatchPreparedSlackMessage preview fallback", () => {

17491751

);

17501752
17511753

expect(capturedReplyOptions?.disableBlockStreaming).toBe(true);

1754+

expect(capturedReplyOptions?.allowProgressCallbacksWhenSourceDeliverySuppressed).toBe(true);

1755+

expect(capturedReplyOptions?.allowToolLifecycleWhenProgressHidden).toBe(true);

17521756

expectRecordFields(requireRecord(capturedStatusReactionOptions, "status reaction options"), {

17531757

enabled: true,

17541758

initialEmoji: "eyes",

Original file line numberDiff line numberDiff line change

@@ -1864,6 +1864,11 @@ export async function dispatchPreparedSlackMessage(prepared: PreparedSlackMessag

18641864

disableBlockStreaming,

18651865

onModelSelected,

18661866

suppressDefaultToolProgressMessages: suppressDefaultToolProgressMessages ? true : undefined,

1867+

allowProgressCallbacksWhenSourceDeliverySuppressed:

1868+

sourceReplyDeliveryMode === "message_tool_only" && statusReactionsEnabled

1869+

? true

1870+

: undefined,

1871+

allowToolLifecycleWhenProgressHidden: statusReactionsEnabled ? true : undefined,

18671872

onPartialReply: useStreaming

18681873

? undefined

18691874

: !previewStreamingEnabled

Original file line numberDiff line numberDiff line change

@@ -102,6 +102,8 @@ export type GetReplyOptions = {

102102

* channel to surface progress via its own streaming/edit UX.

103103

*/

104104

suppressDefaultToolProgressMessages?: boolean;

105+

/** Allow channel-owned tool lifecycle feedback while text progress remains hidden. */

106+

allowToolLifecycleWhenProgressHidden?: boolean;

105107

/**

106108

* Called before dispatch with a live getter for whether verbose standalone

107109

* progress messages are active for this run. Channels that render tool or

Original file line numberDiff line numberDiff line change

@@ -2597,6 +2597,51 @@ describe("dispatchReplyFromConfig", () => {

25972597

expect(dispatcher.sendFinalReply).toHaveBeenCalledTimes(1);

25982598

});

25992599
2600+

it("forwards only opted-in tool lifecycle feedback while verbose is off", async () => {

2601+

setNoAbort();

2602+

sessionStoreMocks.currentEntry = {

2603+

verboseLevel: "off",

2604+

};

2605+

const dispatcher = createDispatcher();

2606+

const ctx = buildTestCtx({

2607+

Provider: "discord",

2608+

Surface: "discord",

2609+

ChatType: "group",

2610+

});

2611+

const onToolStart = vi.fn();

2612+

const onItemEvent = vi.fn();

2613+

const onCommandOutput = vi.fn();

2614+
2615+

const replyResolver = async (

2616+

_ctx: MsgContext,

2617+

opts?: GetReplyOptions,

2618+

_cfg?: OpenClawConfig,

2619+

) => {

2620+

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

2621+

await opts?.onItemEvent?.({ itemId: "1", kind: "tool", progressText: "running exec" });

2622+

await opts?.onCommandOutput?.({ phase: "end", name: "exec", status: "ok", exitCode: 0 });

2623+

return { text: "done" } satisfies ReplyPayload;

2624+

};

2625+
2626+

await dispatchReplyFromConfig({

2627+

ctx,

2628+

cfg: automaticGroupReplyConfig,

2629+

dispatcher,

2630+

replyResolver,

2631+

replyOptions: {

2632+

allowToolLifecycleWhenProgressHidden: true,

2633+

onToolStart,

2634+

onItemEvent,

2635+

onCommandOutput,

2636+

},

2637+

});

2638+
2639+

expect(onToolStart).toHaveBeenCalledWith({ name: "exec", phase: "start" });

2640+

expect(onItemEvent).not.toHaveBeenCalled();

2641+

expect(onCommandOutput).not.toHaveBeenCalled();

2642+

expect(dispatcher.sendFinalReply).toHaveBeenCalledTimes(1);

2643+

});

2644+
26002645

it("delivers verbose inter-tool commentary as standalone progress messages before the tool summary", async () => {

26012646

setNoAbort();

26022647

sessionStoreMocks.currentEntry = {

Original file line numberDiff line numberDiff line change

@@ -2737,10 +2737,12 @@ export async function dispatchReplyFromConfig(

27372737

const allowSuppressedSourceProgressCallbacks =

27382738

params.replyOptions?.allowProgressCallbacksWhenSourceDeliverySuppressed === true;

27392739

const shouldAllowQuietChannelOwnedProgressCallbacks = (options?: {

2740+

allowWhenToolSummariesHidden?: boolean;

27402741

requiresToolSummaryVisibility?: boolean;

27412742

}) =>

27422743

options?.requiresToolSummaryVisibility === true &&

2743-

params.replyOptions?.suppressDefaultToolProgressMessages === true;

2744+

(params.replyOptions?.suppressDefaultToolProgressMessages === true ||

2745+

options.allowWhenToolSummariesHidden === true);

27442746

let hasPendingDirectBlockReplyDelivery = false;

27452747

const waitForPendingDirectBlockReplyDelivery = async (abortSignal?: AbortSignal) => {

27462748

if (!hasPendingDirectBlockReplyDelivery) {

@@ -2753,6 +2755,7 @@ export async function dispatchReplyFromConfig(

27532755

await waitForReplyDispatcherIdle(dispatcher, abortSignal);

27542756

};

27552757

const shouldForwardProgressCallback = (options?: {

2758+

allowWhenToolSummariesHidden?: boolean;

27562759

forwardWhenSourceDeliverySuppressed?: boolean;

27572760

requiresToolSummaryVisibility?: boolean;

27582761

}) => {

@@ -2773,6 +2776,7 @@ export async function dispatchReplyFromConfig(

27732776

const wrapProgressCallback = <Args extends unknown[]>(

27742777

callback: ((...args: Args) => Promise<void> | void) | undefined,

27752778

options?: {

2779+

allowWhenToolSummariesHidden?: boolean;

27762780

forwardWhenSourceDeliverySuppressed?: boolean;

27772781

requiresToolSummaryVisibility?: boolean;

27782782

onForward?: (...args: Args) => Promise<void> | void;

@@ -2885,6 +2889,8 @@ export async function dispatchReplyFromConfig(

28852889

),

28862890

onBlockReplyQueued: wrapProgressCallback(params.replyOptions?.onBlockReplyQueued),

28872891

onToolStart: wrapProgressCallback(params.replyOptions?.onToolStart, {

2892+

allowWhenToolSummariesHidden:

2893+

params.replyOptions?.allowToolLifecycleWhenProgressHidden === true,

28882894

forwardWhenSourceDeliverySuppressed: true,

28892895

requiresToolSummaryVisibility: true,

28902896

waitForDirectBlockReplyDelivery: true,

Original file line numberDiff line numberDiff line change

@@ -2757,6 +2757,63 @@ describe("createFollowupRunner progress forwarding", () => {

27572757

expect(sessionStore.main.compactionCount).toBe(1);

27582758

});

27592759
2760+

it("forwards opted-in queued tool lifecycle feedback while verbose progress is disabled", async () => {

2761+

const onToolStart = vi.fn(async () => {});

2762+

const onItemEvent = vi.fn(async () => {});

2763+

const onCommandOutput = vi.fn(async () => {});

2764+
2765+

runEmbeddedAgentMock.mockImplementationOnce(

2766+

async (args: {

2767+

onAgentEvent?: (evt: { stream: string; data: Record<string, unknown> }) => Promise<void>;

2768+

}) => {

2769+

await args.onAgentEvent?.({

2770+

stream: "tool",

2771+

data: { phase: "start", name: "exec", args: { command: "echo hidden" } },

2772+

});

2773+

await args.onAgentEvent?.({

2774+

stream: "item",

2775+

data: { phase: "start", itemId: "item-1", title: "hidden item" },

2776+

});

2777+

await args.onAgentEvent?.({

2778+

stream: "command_output",

2779+

data: { phase: "chunk", output: "hidden output" },

2780+

});

2781+

return { payloads: [{ text: "final" }], meta: { agentMeta: {} } };

2782+

},

2783+

);

2784+
2785+

const runner = createFollowupRunner({

2786+

opts: {

2787+

allowToolLifecycleWhenProgressHidden: true,

2788+

onToolStart,

2789+

onItemEvent,

2790+

onCommandOutput,

2791+

},

2792+

typing: createMockTypingController(),

2793+

typingMode: "instant",

2794+

defaultModel: "claude",

2795+

});

2796+
2797+

await runner(

2798+

createQueuedRun({

2799+

run: {

2800+

messageProvider: "discord",

2801+

sourceReplyDeliveryMode: "message_tool_only",

2802+

verboseLevel: "off",

2803+

},

2804+

}),

2805+

);

2806+
2807+

expect(onToolStart).toHaveBeenCalledWith({

2808+

name: "exec",

2809+

phase: "start",

2810+

args: { command: "echo hidden" },

2811+

detailMode: undefined,

2812+

});

2813+

expect(onItemEvent).not.toHaveBeenCalled();

2814+

expect(onCommandOutput).not.toHaveBeenCalled();

2815+

});

2816+
27602817

it("keeps queued follow-up progress quiet when verbose state is missing", async () => {

27612818

const onToolStart = vi.fn(async () => {});

27622819

const onCommandOutput = vi.fn(async () => {});

Original file line numberDiff line numberDiff line change

@@ -157,7 +157,9 @@ async function forwardFollowupProgressEvent(params: {

157157

}) {

158158

const { evt, opts } = params;

159159

const emitChannelProgress = params.emitChannelProgress !== false;

160-

if (!emitChannelProgress && evt.stream !== "compaction") {

160+

const allowQuietToolLifecycle =

161+

evt.stream === "tool" && opts?.allowToolLifecycleWhenProgressHidden === true;

162+

if (!emitChannelProgress && evt.stream !== "compaction" && !allowQuietToolLifecycle) {

161163

return;

162164

}

163165