mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:40:43 +00:00
fix(channels): normalize progress auto labels
This commit is contained in:
@@ -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.<id>.hooks.timeoutMs` and `plugins.entries.<id>.hooks.timeouts` bound plugin typed hooks from operator config, so slow hooks can be tuned without patching installed plugin code. Fixes #76778. Thanks @vincentkoc.
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user