docs: document auto-reply queue exec helpers · openclaw/openclaw@05d92d8
steipete
·
2026-06-04
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,13 +5,15 @@ function quoteShellArg(value: string): string {
|
5 | 5 | return `'${value.replaceAll("'", "'\\''")}'`; |
6 | 6 | } |
7 | 7 | |
| 8 | +/** Reconstructs the current OpenClaw CLI invocation with extra args. */ |
8 | 9 | export function buildCurrentOpenClawCliArgv(args: string[]): string[] { |
9 | 10 | const entry = process.argv[1]?.trim(); |
10 | 11 | return entry && entry !== process.execPath |
11 | 12 | ? [process.execPath, ...process.execArgv, entry, ...args] |
12 | 13 | : [process.execPath, ...args]; |
13 | 14 | } |
14 | 15 | |
| 16 | +/** Builds a shell-quoted command string for rerunning the current OpenClaw CLI. */ |
15 | 17 | export function buildCurrentOpenClawCliCommand(args: string[]): string { |
16 | 18 | return buildCurrentOpenClawCliArgv(args).map(quoteShellArg).join(" "); |
17 | 19 | } |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。