diff --git a/CHANGELOG.md b/CHANGELOG.md index 7aff77a55ba..f56b41e7318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Channels/streaming: normalize whitespace and case for `streaming.progress.label: "auto"` so progress draft labels keep using the built-in label pool instead of rendering a literal `auto` title. Thanks @vincentkoc. - Gateway/install: prefer supported system Node over nvm/fnm/volta/asdf/mise when regenerating managed gateway services, so `gateway install --force` no longer recreates service definitions that doctor immediately flags as version-manager-backed. Fixes #76339. Thanks @brokemac79. - Gateway/usage: serve `usage.cost` and `sessions.usage` from a durable transcript aggregate cache with lock-safe background refreshes and localized stale-cache status, so large usage views avoid repeated full scans. (#76650) Thanks @Marvinthebored. - Plugins/hooks: let `plugins.entries..hooks.timeoutMs` and `plugins.entries..hooks.timeouts` bound plugin typed hooks from operator config, so slow hooks can be tuned without patching installed plugin code. Fixes #76778. Thanks @vincentkoc. diff --git a/src/plugin-sdk/channel-streaming.test.ts b/src/plugin-sdk/channel-streaming.test.ts index fc2a4b4bf21..8adc6b59da3 100644 --- a/src/plugin-sdk/channel-streaming.test.ts +++ b/src/plugin-sdk/channel-streaming.test.ts @@ -133,6 +133,12 @@ describe("channel-streaming", () => { expect(resolveChannelProgressDraftLabel({ random: () => 0.99 })).toBe( DEFAULT_PROGRESS_DRAFT_LABELS.at(-1), ); + expect( + resolveChannelProgressDraftLabel({ + entry: { streaming: { progress: { label: " AUTO " } } }, + random: () => 0, + }), + ).toBe(DEFAULT_PROGRESS_DRAFT_LABELS[0]); }); it("supports explicit progress labels and custom label sets", () => { diff --git a/src/plugin-sdk/channel-streaming.ts b/src/plugin-sdk/channel-streaming.ts index d0c0ffbda2d..35aec345dbd 100644 --- a/src/plugin-sdk/channel-streaming.ts +++ b/src/plugin-sdk/channel-streaming.ts @@ -245,7 +245,9 @@ export function resolveChannelProgressDraftLabel(params: { if (progress.label === false) { return undefined; } - if (typeof progress.label === "string" && progress.label.trim() && progress.label !== "auto") { + const normalizedLabel = + typeof progress.label === "string" ? normalizeOptionalLowercaseString(progress.label) : null; + if (typeof progress.label === "string" && progress.label.trim() && normalizedLabel !== "auto") { return progress.label.trim(); } const labels = normalizeProgressLabels(progress.labels);