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

推荐订阅源

罗磊的独立博客
G
Google Developers Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
有赞技术团队
有赞技术团队
Vercel News
Vercel News
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
I
InfoQ
Blog — PlanetScale
Blog — PlanetScale
博客园_首页
The Cloudflare Blog
B
Blog
C
Check Point Blog
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
U
Unit 42
D
Docker
月光博客
月光博客
aimingoo的专栏
aimingoo的专栏
博客园 - Franky
A
About on SuperTechFans

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(cli): improve config startup progress · openclaw/open...
steipete · 2026-05-17 · via Recent Commits to openclaw:main

@@ -682,10 +682,88 @@ const logRunner = (message, deps) => {

682682

return;

683683

}

684684

const line = `[openclaw] ${message}\n`;

685+

deps.runNodeProgress?.clearLine();

685686

deps.stderr.write(line);

687+

deps.runNodeProgress?.render();

686688

deps.outputTee?.write(line);

687689

};

688690691+

const RUN_NODE_PROGRESS_FRAMES = ["-", "\\", "|", "/"];

692+693+

const shouldUseRunNodeProgress = (deps) =>

694+

deps.stderr?.isTTY === true &&

695+

deps.env.OPENCLAW_RUNNER_PROGRESS !== "0" &&

696+

deps.env.CI !== "true" &&

697+

!deps.outputTee;

698+699+

const createRunNodeProgress = (label, deps) => {

700+

if (!shouldUseRunNodeProgress(deps)) {

701+

return null;

702+

}

703+

const startedAt = Date.now();

704+

let frameIndex = 0;

705+

let active = true;

706+

let visible = false;

707+708+

const clearLine = () => {

709+

if (!visible) {

710+

return;

711+

}

712+

deps.stderr.write("\r\x1b[2K");

713+

visible = false;

714+

};

715+

const render = () => {

716+

if (!active) {

717+

return;

718+

}

719+

const elapsedSeconds = Math.max(0, Math.round((Date.now() - startedAt) / 1000));

720+

const frame = RUN_NODE_PROGRESS_FRAMES[frameIndex % RUN_NODE_PROGRESS_FRAMES.length];

721+

frameIndex += 1;

722+

deps.stderr.write(`\r[openclaw] ${frame} ${label} (${elapsedSeconds}s)`);

723+

visible = true;

724+

};

725+

const timer = setInterval(render, 120);

726+

timer.unref?.();

727+

render();

728+729+

return {

730+

clearLine,

731+

render,

732+

stop() {

733+

if (!active) {

734+

return;

735+

}

736+

active = false;

737+

clearInterval(timer);

738+

clearLine();

739+

},

740+

};

741+

};

742+743+

const withRunNodeProgress = async (deps, label, callback) => {

744+

const previousProgress = deps.runNodeProgress;

745+

const progress = createRunNodeProgress(label, deps);

746+

if (progress) {

747+

deps.runNodeProgress = progress;

748+

}

749+

try {

750+

return await callback();

751+

} finally {

752+

if (progress) {

753+

progress.stop();

754+

deps.runNodeProgress = previousProgress;

755+

}

756+

}

757+

};

758+759+

const writeRunnerStream = (deps, stream, chunk) => {

760+

deps.runNodeProgress?.clearLine();

761+

stream.write(chunk);

762+

deps.runNodeProgress?.render();

763+

};

764+765+

const shouldPipeSpawnedOutput = (deps) => Boolean(deps.outputTee || deps.runNodeProgress);

766+689767

