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.
- package/cli.js +7 -3
- 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
|
-
//
|
|
428
|
-
console.log(chalk.cyan(
|
|
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✅
|
|
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 {
|