yingclaw 1.5.0 → 1.5.2
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/cli.js +9 -8
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -14,8 +14,9 @@ async function getBanner() {
|
|
|
14
14
|
const figlet = require('figlet');
|
|
15
15
|
const boxen = (await import('boxen')).default;
|
|
16
16
|
const title = figlet.textSync('claw', { font: 'Standard', horizontalLayout: 'fitted' });
|
|
17
|
+
const subtitle = chalk.dim('Claude Code × 国产大模型 一键接入') + ' ' + chalk.cyan(`v${pkg.version}`);
|
|
17
18
|
return boxen(
|
|
18
|
-
chalk.cyan.bold(title) + '\n' +
|
|
19
|
+
chalk.cyan.bold(title) + '\n' + subtitle,
|
|
19
20
|
{ padding: { top: 0, bottom: 0, left: 2, right: 2 }, borderStyle: 'round', borderColor: 'cyan', margin: { top: 1, bottom: 0 } }
|
|
20
21
|
);
|
|
21
22
|
}
|
|
@@ -114,7 +115,7 @@ program
|
|
|
114
115
|
if (!yes) return;
|
|
115
116
|
} catch {}
|
|
116
117
|
|
|
117
|
-
const network = await select({
|
|
118
|
+
const network = await select({ loop: false,
|
|
118
119
|
message: chalk.cyan('你的网络环境'),
|
|
119
120
|
choices: [
|
|
120
121
|
{ name: '有梯子 / 海外网络(走官方)', value: 'vpn' },
|
|
@@ -190,7 +191,7 @@ program
|
|
|
190
191
|
|
|
191
192
|
while (true) {
|
|
192
193
|
if (step === 'provider') {
|
|
193
|
-
providerKey = await select({
|
|
194
|
+
providerKey = await select({ loop: false,
|
|
194
195
|
message: chalk.cyan('选择 AI 厂商'),
|
|
195
196
|
choices: [
|
|
196
197
|
...Object.entries(PROVIDERS).map(([value, p]) => ({ name: p.name, value })),
|
|
@@ -221,7 +222,7 @@ program
|
|
|
221
222
|
modelChoices = provider.models;
|
|
222
223
|
}
|
|
223
224
|
|
|
224
|
-
const m = await select({
|
|
225
|
+
const m = await select({ loop: false,
|
|
225
226
|
message: chalk.cyan('选择模型'),
|
|
226
227
|
choices: [
|
|
227
228
|
...modelChoices,
|
|
@@ -282,7 +283,7 @@ program
|
|
|
282
283
|
return;
|
|
283
284
|
}
|
|
284
285
|
|
|
285
|
-
const providerKey = await select({
|
|
286
|
+
const providerKey = await select({ loop: false,
|
|
286
287
|
message: chalk.cyan('选择 AI 厂商'),
|
|
287
288
|
choices: [
|
|
288
289
|
...Object.entries(PROVIDERS).map(([value, p]) => ({ name: p.name, value })),
|
|
@@ -319,7 +320,7 @@ program
|
|
|
319
320
|
modelChoices = provider.models;
|
|
320
321
|
}
|
|
321
322
|
|
|
322
|
-
const model = await select({
|
|
323
|
+
const model = await select({ loop: false,
|
|
323
324
|
message: chalk.cyan('选择模型'),
|
|
324
325
|
choices: [
|
|
325
326
|
...modelChoices,
|
|
@@ -393,7 +394,7 @@ async function runMenu() {
|
|
|
393
394
|
console.log(await renderStatusBar(apiStatus));
|
|
394
395
|
console.log();
|
|
395
396
|
|
|
396
|
-
const action = await select({
|
|
397
|
+
const action = await select({ loop: false,
|
|
397
398
|
message: chalk.cyan('选择操作'),
|
|
398
399
|
choices: [
|
|
399
400
|
{ name: '🤖 启动 Claude Code', value: 'launch', disabled: !config && '需先完成配置' },
|
|
@@ -447,7 +448,7 @@ async function runMenu() {
|
|
|
447
448
|
|
|
448
449
|
// 操作结束,提示返回菜单
|
|
449
450
|
console.log();
|
|
450
|
-
const next = await select({
|
|
451
|
+
const next = await select({ loop: false,
|
|
451
452
|
message: chalk.cyan('下一步'),
|
|
452
453
|
choices: [
|
|
453
454
|
{ name: '↩ 返回主菜单', value: 'menu' },
|