@2api-store/activate 0.4.3 → 0.4.5
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/lib/cmds.mjs +12 -1
- package/lib/platforms.mjs +15 -1
- package/package.json +1 -1
package/lib/cmds.mjs
CHANGED
|
@@ -529,10 +529,11 @@ async function cmdReconfig(argv) {
|
|
|
529
529
|
return 1
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
-
// reconfig:
|
|
532
|
+
// reconfig: 全选主 CLI 配置(跳过独立 CLI 如 opencode)
|
|
533
533
|
const seen = new Set()
|
|
534
534
|
const selectedItems = []
|
|
535
535
|
for (const c of osConfigs) {
|
|
536
|
+
if (!isDefaultSelected(c.client_type)) continue
|
|
536
537
|
const key = `${c.platform}/${c.client_type}`
|
|
537
538
|
if (seen.has(key)) continue
|
|
538
539
|
seen.add(key)
|
|
@@ -674,6 +675,16 @@ async function cmdReconfig(argv) {
|
|
|
674
675
|
return 2
|
|
675
676
|
}
|
|
676
677
|
|
|
678
|
+
// 打印启动/使用指南(与默认激活一致)
|
|
679
|
+
const guideItems = selectedItems
|
|
680
|
+
.filter((item) => item.meta)
|
|
681
|
+
.map((item) => ({
|
|
682
|
+
name: item.meta.name || item.clientType,
|
|
683
|
+
startCmd: item.meta.startCmd || '',
|
|
684
|
+
usage: item.meta.usage || '',
|
|
685
|
+
}))
|
|
686
|
+
guide(guideItems)
|
|
687
|
+
|
|
677
688
|
return failed.length > 0 ? 3 : 0
|
|
678
689
|
}
|
|
679
690
|
|
package/lib/platforms.mjs
CHANGED
|
@@ -62,7 +62,21 @@ export const CLI_META = {
|
|
|
62
62
|
startCmd: 'claude',
|
|
63
63
|
detectBin: 'claude',
|
|
64
64
|
configFiles: ['~/.claude/', '~/.claude.json'],
|
|
65
|
-
usage:
|
|
65
|
+
usage: [
|
|
66
|
+
'常用命令:',
|
|
67
|
+
' claude 交互模式',
|
|
68
|
+
' claude "你的问题" 带初始问题启动',
|
|
69
|
+
' claude -p "问题" 非交互模式(输出后退出,适合脚本)',
|
|
70
|
+
' claude -c 继续最近会话',
|
|
71
|
+
' claude -r 恢复历史会话(选择器)',
|
|
72
|
+
' claude --model sonnet 指定模型(sonnet/opus/haiku/fable)',
|
|
73
|
+
' claude mcp 管理 MCP 服务器',
|
|
74
|
+
' claude doctor 诊断安装/配置',
|
|
75
|
+
' claude update 更新到最新版',
|
|
76
|
+
'权限模式(Shift+Tab 切换):default / acceptEdits / plan / auto / bypassPermissions',
|
|
77
|
+
' claude --dangerously-skip-permissions 跳过所有权限提示(=bypassPermissions,谨慎用)',
|
|
78
|
+
'项目根放 CLAUDE.md 让 Claude 了解你的代码库',
|
|
79
|
+
].join('\n'),
|
|
66
80
|
isPrimary: true,
|
|
67
81
|
},
|
|
68
82
|
'gemini-cli': {
|