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.
Files changed (2) hide show
  1. package/bin/yymaxapi.js +21 -5
  2. 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
- if (gwToken) {
3581
- console.log(chalk.green(`\n🌐 Web Dashboard:`));
3582
- console.log(chalk.cyan(` http://127.0.0.1:${gwPort}/?token=${gwToken}`));
3583
- }
3597
+ // 重启后直接测试连接
3598
+ console.log('');
3599
+ await testConnection(paths, {});
3584
3600
  }
3585
3601
  // ============ 权限管理 (tools.profile) ============
3586
3602
  const TOOLS_PROFILES = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yymaxapi",
3
- "version": "1.0.60",
3
+ "version": "1.0.62",
4
4
  "description": "跨平台 OpenClaw/Clawdbot 配置管理工具 - 管理中转地址、模型切换、API Keys、测速优化",
5
5
  "main": "bin/yymaxapi.js",
6
6
  "bin": {