From 0a92d7a8ff4dc282a4e750960012966f2d7c53c7 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 11 May 2026 14:01:38 +0100 Subject: [PATCH] fix: widen progress draft preview lines --- CHANGELOG.md | 1 + src/plugin-sdk/channel-streaming.test.ts | 6 ++++-- src/plugin-sdk/channel-streaming.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e49f3dd14559..0447dbcb1a4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Docs: https://docs.openclaw.ai - Agents: add per-agent `tools.message.crossContext` overrides so sandboxed/public agents can restrict message sends to the current conversation without changing the global bot policy. - Agents: add per-agent `tools.message.actions.allow` overrides so sandboxed/public agents can expose and enforce send-only message tools. - Agents: omit the sandbox workspace marker from compact command progress previews while keeping internal sandbox diagnostics unchanged. +- Agents: widen progress draft command preview lines by 50% so Discord inline tool updates preserve more useful command context. - Build: upgrade workspace package management to pnpm 11 and keep Docker, install, update, and release workflows on the pnpm 11 config surface. (#79414) Thanks @altaywtf. - Build: align Telegram QA workflows and git source installs with the pnpm 11 workspace build allowlist surface. (#80588) Thanks @altaywtf. - Models: add provider-level `localService` startup for on-demand local model servers before OpenAI-compatible requests, including one-shot model probes. diff --git a/src/plugin-sdk/channel-streaming.test.ts b/src/plugin-sdk/channel-streaming.test.ts index dbc95a81f9ec..d6c33b9aefcc 100644 --- a/src/plugin-sdk/channel-streaming.test.ts +++ b/src/plugin-sdk/channel-streaming.test.ts @@ -253,7 +253,7 @@ describe("channel-streaming", () => { lines: ["x".repeat(80)], formatLine: (line) => `\`${line}\``, }), - ).toBe(`Shelling\n• \`${"x".repeat(71)}…\``); + ).toBe(`Shelling\n• \`${"x".repeat(107)}…\``); }); it("keeps compacted raw progress lines from leaking unmatched markdown backticks", () => { @@ -274,7 +274,9 @@ describe("channel-streaming", () => { lines: line ? [line] : [], }); - expect(text).toBe("Shelling\n🛠️ run node script…th/that/keeps/going/and/going/index…"); + expect(text).toBe( + "Shelling\n🛠️ run node script…/some/really/deep/path/that/keeps/going/and/going/index…", + ); expect(text.match(/`/g) ?? []).toHaveLength(0); }); diff --git a/src/plugin-sdk/channel-streaming.ts b/src/plugin-sdk/channel-streaming.ts index 45a516cf2977..87b4b2cb1e23 100644 --- a/src/plugin-sdk/channel-streaming.ts +++ b/src/plugin-sdk/channel-streaming.ts @@ -113,7 +113,7 @@ export const DEFAULT_PROGRESS_DRAFT_LABELS = [ ] as const; export const DEFAULT_PROGRESS_DRAFT_INITIAL_DELAY_MS = 5_000; -const DEFAULT_PROGRESS_DRAFT_MAX_LINE_CHARS = 72; +const DEFAULT_PROGRESS_DRAFT_MAX_LINE_CHARS = 108; const NON_WORK_PROGRESS_TOOL_NAMES = new Set([ "message",