const sanitizeCpuProfileNamePart = (value) => {

690768

const normalized = String(value ?? "")

691769

.trim()

@@ -810,24 +888,26 @@ const runOpenClaw = async (deps) => {

810888

};

811889812890

const pipeSpawnedOutput = (childProcess, deps) => {

813-

if (!deps.outputTee) {

891+

if (!shouldPipeSpawnedOutput(deps)) {

814892

return;

815893

}

816894

const stderrFilter =

817895

deps.env[RUN_NODE_FILTER_SYNC_IO_STDERR_ENV] === "1"

818896

? createSyncIoTraceStderrFilter(deps)

819897

: null;

820898

childProcess.stdout?.on("data", (chunk) => {

821-

deps.stdout.write(chunk);

822-

deps.outputTee.write(chunk);

899+

writeRunnerStream(deps, deps.stdout, chunk);

900+

deps.outputTee?.write(chunk);

823901

});

824902

childProcess.stderr?.on("data", (chunk) => {

903+

deps.runNodeProgress?.clearLine();

825904

if (stderrFilter) {

826905

stderrFilter.write(chunk);

827906

} else {

828907

deps.stderr.write(chunk);

829908

}

830-

deps.outputTee.write(chunk);

909+

deps.runNodeProgress?.render();

910+

deps.outputTee?.write(chunk);

831911

});

832912

childProcess.stderr?.on("end", () => {

833913

stderrFilter?.flush();

@@ -1253,36 +1333,45 @@ export async function runNodeMain(params = {}) {

12531333

);

12541334

logRunner("Building bundled plugin assets.", deps);

12551335

const buildCmd = deps.execPath;

1256-

const assetBuild = deps.spawn(buildCmd, bundledPluginAssetBuildArgs, {

1257-

cwd: deps.cwd,

1258-

env: deps.env,

1259-

stdio: deps.outputTee ? ["inherit", "pipe", "pipe"] : "inherit",

1260-

});

1261-

pipeSpawnedOutput(assetBuild, deps);

1262-

const assetBuildRes = await waitForSpawnedProcess(assetBuild, deps);

1263-

const assetBuildInterruptedExitCode = getInterruptedSpawnExitCode(assetBuildRes);

1264-

if (assetBuildInterruptedExitCode !== null) {

1265-

return assetBuildInterruptedExitCode;

1266-

}

1267-

if (assetBuildRes.exitCode !== 0 && assetBuildRes.exitCode !== null) {

1268-

return assetBuildRes.exitCode;

1269-

}

1336+

const compileExitCode = await withRunNodeProgress(

1337+

deps,

1338+

"Building local CLI artifacts",

1339+

async () => {

1340+

const assetBuild = deps.spawn(buildCmd, bundledPluginAssetBuildArgs, {

1341+

cwd: deps.cwd,

1342+

env: deps.env,

1343+

stdio: shouldPipeSpawnedOutput(deps) ? ["inherit", "pipe", "pipe"] : "inherit",

1344+

});

1345+

pipeSpawnedOutput(assetBuild, deps);

1346+

const assetBuildRes = await waitForSpawnedProcess(assetBuild, deps);

1347+

const assetBuildInterruptedExitCode = getInterruptedSpawnExitCode(assetBuildRes);

1348+

if (assetBuildInterruptedExitCode !== null) {

1349+

return assetBuildInterruptedExitCode;

1350+

}

1351+

if (assetBuildRes.exitCode !== 0 && assetBuildRes.exitCode !== null) {

1352+

return assetBuildRes.exitCode;

1353+

}

127013541271-

const buildArgs = compilerArgs;

1272-

const build = deps.spawn(buildCmd, buildArgs, {

1273-

cwd: deps.cwd,

1274-

env: deps.env,

1275-

stdio: deps.outputTee ? ["inherit", "pipe", "pipe"] : "inherit",

1276-

});

1277-

pipeSpawnedOutput(build, deps);

1355+

const build = deps.spawn(buildCmd, compilerArgs, {

1356+

cwd: deps.cwd,

1357+

env: deps.env,

1358+

stdio: shouldPipeSpawnedOutput(deps) ? ["inherit", "pipe", "pipe"] : "inherit",

1359+

});

1360+

pipeSpawnedOutput(build, deps);

127813611279-

const buildRes = await waitForSpawnedProcess(build, deps);

1280-

const interruptedExitCode = getInterruptedSpawnExitCode(buildRes);

1281-

if (interruptedExitCode !== null) {

1282-

return interruptedExitCode;

1283-

}

1284-

if (buildRes.exitCode !== 0 && buildRes.exitCode !== null) {

1285-

return buildRes.exitCode;

1362+

const buildRes = await waitForSpawnedProcess(build, deps);

1363+

const interruptedExitCode = getInterruptedSpawnExitCode(buildRes);

1364+

if (interruptedExitCode !== null) {

1365+

return interruptedExitCode;

1366+

}

1367+

if (buildRes.exitCode !== 0 && buildRes.exitCode !== null) {

1368+

return buildRes.exitCode;

1369+

}

1370+

return 0;

1371+

},

1372+

);

1373+

if (compileExitCode !== 0) {

1374+

return compileExitCode;

12861375

}

12871376

if (!(await syncRuntimeArtifacts(deps))) {

12881377

return 1;