openclawsetup 2.5.2 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.mjs +9 -42
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -512,48 +512,15 @@ async function installOpenClaw() {
|
|
|
512
512
|
async function runOnboard(cliName) {
|
|
513
513
|
console.log(colors.bold(colors.cyan('\n[2/2] 运行配置向导\n')));
|
|
514
514
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
if (mode.trim() === '2') {
|
|
527
|
-
// 手动模式:直接运行官方 onboard
|
|
528
|
-
console.log(colors.gray('\n' + '-'.repeat(60)));
|
|
529
|
-
console.log(colors.gray('以下是官方 openclaw onboard 界面:'));
|
|
530
|
-
console.log(colors.gray('-'.repeat(60) + '\n'));
|
|
531
|
-
|
|
532
|
-
const manualResult = runOnboardManual(cliName);
|
|
533
|
-
console.log(colors.gray('\n' + '-'.repeat(60)));
|
|
534
|
-
if (manualResult.status !== 0) {
|
|
535
|
-
log.warn(`onboard 退出码: ${manualResult.status}`);
|
|
536
|
-
log.hint('如果配置未完成,可以手动运行: ' + cliName + ' onboard');
|
|
537
|
-
}
|
|
538
|
-
} else {
|
|
539
|
-
// 自动模式:只用最安全的参数
|
|
540
|
-
console.log(colors.gray('\n正在自动安装(跳过模型和渠道配置)...\n'));
|
|
541
|
-
|
|
542
|
-
const { file, args } = getOnboardCommand(cliName, ['onboard', '--install-daemon']);
|
|
543
|
-
const result = spawnSync(file, args, { stdio: 'inherit' });
|
|
544
|
-
|
|
545
|
-
if (result.status !== 0) {
|
|
546
|
-
// 自动模式失败,回退到手动
|
|
547
|
-
log.warn('自动安装未完成,切换到手动模式...');
|
|
548
|
-
console.log(colors.gray('\n' + '-'.repeat(60)));
|
|
549
|
-
console.log(colors.gray('以下是官方 openclaw onboard 界面:'));
|
|
550
|
-
console.log(colors.gray('-'.repeat(60) + '\n'));
|
|
551
|
-
const manualResult = runOnboardManual(cliName);
|
|
552
|
-
if (manualResult.status !== 0) {
|
|
553
|
-
log.warn(`onboard 退出码: ${manualResult.status}`);
|
|
554
|
-
log.hint('如果配置未完成,可以手动运行: ' + cliName + ' onboard');
|
|
555
|
-
}
|
|
556
|
-
}
|
|
515
|
+
console.log(colors.gray('-'.repeat(60)));
|
|
516
|
+
console.log(colors.gray('以下是官方 openclaw onboard 界面:'));
|
|
517
|
+
console.log(colors.gray('-'.repeat(60) + '\n'));
|
|
518
|
+
|
|
519
|
+
const manualResult = runOnboardManual(cliName);
|
|
520
|
+
console.log(colors.gray('\n' + '-'.repeat(60)));
|
|
521
|
+
if (manualResult.status !== 0) {
|
|
522
|
+
log.warn(`onboard 退出码: ${manualResult.status}`);
|
|
523
|
+
log.hint('如果配置未完成,可以手动运行: ' + cliName + ' onboard');
|
|
557
524
|
}
|
|
558
525
|
}
|
|
559
526
|
|