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

推荐订阅源

Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
V
V2EX
量子位
Last Week in AI
Last Week in AI
Jina AI
Jina AI
博客园 - 【当耐特】
爱范儿
爱范儿
宝玉的分享
宝玉的分享
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
小众软件
小众软件
IT之家
IT之家
博客园_首页
博客园 - 聂微东
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗

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
Handle ACP status progress commentary · openclaw/openclaw...
2026-06-04 · via Recent Commits to openclaw:main

@@ -24,6 +24,16 @@ const DEFAULT_NO_OUTPUT_POLL_MS = 15_000;

2424

const DEFAULT_MAX_RELAY_LIFETIME_MS = 6 * 60 * 60 * 1000;

2525

const STREAM_BUFFER_MAX_CHARS = 4_000;

2626

const STREAM_SNIPPET_MAX_CHARS = 220;

27+

const HIDDEN_ACP_STATUS_TAGS = new Set([

28+

"agent_thought_chunk",

29+

"available_commands_update",

30+

"config_option_update",

31+

"current_mode_update",

32+

"session_info_update",

33+

"tool_call",

34+

"tool_call_update",

35+

"usage_update",

36+

]);

27372838

function compactWhitespace(value: string): string {

2939

return value.replace(/\s+/g, " ").trim();

@@ -53,6 +63,20 @@ function formatProxyEnvSummary(keys: string[]): string {

5363

return `proxy env: ${keys.join(", ")}`;

5464

}

556566+

function shouldRelayAcpStatusProgress(params: {

67+

eventType: string | undefined;

68+

tag: string | undefined;

69+

text: string | undefined;

70+

}): boolean {

71+

if (params.eventType !== "status" || !params.text) {

72+

return false;

73+

}

74+

if (!params.tag) {

75+

return true;

76+

}

77+

return !HIDDEN_ACP_STATUS_TAGS.has(params.tag);

78+

}

79+5680

function resolveAcpStreamLogPathFromSessionFile(sessionFile: string, sessionId: string): string {

5781

const baseDir = path.dirname(path.resolve(sessionFile));

5882

return path.join(baseDir, `${sessionId}.acp-stream.jsonl`);

@@ -311,6 +335,32 @@ export function startAcpSpawnParentStreamRelay(params: {

311335

flushTimer.unref?.();

312336

};

313337338+

const appendVisibleProgress = (delta: string) => {

339+

if (stallNotified) {

340+

stallNotified = false;

341+

recordTaskRunProgressByRunId({

342+

runId,

343+

runtime: "acp",

344+

sessionKey: params.childSessionKey,

345+

lastEventAt: Date.now(),

346+

eventSummary: "Resumed output.",

347+

});

348+

emit(`${relayLabel} resumed output.`, `${contextPrefix}:resumed`);

349+

}

350+351+

lastProgressAt = Date.now();

352+

firstVisibleOutputAt ??= lastProgressAt;

353+

pendingText += delta;

354+

if (pendingText.length > STREAM_BUFFER_MAX_CHARS) {

355+

pendingText = pendingText.slice(-STREAM_BUFFER_MAX_CHARS);

356+

}

357+

if (pendingText.length >= STREAM_SNIPPET_MAX_CHARS || delta.includes("\n\n")) {

358+

flushPending();

359+

return;

360+

}

361+

scheduleFlush();

362+

};

363+314364

const buildNoOutputNotice = () => {

315365

const seconds = Math.round(noOutputNoticeMs / 1000);

316366

if (!promptSubmittedAt) {

@@ -405,29 +455,7 @@ export function startAcpSpawnParentStreamRelay(params: {

405455

return;

406456

}

407457408-

if (stallNotified) {

409-

stallNotified = false;

410-

recordTaskRunProgressByRunId({

411-

runId,

412-

runtime: "acp",

413-

sessionKey: params.childSessionKey,

414-

lastEventAt: Date.now(),

415-

eventSummary: "Resumed output.",

416-

});

417-

emit(`${relayLabel} resumed output.`, `${contextPrefix}:resumed`);

418-

}

419-420-

lastProgressAt = Date.now();

421-

firstVisibleOutputAt ??= lastProgressAt;

422-

pendingText += delta;

423-

if (pendingText.length > STREAM_BUFFER_MAX_CHARS) {

424-

pendingText = pendingText.slice(-STREAM_BUFFER_MAX_CHARS);

425-

}

426-

if (pendingText.length >= STREAM_SNIPPET_MAX_CHARS || delta.includes("\n\n")) {

427-

flushPending();

428-

return;

429-

}

430-

scheduleFlush();

458+

appendVisibleProgress(delta);

431459

return;

432460

}

433461

@@ -451,8 +479,21 @@ export function startAcpSpawnParentStreamRelay(params: {

451479

}

452480

if (phase === "runtime_event") {

453481

const eventType = normalizeOptionalString(data?.eventType);

482+

const text = normalizeOptionalString(data?.text);

483+

const tag = normalizeOptionalString(data?.tag);

454484

firstRuntimeEventAt ??= Date.now();

455485

lastRuntimeEventType = eventType;

486+

if (

487+

shouldRelayAssistantCommentary &&

488+

shouldRelayAcpStatusProgress({

489+

eventType,

490+

tag,

491+

text,

492+

})

493+

) {

494+

appendVisibleProgress(`${text}\n\n`);

495+

return;

496+

}

456497

lastProgressAt = Date.now();

457498

return;

458499

}