@pikecode/api-key-manager 1.0.23 → 1.0.24
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/package.json +1 -1
- package/src/commands/switch.js +33 -6
package/package.json
CHANGED
package/src/commands/switch.js
CHANGED
|
@@ -36,11 +36,9 @@ class EnvSwitcher extends BaseCommand {
|
|
|
36
36
|
try {
|
|
37
37
|
this.clearScreen();
|
|
38
38
|
const provider = await this.validateProvider(providerName);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
const availableArgs = this.getAvailableLaunchArgs();
|
|
39
|
+
const isCodex = provider.ideName === 'codex';
|
|
40
|
+
const availableArgs = isCodex ? this.getCodexLaunchArgs() : this.getAvailableLaunchArgs();
|
|
41
|
+
const ideDisplayName = isCodex ? 'Codex CLI' : 'Claude Code';
|
|
44
42
|
|
|
45
43
|
console.log(UIHelper.createTitle('启动配置', UIHelper.icons.launch));
|
|
46
44
|
console.log();
|
|
@@ -50,7 +48,7 @@ class EnvSwitcher extends BaseCommand {
|
|
|
50
48
|
['空格', '切换选中'],
|
|
51
49
|
['A', '全选'],
|
|
52
50
|
['I', '反选'],
|
|
53
|
-
['Enter',
|
|
51
|
+
['Enter', `启动 ${ideDisplayName}`],
|
|
54
52
|
['ESC', '返回供应商选择']
|
|
55
53
|
]));
|
|
56
54
|
console.log();
|
|
@@ -276,6 +274,35 @@ class EnvSwitcher extends BaseCommand {
|
|
|
276
274
|
];
|
|
277
275
|
}
|
|
278
276
|
|
|
277
|
+
getCodexLaunchArgs() {
|
|
278
|
+
return [
|
|
279
|
+
{
|
|
280
|
+
name: '--continue',
|
|
281
|
+
label: '继续上次对话',
|
|
282
|
+
description: '恢复上次的对话记录',
|
|
283
|
+
checked: false
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
name: '--full-auto',
|
|
287
|
+
label: '全自动模式',
|
|
288
|
+
description: '自动批准所有操作',
|
|
289
|
+
checked: false
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
name: '--dangerously-bypass-approvals-and-sandbox',
|
|
293
|
+
label: '跳过审批和沙盒',
|
|
294
|
+
description: '危险:跳过所有安全检查',
|
|
295
|
+
checked: false
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
name: '--quiet',
|
|
299
|
+
label: '静默模式',
|
|
300
|
+
description: '减少输出信息',
|
|
301
|
+
checked: false
|
|
302
|
+
}
|
|
303
|
+
];
|
|
304
|
+
}
|
|
305
|
+
|
|
279
306
|
// getArgDescription 方法已被移除,直接使用 arg.description
|
|
280
307
|
|
|
281
308
|
async showProviderSelection() {
|