fix(channels): scope progress tool status config

This commit is contained in:
Vincent Koc
2026-05-03 20:51:21 -07:00
parent e3cba91ef0
commit 973e240bb3
3 changed files with 35 additions and 5 deletions

View File

@@ -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.

View File

@@ -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",

View File

@@ -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(