openclawapi 1.3.11 → 1.3.12

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/cli.js +7 -3
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -424,8 +424,12 @@ async function testConnection(paths) {
424
424
  console.log(chalk.gray(`模型: ${primary}`));
425
425
  console.log(chalk.gray(`Gateway: http://localhost:${gatewayPort}\n`));
426
426
 
427
- // 通过本地 Gateway 端口测试
428
- console.log(chalk.cyan(`正在通过 Gateway 测试 ${typeLabel}...`));
427
+ // 步骤1: 先重启 Gateway 使配置生效
428
+ console.log(chalk.cyan('步骤 1/2: 重启 Gateway 使配置生效...'));
429
+ await restartGateway();
430
+
431
+ // 步骤2: 通过本地 Gateway 端口测试
432
+ console.log(chalk.cyan(`\n步骤 2/2: 通过 Gateway 测试 ${typeLabel}...`));
429
433
 
430
434
  try {
431
435
  const startTime = Date.now();
@@ -433,7 +437,7 @@ async function testConnection(paths) {
433
437
  const latency = Date.now() - startTime;
434
438
 
435
439
  if (result.success) {
436
- console.log(chalk.green(`\n✅ Gateway 连接成功!配置已生效`));
440
+ console.log(chalk.green(`\n✅ 测试成功!配置已生效`));
437
441
  console.log(chalk.cyan(` 响应时间: ${latency}ms`));
438
442
  console.log(chalk.yellow(` 模型回复: ${result.message}`));
439
443
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclawapi",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "跨平台 OpenClaw/Clawdbot 配置管理工具 - 管理中转地址、模型切换、API Keys、测速优化",
5
5
  "main": "cli.js",
6
6
  "bin": {