yymaxapi 1.0.108 → 1.0.109
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 +18 -5
- package/package.json +1 -1
package/bin/yymaxapi.js
CHANGED
|
@@ -3391,6 +3391,15 @@ async function confirmImmediateTest(args = {}, message = '是否立即测试连
|
|
|
3391
3391
|
return shouldTest;
|
|
3392
3392
|
}
|
|
3393
3393
|
|
|
3394
|
+
async function pauseBeforeReturningToMenu(args = {}, message = '测试完成,按回车返回主菜单') {
|
|
3395
|
+
if (!args.fromMenu) return;
|
|
3396
|
+
await inquirer.prompt([{
|
|
3397
|
+
type: 'input',
|
|
3398
|
+
name: 'continue',
|
|
3399
|
+
message
|
|
3400
|
+
}]);
|
|
3401
|
+
}
|
|
3402
|
+
|
|
3394
3403
|
function extendPathEnv(preferredNodePath) {
|
|
3395
3404
|
const current = process.env.PATH || '';
|
|
3396
3405
|
const parts = current.split(path.delimiter).filter(Boolean);
|
|
@@ -3633,7 +3642,7 @@ function readTextIfExists(filePath) {
|
|
|
3633
3642
|
}
|
|
3634
3643
|
|
|
3635
3644
|
function getHermesDataDir() {
|
|
3636
|
-
const envDir = String(process.env.HERMES_DATA_DIR || '').trim();
|
|
3645
|
+
const envDir = String(process.env.HERMES_HOME || process.env.HERMES_DATA_DIR || '').trim();
|
|
3637
3646
|
return envDir || path.join(os.homedir(), '.hermes');
|
|
3638
3647
|
}
|
|
3639
3648
|
|
|
@@ -5431,6 +5440,7 @@ async function activateClaudeCode(paths, args = {}) {
|
|
|
5431
5440
|
|
|
5432
5441
|
if (await confirmImmediateTest(args, '是否立即测试 Claude Code CLI 连接?')) {
|
|
5433
5442
|
await testAdditionalCliConnections(args, { only: ['claude'] });
|
|
5443
|
+
await pauseBeforeReturningToMenu(args);
|
|
5434
5444
|
}
|
|
5435
5445
|
}
|
|
5436
5446
|
|
|
@@ -5485,6 +5495,7 @@ async function activateOpencode(paths, args = {}) {
|
|
|
5485
5495
|
|
|
5486
5496
|
if (await confirmImmediateTest(args, '是否立即测试 Opencode CLI 连接?')) {
|
|
5487
5497
|
await testAdditionalCliConnections(args, { only: ['opencode'] });
|
|
5498
|
+
await pauseBeforeReturningToMenu(args);
|
|
5488
5499
|
}
|
|
5489
5500
|
}
|
|
5490
5501
|
|
|
@@ -5549,6 +5560,7 @@ async function activateCodex(paths, args = {}) {
|
|
|
5549
5560
|
|
|
5550
5561
|
if (await confirmImmediateTest(args, '是否立即测试 Codex CLI 连接?')) {
|
|
5551
5562
|
await testAdditionalCliConnections(args, { only: ['codex'] });
|
|
5563
|
+
await pauseBeforeReturningToMenu(args);
|
|
5552
5564
|
}
|
|
5553
5565
|
}
|
|
5554
5566
|
|
|
@@ -5608,6 +5620,7 @@ async function activateHermes(paths, args = {}) {
|
|
|
5608
5620
|
|
|
5609
5621
|
if (await confirmImmediateTest(args, '是否立即测试 Hermes CLI 连接?')) {
|
|
5610
5622
|
await testAdditionalCliConnections(args, { only: ['hermes'] });
|
|
5623
|
+
await pauseBeforeReturningToMenu(args);
|
|
5611
5624
|
}
|
|
5612
5625
|
}
|
|
5613
5626
|
|
|
@@ -5720,16 +5733,16 @@ async function main() {
|
|
|
5720
5733
|
await restore(paths);
|
|
5721
5734
|
break;
|
|
5722
5735
|
case 'activate_claude_code':
|
|
5723
|
-
await activateClaudeCode(paths);
|
|
5736
|
+
await activateClaudeCode(paths, { fromMenu: true });
|
|
5724
5737
|
break;
|
|
5725
5738
|
case 'activate_hermes':
|
|
5726
|
-
await activateHermes(paths);
|
|
5739
|
+
await activateHermes(paths, { fromMenu: true });
|
|
5727
5740
|
break;
|
|
5728
5741
|
case 'activate_opencode':
|
|
5729
|
-
await activateOpencode(paths);
|
|
5742
|
+
await activateOpencode(paths, { fromMenu: true });
|
|
5730
5743
|
break;
|
|
5731
5744
|
case 'activate_codex':
|
|
5732
|
-
await activateCodex(paths);
|
|
5745
|
+
await activateCodex(paths, { fromMenu: true });
|
|
5733
5746
|
break;
|
|
5734
5747
|
}
|
|
5735
5748
|
} catch (error) {
|