yymaxapi 1.0.60 → 1.0.62
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/yymaxapi.js +21 -5
- package/package.json +1 -1
package/bin/yymaxapi.js
CHANGED
|
@@ -2764,6 +2764,24 @@ async function autoActivate(paths, args = {}) {
|
|
|
2764
2764
|
console.log(chalk.green(`\n🌐 Web Dashboard:`));
|
|
2765
2765
|
console.log(chalk.cyan(` http://127.0.0.1:${gwPort}/?token=${gwToken}`));
|
|
2766
2766
|
}
|
|
2767
|
+
|
|
2768
|
+
// ---- 配置完成后:测试连接 or 退出 ----
|
|
2769
|
+
const { nextAction } = await inquirer.prompt([{
|
|
2770
|
+
type: 'list',
|
|
2771
|
+
name: 'nextAction',
|
|
2772
|
+
message: '接下来:',
|
|
2773
|
+
choices: [
|
|
2774
|
+
{ name: '测试连接', value: 'test' },
|
|
2775
|
+
{ name: '退出', value: 'exit' }
|
|
2776
|
+
]
|
|
2777
|
+
}]);
|
|
2778
|
+
|
|
2779
|
+
if (nextAction === 'test') {
|
|
2780
|
+
await testConnection(paths, args);
|
|
2781
|
+
} else {
|
|
2782
|
+
console.log(chalk.cyan('👋 再见!\n'));
|
|
2783
|
+
process.exit(0);
|
|
2784
|
+
}
|
|
2767
2785
|
}
|
|
2768
2786
|
|
|
2769
2787
|
// ============ 单独配置 Claude Code CLI ============
|
|
@@ -3562,7 +3580,6 @@ async function switchModel(paths) {
|
|
|
3562
3580
|
}
|
|
3563
3581
|
|
|
3564
3582
|
const gwPort = config.gateway?.port || 18789;
|
|
3565
|
-
const gwToken = config.gateway?.auth?.token;
|
|
3566
3583
|
|
|
3567
3584
|
if (await isPortOpen(gwPort)) {
|
|
3568
3585
|
const gwSpinner = ora({ text: '重启 Gateway 使模型切换生效...', spinner: 'dots' }).start();
|
|
@@ -3577,10 +3594,9 @@ async function switchModel(paths) {
|
|
|
3577
3594
|
console.log(chalk.gray(' 启动 Gateway: openclaw gateway'));
|
|
3578
3595
|
}
|
|
3579
3596
|
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
}
|
|
3597
|
+
// 重启后直接测试连接
|
|
3598
|
+
console.log('');
|
|
3599
|
+
await testConnection(paths, {});
|
|
3584
3600
|
}
|
|
3585
3601
|
// ============ 权限管理 (tools.profile) ============
|
|
3586
3602
|
const TOOLS_PROFILES = [
|