惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
IT之家
IT之家
博客园_首页
博客园 - 【当耐特】
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
GbyAI
GbyAI
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
H
Help Net Security
T
Tailwind CSS Blog
B
Blog RSS Feed
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
博客园 - 叶小钗
雷峰网
雷峰网
量子位

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: compact progress draft lines · openclaw/openclaw@a3c...
steipete · 2026-05-04 · via Recent Commits to openclaw:main

@@ -110,6 +110,7 @@ export const DEFAULT_PROGRESS_DRAFT_LABELS = [

110110

] as const;

111111112112

export const DEFAULT_PROGRESS_DRAFT_INITIAL_DELAY_MS = 5_000;

113+

const DEFAULT_PROGRESS_DRAFT_MAX_LINE_CHARS = 72;

113114114115

const NON_WORK_PROGRESS_TOOL_NAMES = new Set([

115116

"message",

@@ -537,6 +538,52 @@ export function resolveChannelProgressDraftMaxLines(

537538

return configured && configured > 0 ? configured : defaultValue;

538539

}

539540541+

function sliceCodePoints(value: string, start: number, end?: number): string {

542+

return Array.from(value).slice(start, end).join("");

543+

}

544+545+

function compactProgressLineDetail(detail: string, maxChars: number): string {

546+

const chars = Array.from(detail);

547+

if (chars.length <= maxChars) {

548+

return detail;

549+

}

550+

if (maxChars <= 1) {

551+

return "…";

552+

}

553+

const keepStart = Math.max(1, Math.ceil((maxChars - 1) * 0.45));

554+

const keepEnd = Math.max(1, maxChars - keepStart - 1);

555+

const rawStart = chars.slice(0, keepStart).join("").trimEnd();

556+

const start =

557+

rawStart.length > 8 && /\s+\S+$/.test(rawStart) ? rawStart.replace(/\s+\S+$/, "") : rawStart;

558+

return `${start}${chars.slice(-keepEnd).join("").trimStart()}`;

559+

}

560+561+

function compactChannelProgressDraftLine(line: string, maxChars: number): string {

562+

const normalized = line.replace(/\s+/g, " ").trim();

563+

if (!normalized) {

564+

return "";

565+

}

566+

const chars = Array.from(normalized);

567+

if (chars.length <= maxChars) {

568+

return normalized;

569+

}

570+

if (maxChars <= 1) {

571+

return "…";

572+

}

573+574+

const splitIndex = normalized.indexOf(": ");

575+

if (splitIndex > 0) {

576+

const prefix = normalized.slice(0, splitIndex + 2);

577+

const prefixChars = Array.from(prefix).length;

578+

const detailLimit = maxChars - prefixChars;

579+

if (detailLimit >= 8) {

580+

return `${prefix}${compactProgressLineDetail(normalized.slice(splitIndex + 2), detailLimit)}`;

581+

}

582+

}

583+584+

return `${sliceCodePoints(normalized, 0, maxChars - 1).trimEnd()}…`;

585+

}

586+540587

export function formatChannelProgressDraftText(params: {

541588

entry?: StreamingCompatEntry | null;

542589

lines: string[];

@@ -554,7 +601,7 @@ export function formatChannelProgressDraftText(params: {

554601

const formatLine = params.formatLine ?? ((line: string) => line);

555602

const bullet = params.bullet ?? "•";

556603

const lines = params.lines

557-

.map((line) => line.replace(/\s+/g, " ").trim())

604+

.map((line) => compactChannelProgressDraftLine(line, DEFAULT_PROGRESS_DRAFT_MAX_LINE_CHARS))

558605

.filter((line) => line.length > 0)

559606

.slice(-maxLines)

560607

.map((line) =>