@pikecode/api-key-manager 1.0.24 → 1.0.26

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikecode/api-key-manager",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "A CLI tool for managing and switching multiple API provider configurations",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -622,28 +622,28 @@ class ProviderAdder extends BaseCommand {
622
622
 
623
623
  try {
624
624
  const codexArgs = [
625
+ {
626
+ name: 'resume',
627
+ label: '继续上次对话',
628
+ description: '恢复之前的会话',
629
+ checked: false
630
+ },
625
631
  {
626
632
  name: '--full-auto',
627
633
  label: '全自动模式',
628
- description: '自动批准所有操作',
634
+ description: '自动批准 + 工作区写入沙盒 (与跳过沙盒互斥)',
629
635
  checked: false
630
636
  },
631
637
  {
632
638
  name: '--dangerously-bypass-approvals-and-sandbox',
633
639
  label: '跳过审批和沙盒',
634
- description: '危险:跳过所有安全检查',
635
- checked: false
636
- },
637
- {
638
- name: '--model',
639
- label: '指定模型',
640
- description: '使用特定模型 (需手动指定)',
640
+ description: '危险:跳过所有安全检查 (与全自动互斥)',
641
641
  checked: false
642
642
  },
643
643
  {
644
- name: '--quiet',
645
- label: '静默模式',
646
- description: '减少输出信息',
644
+ name: '--search',
645
+ label: '启用网页搜索',
646
+ description: '允许模型搜索网页',
647
647
  checked: false
648
648
  }
649
649
  ];
@@ -277,27 +277,30 @@ class EnvSwitcher extends BaseCommand {
277
277
  getCodexLaunchArgs() {
278
278
  return [
279
279
  {
280
- name: '--continue',
280
+ name: 'resume',
281
281
  label: '继续上次对话',
282
- description: '恢复上次的对话记录',
283
- checked: false
282
+ description: '恢复之前的会话',
283
+ checked: false,
284
+ isSubcommand: true
284
285
  },
285
286
  {
286
287
  name: '--full-auto',
287
288
  label: '全自动模式',
288
- description: '自动批准所有操作',
289
- checked: false
289
+ description: '自动批准 + 工作区写入沙盒',
290
+ checked: false,
291
+ exclusive: ['--dangerously-bypass-approvals-and-sandbox']
290
292
  },
291
293
  {
292
294
  name: '--dangerously-bypass-approvals-and-sandbox',
293
295
  label: '跳过审批和沙盒',
294
296
  description: '危险:跳过所有安全检查',
295
- checked: false
297
+ checked: false,
298
+ exclusive: ['--full-auto']
296
299
  },
297
300
  {
298
- name: '--quiet',
299
- label: '静默模式',
300
- description: '减少输出信息',
301
+ name: '--search',
302
+ label: '启用网页搜索',
303
+ description: '允许模型搜索网页',
301
304
  checked: false
302
305
  }
303
306
  ];
@@ -87,7 +87,12 @@ async function executeCodexWithEnv(config, launchArgs = []) {
87
87
  }
88
88
 
89
89
  const env = buildCodexEnvVariables(config);
90
- const args = Array.isArray(launchArgs) ? [...launchArgs] : [];
90
+
91
+ // 处理参数:子命令放前面,选项放后面
92
+ const rawArgs = Array.isArray(launchArgs) ? [...launchArgs] : [];
93
+ const subcommands = rawArgs.filter(arg => !arg.startsWith('-'));
94
+ const options = rawArgs.filter(arg => arg.startsWith('-'));
95
+ const args = [...subcommands, ...options];
91
96
 
92
97
  clearTerminal();
93
98