diff --git a/CHANGELOG.md b/CHANGELOG.md index 18e8b215009..176602bfa55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Channels/streaming: keep `streaming.progress.toolProgress` scoped to progress draft mode, so disabling compact progress lines does not silence partial/block preview tool updates. Thanks @vincentkoc. - Control UI: point the Appearance tweakcn browse action and docs at the live tweakcn editor route instead of the removed `/themes` page. Fixes #77048. - Control UI: render Dream Diary prose through the sanitized markdown pipeline, so diary bold/italic/header markdown no longer appears as literal source text. Fixes #62413. - Control UI: render tool results whose output arrives as text-block arrays and give expanded tool output a scrollable block, so read/exec output remains visible in WebChat. Fixes #77054. diff --git a/src/plugin-sdk/channel-streaming.test.ts b/src/plugin-sdk/channel-streaming.test.ts index f66201f964e..8b5522783ba 100644 --- a/src/plugin-sdk/channel-streaming.test.ts +++ b/src/plugin-sdk/channel-streaming.test.ts @@ -61,6 +61,32 @@ describe("channel-streaming", () => { expect(resolveChannelStreamingPreviewToolProgress(entry)).toBe(false); }); + it("keeps progress-only tool progress config out of normal preview modes", () => { + expect( + resolveChannelStreamingPreviewToolProgress({ + streaming: { mode: "partial", progress: { toolProgress: false } }, + }), + ).toBe(true); + expect( + resolveChannelStreamingPreviewToolProgress({ + streaming: { + mode: "block", + preview: { toolProgress: true }, + progress: { toolProgress: false }, + }, + }), + ).toBe(true); + expect( + resolveChannelStreamingPreviewToolProgress({ + streaming: { + mode: "progress", + preview: { toolProgress: true }, + progress: { toolProgress: false }, + }, + }), + ).toBe(false); + }); + it("falls back to legacy flat fields when the canonical object is absent", () => { const entry = { chunkMode: "newline", diff --git a/src/plugin-sdk/channel-streaming.ts b/src/plugin-sdk/channel-streaming.ts index 5a38b6e439f..14ed7d43b50 100644 --- a/src/plugin-sdk/channel-streaming.ts +++ b/src/plugin-sdk/channel-streaming.ts @@ -424,11 +424,14 @@ export function resolveChannelStreamingPreviewToolProgress( defaultValue = true, ): boolean { const config = getChannelStreamingConfigObject(entry); - return ( - asBoolean(config?.progress?.toolProgress) ?? - asBoolean(config?.preview?.toolProgress) ?? - defaultValue - ); + if (resolveChannelPreviewStreamMode(entry, "partial") === "progress") { + return ( + asBoolean(config?.progress?.toolProgress) ?? + asBoolean(config?.preview?.toolProgress) ?? + defaultValue + ); + } + return asBoolean(config?.preview?.toolProgress) ?? defaultValue; } export function resolveChannelStreamingSuppressDefaultToolProgressMessages(