zcf 2.10.2 → 2.12.0
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/README.md +48 -26
- package/bin/zcf.mjs +1 -1
- package/dist/chunks/simple-config.mjs +1275 -1104
- package/dist/cli.mjs +298 -265
- package/dist/index.d.mts +16 -15
- package/dist/index.d.ts +16 -15
- package/dist/index.mjs +4 -5
- package/package.json +20 -15
- package/templates/CLAUDE.md +249 -5
- package/templates/en/output-styles/engineer-professional.md +130 -0
- package/templates/en/output-styles/laowang-engineer.md +62 -0
- package/templates/en/output-styles/nekomata-engineer.md +165 -0
- package/templates/en/workflow/bmad/commands/bmad-init.md +58 -56
- package/templates/en/workflow/common/agents/get-current-datetime.md +29 -0
- package/templates/en/workflow/common/agents/init-architect.md +114 -0
- package/templates/en/workflow/common/commands/init-project.md +53 -0
- package/templates/en/workflow/git/commands/git-cleanBranches.md +2 -1
- package/templates/en/workflow/git/commands/git-commit.md +36 -31
- package/templates/en/workflow/git/commands/git-rollback.md +27 -26
- package/templates/en/workflow/git/commands/git-worktree.md +197 -222
- package/templates/zh-CN/output-styles/engineer-professional.md +130 -0
- package/templates/zh-CN/output-styles/laowang-engineer.md +62 -0
- package/templates/zh-CN/output-styles/nekomata-engineer.md +165 -0
- package/templates/zh-CN/workflow/bmad/commands/bmad-init.md +58 -55
- package/templates/zh-CN/workflow/common/agents/get-current-datetime.md +29 -0
- package/templates/zh-CN/workflow/common/agents/init-architect.md +114 -0
- package/templates/zh-CN/workflow/common/commands/init-project.md +53 -0
- package/templates/zh-CN/workflow/git/commands/git-cleanBranches.md +2 -1
- package/templates/zh-CN/workflow/git/commands/git-commit.md +0 -5
- package/templates/zh-CN/workflow/git/commands/git-rollback.md +1 -1
- package/templates/zh-CN/workflow/git/commands/git-worktree.md +197 -222
- package/templates/en/memory/mcp.md +0 -22
- package/templates/en/memory/personality.md +0 -1
- package/templates/en/memory/rules.md +0 -45
- package/templates/en/memory/technical-guides.md +0 -126
- package/templates/zh-CN/memory/mcp.md +0 -22
- package/templates/zh-CN/memory/personality.md +0 -1
- package/templates/zh-CN/memory/rules.md +0 -45
- package/templates/zh-CN/memory/technical-guides.md +0 -126
- /package/templates/{settings.json → common/settings.json} +0 -0
|
@@ -1,30 +1,44 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, statSync, copyFileSync, unlinkSync } from 'node:fs';
|
|
2
|
+
import process from 'node:process';
|
|
1
3
|
import ansis from 'ansis';
|
|
2
4
|
import inquirer from 'inquirer';
|
|
3
|
-
import {
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
4
6
|
import { join, dirname } from 'pathe';
|
|
5
7
|
import dayjs from 'dayjs';
|
|
6
8
|
import { exec as exec$1 } from 'node:child_process';
|
|
7
9
|
import { homedir, platform } from 'node:os';
|
|
8
10
|
import { join as join$1 } from 'node:path';
|
|
9
11
|
import { promisify } from 'node:util';
|
|
10
|
-
import { fileURLToPath } from 'node:url';
|
|
11
|
-
import { exec as exec$2 } from 'child_process';
|
|
12
|
-
import { promisify as promisify$1 } from 'util';
|
|
13
12
|
import ora from 'ora';
|
|
14
13
|
import semver from 'semver';
|
|
15
14
|
import { exec } from 'tinyexec';
|
|
16
15
|
import { rm, mkdir, copyFile as copyFile$1 } from 'node:fs/promises';
|
|
17
16
|
|
|
18
|
-
const version = "2.
|
|
17
|
+
const version = "2.12.0";
|
|
19
18
|
const homepage = "https://github.com/UfoMiao/zcf";
|
|
20
19
|
|
|
21
20
|
const WORKFLOW_CONFIGS = [
|
|
21
|
+
{
|
|
22
|
+
id: "commonTools",
|
|
23
|
+
nameKey: "workflowOption.commonTools",
|
|
24
|
+
descriptionKey: "workflowDescription.commonTools",
|
|
25
|
+
defaultSelected: true,
|
|
26
|
+
order: 1,
|
|
27
|
+
commands: ["init-project.md"],
|
|
28
|
+
agents: [
|
|
29
|
+
{ id: "init-architect", filename: "init-architect.md", required: true },
|
|
30
|
+
{ id: "get-current-datetime", filename: "get-current-datetime.md", required: true }
|
|
31
|
+
],
|
|
32
|
+
autoInstallAgents: true,
|
|
33
|
+
category: "common",
|
|
34
|
+
outputDir: "common"
|
|
35
|
+
},
|
|
22
36
|
{
|
|
23
37
|
id: "sixStepsWorkflow",
|
|
24
38
|
nameKey: "workflowOption.sixStepsWorkflow",
|
|
25
39
|
descriptionKey: "workflowDescription.sixStepsWorkflow",
|
|
26
40
|
defaultSelected: true,
|
|
27
|
-
order:
|
|
41
|
+
order: 2,
|
|
28
42
|
commands: ["workflow.md"],
|
|
29
43
|
agents: [],
|
|
30
44
|
autoInstallAgents: false,
|
|
@@ -36,7 +50,7 @@ const WORKFLOW_CONFIGS = [
|
|
|
36
50
|
nameKey: "workflowOption.featPlanUx",
|
|
37
51
|
descriptionKey: "workflowDescription.featPlanUx",
|
|
38
52
|
defaultSelected: true,
|
|
39
|
-
order:
|
|
53
|
+
order: 3,
|
|
40
54
|
commands: ["feat.md"],
|
|
41
55
|
agents: [
|
|
42
56
|
{ id: "planner", filename: "planner.md", required: true },
|
|
@@ -51,7 +65,7 @@ const WORKFLOW_CONFIGS = [
|
|
|
51
65
|
nameKey: "workflowOption.gitWorkflow",
|
|
52
66
|
descriptionKey: "workflowDescription.gitWorkflow",
|
|
53
67
|
defaultSelected: true,
|
|
54
|
-
order:
|
|
68
|
+
order: 4,
|
|
55
69
|
commands: ["git-commit.md", "git-rollback.md", "git-cleanBranches.md", "git-worktree.md"],
|
|
56
70
|
agents: [],
|
|
57
71
|
autoInstallAgents: false,
|
|
@@ -63,7 +77,7 @@ const WORKFLOW_CONFIGS = [
|
|
|
63
77
|
nameKey: "workflowOption.bmadWorkflow",
|
|
64
78
|
descriptionKey: "workflowDescription.bmadWorkflow",
|
|
65
79
|
defaultSelected: true,
|
|
66
|
-
order:
|
|
80
|
+
order: 5,
|
|
67
81
|
commands: ["bmad-init.md"],
|
|
68
82
|
agents: [],
|
|
69
83
|
autoInstallAgents: false,
|
|
@@ -78,520 +92,226 @@ function getOrderedWorkflows() {
|
|
|
78
92
|
return [...WORKFLOW_CONFIGS].sort((a, b) => a.order - b.order);
|
|
79
93
|
}
|
|
80
94
|
|
|
81
|
-
const common$1 = {
|
|
82
|
-
// Basic
|
|
83
|
-
multiSelectHint: "\uFF08\u7A7A\u683C\u9009\u62E9\uFF0Ca\u5168\u9009\uFF0Ci\u53CD\u9009\uFF0C\u56DE\u8F66\u786E\u8BA4\uFF09",
|
|
84
|
-
yes: "\u662F",
|
|
85
|
-
no: "\u5426",
|
|
86
|
-
skip: "\u8DF3\u8FC7",
|
|
87
|
-
cancelled: "\u64CD\u4F5C\u5DF2\u53D6\u6D88",
|
|
88
|
-
error: "\u9519\u8BEF",
|
|
89
|
-
complete: "\u{1F389} \u914D\u7F6E\u5B8C\u6210\uFF01\u4F7F\u7528 'claude' \u547D\u4EE4\u5F00\u59CB\u4F53\u9A8C\u3002",
|
|
90
|
-
none: "\u65E0",
|
|
91
|
-
notConfigured: "\u672A\u914D\u7F6E",
|
|
92
|
-
spaceToSelectReturn: "- \u7A7A\u683C\u9009\u62E9\uFF0C\u56DE\u8F66\u63D0\u4EA4",
|
|
93
|
-
enterChoice: "\u8BF7\u8F93\u5165\u9009\u9879\uFF0C\u56DE\u8F66\u786E\u8BA4\uFF08\u4E0D\u533A\u5206\u5927\u5C0F\u5199\uFF09",
|
|
94
|
-
invalidChoice: "\u65E0\u6548\u9009\u62E9\u3002\u8BF7\u8F93\u5165\u6709\u6548\u9009\u9879\u3002",
|
|
95
|
-
goodbye: "\u{1F44B} \u611F\u8C22\u4F7F\u7528 ZCF\uFF01\u518D\u89C1\uFF01",
|
|
96
|
-
returnToMenu: "\u8FD4\u56DE\u4E3B\u83DC\u5355\uFF1F",
|
|
97
|
-
back: "\u8FD4\u56DE"
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const language$1 = {
|
|
101
|
-
selectScriptLang: "\u9009\u62E9ZCF\u663E\u793A\u8BED\u8A00",
|
|
102
|
-
selectConfigLang: "\u9009\u62E9 Claude Code \u914D\u7F6E\u8BED\u8A00",
|
|
103
|
-
selectAiOutputLang: "\u9009\u62E9 AI \u8F93\u51FA\u8BED\u8A00",
|
|
104
|
-
aiOutputLangHint: "AI \u5C06\u4F7F\u7528\u6B64\u8BED\u8A00\u56DE\u590D\u4F60\u7684\u95EE\u9898",
|
|
105
|
-
enterCustomLanguage: "\u8BF7\u8F93\u5165\u81EA\u5B9A\u4E49\u8BED\u8A00\uFF08\u4F8B\u5982\uFF1AJapanese, French \u7B49\uFF09",
|
|
106
|
-
languageChanged: "\u8BED\u8A00\u5DF2\u66F4\u6539",
|
|
107
|
-
configLangHint: {
|
|
108
|
-
"zh-CN": "\u4FBF\u4E8E\u4E2D\u6587\u7528\u6237\u81EA\u5B9A\u4E49",
|
|
109
|
-
en: "\u63A8\u8350\uFF0Ctoken \u6D88\u8017\u66F4\u4F4E"
|
|
110
|
-
},
|
|
111
|
-
updateConfigLangPrompt: "\u9009\u62E9\u914D\u7F6E\u8BED\u8A00",
|
|
112
|
-
updateConfigLangChoice: {
|
|
113
|
-
"zh-CN": "\u4E2D\u6587\u7248\u914D\u7F6E",
|
|
114
|
-
en: "\u82F1\u6587\u7248\u914D\u7F6E"
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
const installation$1 = {
|
|
119
|
-
installPrompt: "\u68C0\u6D4B\u5230 Claude Code \u672A\u5B89\u88C5\uFF0C\u662F\u5426\u81EA\u52A8\u5B89\u88C5\uFF1F",
|
|
120
|
-
installing: "\u6B63\u5728\u5B89\u88C5 Claude Code...",
|
|
121
|
-
installSuccess: "Claude Code \u5B89\u88C5\u6210\u529F",
|
|
122
|
-
alreadyInstalled: "Claude Code \u5DF2\u5B89\u88C5",
|
|
123
|
-
installFailed: "Claude Code \u5B89\u88C5\u5931\u8D25",
|
|
124
|
-
npmNotFound: "npm \u672A\u5B89\u88C5\u3002\u8BF7\u5148\u5B89\u88C5 Node.js \u548C npm\u3002",
|
|
125
|
-
// Termux specific
|
|
126
|
-
termuxDetected: "\u68C0\u6D4B\u5230 Termux \u73AF\u5883",
|
|
127
|
-
termuxInstallHint: "\u5728 Termux \u4E2D\uFF0C\u8BF7\u5148\u8FD0\u884C: pkg install nodejs \u6216 pkg install nodejs-lts",
|
|
128
|
-
termuxPathInfo: "\u4F7F\u7528 Termux \u8DEF\u5F84: {path}",
|
|
129
|
-
termuxEnvironmentInfo: "Termux \u73AF\u5883\u901A\u8FC7 pkg \u7BA1\u7406\u5668\u63D0\u4F9B Node.js \u548C npm",
|
|
130
|
-
// Windows specific
|
|
131
|
-
windowsDetected: "\u68C0\u6D4B\u5230 Windows \u7CFB\u7EDF\uFF0C\u5C06\u81EA\u52A8\u914D\u7F6E\u517C\u5BB9\u683C\u5F0F"
|
|
132
|
-
};
|
|
133
|
-
|
|
134
95
|
const api$1 = {
|
|
135
96
|
// Basic API configuration
|
|
136
|
-
configureApi: "
|
|
137
|
-
useAuthToken: "
|
|
138
|
-
authTokenDesc: "
|
|
139
|
-
useApiKey: "
|
|
140
|
-
apiKeyDesc: "
|
|
141
|
-
useCcrProxy: "
|
|
142
|
-
ccrProxyDesc: "
|
|
143
|
-
skipApi: "
|
|
144
|
-
enterApiUrl: "
|
|
145
|
-
enterAuthToken: "
|
|
146
|
-
enterApiKey: "
|
|
147
|
-
apiConfigSuccess: "API
|
|
97
|
+
configureApi: "Select API authentication method",
|
|
98
|
+
useAuthToken: "Use Auth Token (OAuth authentication)",
|
|
99
|
+
authTokenDesc: "For tokens obtained via OAuth or browser login",
|
|
100
|
+
useApiKey: "Use API Key (Key authentication)",
|
|
101
|
+
apiKeyDesc: "For API keys from Anthropic Console",
|
|
102
|
+
useCcrProxy: "Use CCR Proxy",
|
|
103
|
+
ccrProxyDesc: "Use multiple AI models via Claude Code Router",
|
|
104
|
+
skipApi: "Skip (configure manually later)",
|
|
105
|
+
enterApiUrl: "Enter API URL",
|
|
106
|
+
enterAuthToken: "Enter Auth Token",
|
|
107
|
+
enterApiKey: "Enter API Key",
|
|
108
|
+
apiConfigSuccess: "API configured",
|
|
148
109
|
// API modification
|
|
149
|
-
existingApiConfig: "
|
|
110
|
+
existingApiConfig: "Existing API configuration detected:",
|
|
150
111
|
apiConfigUrl: "URL",
|
|
151
112
|
apiConfigKey: "Key",
|
|
152
|
-
apiConfigAuthType: "
|
|
153
|
-
selectApiAction: "
|
|
154
|
-
keepExistingConfig: "
|
|
155
|
-
modifyAllConfig: "
|
|
156
|
-
modifyPartialConfig: "
|
|
157
|
-
selectModifyItems: "
|
|
158
|
-
modifyApiUrl: "
|
|
159
|
-
modifyApiKey: "
|
|
160
|
-
modifyAuthType: "
|
|
161
|
-
continueModification: "
|
|
162
|
-
modificationSaved: "
|
|
163
|
-
enterNewApiUrl: "
|
|
164
|
-
enterNewApiKey: "
|
|
165
|
-
selectNewAuthType: "
|
|
113
|
+
apiConfigAuthType: "Auth Type",
|
|
114
|
+
selectApiAction: "Select API processing operation",
|
|
115
|
+
keepExistingConfig: "Keep existing configuration",
|
|
116
|
+
modifyAllConfig: "Modify all configuration",
|
|
117
|
+
modifyPartialConfig: "Modify partial configuration",
|
|
118
|
+
selectModifyItems: "Select items to modify",
|
|
119
|
+
modifyApiUrl: "Modify API URL",
|
|
120
|
+
modifyApiKey: "Modify API Key",
|
|
121
|
+
modifyAuthType: "Modify auth type",
|
|
122
|
+
continueModification: "Continue modifying other configurations?",
|
|
123
|
+
modificationSaved: "Configuration saved",
|
|
124
|
+
enterNewApiUrl: "Enter new API URL (current: {url})",
|
|
125
|
+
enterNewApiKey: "Enter new API Key (current: {key})",
|
|
126
|
+
selectNewAuthType: "Select new auth type (current: {type})",
|
|
166
127
|
// API validation
|
|
167
128
|
apiKeyValidation: {
|
|
168
|
-
empty: "API Key
|
|
169
|
-
example: "
|
|
129
|
+
empty: "API Key cannot be empty",
|
|
130
|
+
example: "Example format: sk-abcdef123456_789xyz"
|
|
170
131
|
},
|
|
171
|
-
urlRequired: "URL
|
|
172
|
-
invalidUrl: "
|
|
173
|
-
keyRequired: "
|
|
174
|
-
invalidKeyFormat: "
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
const configuration$1 = {
|
|
178
|
-
existingConfig: "\u68C0\u6D4B\u5230\u5DF2\u6709\u914D\u7F6E\u6587\u4EF6\uFF0C\u5982\u4F55\u5904\u7406\uFF1F",
|
|
179
|
-
backupAndOverwrite: "\u5907\u4EFD\u5E76\u8986\u76D6\u5168\u90E8",
|
|
180
|
-
updateDocsOnly: "\u4EC5\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173md\u5E76\u5907\u4EFD\u65E7\u914D\u7F6E",
|
|
181
|
-
mergeConfig: "\u5408\u5E76\u914D\u7F6E",
|
|
182
|
-
backupSuccess: "\u5DF2\u5907\u4EFD\u6240\u6709\u914D\u7F6E\u6587\u4EF6\u5230",
|
|
183
|
-
copying: "\u6B63\u5728\u590D\u5236\u914D\u7F6E\u6587\u4EF6...",
|
|
184
|
-
configSuccess: "\u914D\u7F6E\u6587\u4EF6\u5DF2\u590D\u5236\u5230",
|
|
185
|
-
noExistingConfig: "\u672A\u627E\u5230\u73B0\u6709\u914D\u7F6E\u3002\u8BF7\u5148\u8FD0\u884C `zcf`\u3002",
|
|
186
|
-
updatingPrompts: "\u6B63\u5728\u66F4\u65B0 Claude Code \u8BB0\u5FC6\u6587\u6863...",
|
|
187
|
-
// Model configuration
|
|
188
|
-
selectDefaultModel: "\u9009\u62E9\u9ED8\u8BA4\u6A21\u578B",
|
|
189
|
-
modelConfigSuccess: "\u9ED8\u8BA4\u6A21\u578B\u5DF2\u914D\u7F6E",
|
|
190
|
-
existingModelConfig: "\u68C0\u6D4B\u5230\u5DF2\u6709\u6A21\u578B\u914D\u7F6E",
|
|
191
|
-
currentModel: "\u5F53\u524D\u6A21\u578B",
|
|
192
|
-
modifyModel: "\u662F\u5426\u4FEE\u6539\u6A21\u578B\u914D\u7F6E\uFF1F",
|
|
193
|
-
keepModel: "\u4FDD\u6301\u5F53\u524D\u6A21\u578B\u914D\u7F6E",
|
|
194
|
-
defaultModelOption: "\u9ED8\u8BA4 - \u8BA9 Claude Code \u81EA\u52A8\u9009\u62E9",
|
|
195
|
-
opusModelOption: "Opus - \u53EA\u7528opus\uFF0Ctoken\u6D88\u8017\u9AD8\uFF0C\u614E\u7528",
|
|
196
|
-
opusPlanModelOption: "OpusPlan - Opus\u505A\u8BA1\u5212\uFF0Csonnet\u7F16\u5199\u4EE3\u7801\uFF0C\u63A8\u8350",
|
|
197
|
-
modelConfigured: "\u9ED8\u8BA4\u6A21\u578B\u5DF2\u914D\u7F6E",
|
|
198
|
-
// AI memory configuration
|
|
199
|
-
selectMemoryOption: "\u9009\u62E9\u914D\u7F6E\u9009\u9879",
|
|
200
|
-
configureAiLanguage: "\u914D\u7F6E AI \u8F93\u51FA\u8BED\u8A00",
|
|
201
|
-
configureAiPersonality: "\u914D\u7F6E AI \u4E2A\u6027\u98CE\u683C",
|
|
202
|
-
aiLanguageConfigured: "AI \u8F93\u51FA\u8BED\u8A00\u5DF2\u914D\u7F6E",
|
|
203
|
-
existingLanguageConfig: "\u68C0\u6D4B\u5230\u5DF2\u6709 AI \u8F93\u51FA\u8BED\u8A00\u914D\u7F6E",
|
|
204
|
-
currentLanguage: "\u5F53\u524D\u8BED\u8A00",
|
|
205
|
-
modifyLanguage: "\u662F\u5426\u4FEE\u6539 AI \u8F93\u51FA\u8BED\u8A00\uFF1F",
|
|
206
|
-
keepLanguage: "\u4FDD\u6301\u5F53\u524D\u8BED\u8A00\u914D\u7F6E",
|
|
207
|
-
// AI personality
|
|
208
|
-
selectAiPersonality: "\u9009\u62E9 AI \u4E2A\u6027\u98CE\u683C",
|
|
209
|
-
customPersonalityHint: "\u5B9A\u4E49\u4F60\u81EA\u5DF1\u7684\u4E2A\u6027",
|
|
210
|
-
enterCustomPersonality: "\u8BF7\u8F93\u5165\u81EA\u5B9A\u4E49\u4E2A\u6027\u63CF\u8FF0",
|
|
211
|
-
personalityConfigured: "AI \u4E2A\u6027\u5DF2\u914D\u7F6E",
|
|
212
|
-
existingPersonality: "\u68C0\u6D4B\u5230\u5DF2\u6709 AI \u4E2A\u6027\u914D\u7F6E",
|
|
213
|
-
currentPersonality: "\u5F53\u524D\u4E2A\u6027",
|
|
214
|
-
modifyPersonality: "\u662F\u5426\u4FEE\u6539 AI \u4E2A\u6027\u914D\u7F6E\uFF1F",
|
|
215
|
-
keepPersonality: "\u4FDD\u6301\u5F53\u524D\u4E2A\u6027\u914D\u7F6E",
|
|
216
|
-
directiveCannotBeEmpty: "\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A",
|
|
217
|
-
languageRequired: "\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879",
|
|
218
|
-
// Cache
|
|
219
|
-
confirmClearCache: "\u786E\u8BA4\u6E05\u9664\u6240\u6709 ZCF \u504F\u597D\u7F13\u5B58\uFF1F",
|
|
220
|
-
cacheCleared: "ZCF \u7F13\u5B58\u5DF2\u6E05\u9664",
|
|
221
|
-
noCacheFound: "\u672A\u627E\u5230\u7F13\u5B58\u6587\u4EF6",
|
|
222
|
-
// Environment and permissions
|
|
223
|
-
selectEnvPermissionOption: "\u8BF7\u9009\u62E9\u914D\u7F6E\u9009\u9879",
|
|
224
|
-
importRecommendedEnv: "\u5BFC\u5165 ZCF \u63A8\u8350\u73AF\u5883\u53D8\u91CF",
|
|
225
|
-
importRecommendedEnvDesc: "\u9690\u79C1\u4FDD\u62A4\u53D8\u91CF\u7B49",
|
|
226
|
-
importRecommendedPermissions: "\u5BFC\u5165 ZCF \u63A8\u8350\u6743\u9650\u914D\u7F6E",
|
|
227
|
-
importRecommendedPermissionsDesc: "\u51E0\u4E4E\u5168\u90E8\u6743\u9650\uFF0C\u51CF\u5C11\u9891\u7E41\u8BF7\u6C42\u6743\u9650\uFF0C\u5371\u9669\u64CD\u4F5C\u7531\u89C4\u5219\u9650\u5236",
|
|
228
|
-
openSettingsJson: "\u6253\u5F00 settings.json \u624B\u52A8\u914D\u7F6E",
|
|
229
|
-
openSettingsJsonDesc: "\u9AD8\u7EA7\u7528\u6237\u81EA\u5B9A\u4E49",
|
|
230
|
-
envImportSuccess: "\u73AF\u5883\u53D8\u91CF\u5DF2\u5BFC\u5165",
|
|
231
|
-
permissionsImportSuccess: "\u6743\u9650\u914D\u7F6E\u5DF2\u5BFC\u5165",
|
|
232
|
-
openingSettingsJson: "\u6B63\u5728\u6253\u5F00 settings.json...",
|
|
233
|
-
// JSON config related
|
|
234
|
-
invalidConfiguration: "\u914D\u7F6E\u65E0\u6548",
|
|
235
|
-
failedToParseJson: "\u89E3\u6790 JSON \u6587\u4EF6\u5931\u8D25:",
|
|
236
|
-
failedToBackupConfig: "\u5907\u4EFD\u914D\u7F6E\u5931\u8D25",
|
|
237
|
-
failedToReadTemplateSettings: "\u8BFB\u53D6\u6A21\u677F\u8BBE\u7F6E\u5931\u8D25",
|
|
238
|
-
failedToMergeSettings: "\u5408\u5E76\u8BBE\u7F6E\u5931\u8D25",
|
|
239
|
-
preservingExistingSettings: "\u4FDD\u7559\u73B0\u6709\u8BBE\u7F6E",
|
|
240
|
-
memoryDirNotFound: "\u672A\u627E\u5230\u8BB0\u5FC6\u76EE\u5F55",
|
|
241
|
-
failedToSetOnboarding: "\u8BBE\u7F6E\u5F15\u5BFC\u6807\u5FD7\u5931\u8D25",
|
|
242
|
-
fixWindowsMcp: "\u4FEE\u590D Windows MCP \u914D\u7F6E\uFF1F"
|
|
132
|
+
urlRequired: "URL is required",
|
|
133
|
+
invalidUrl: "Invalid URL",
|
|
134
|
+
keyRequired: "Key is required",
|
|
135
|
+
invalidKeyFormat: "Invalid key format"
|
|
243
136
|
};
|
|
244
137
|
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
configureApiOrCcr: "\u914D\u7F6E API URL\u3001\u8BA4\u8BC1\u4FE1\u606F\u6216 CCR \u4EE3\u7406",
|
|
289
|
-
configureApi: "\u914D\u7F6E API URL \u548C\u8BA4\u8BC1\u4FE1\u606F",
|
|
290
|
-
configureMcp: "\u914D\u7F6E MCP \u670D\u52A1\uFF08\u542B Windows \u4FEE\u590D\uFF09",
|
|
291
|
-
configureModel: "\u8BBE\u7F6E\u9ED8\u8BA4\u6A21\u578B\uFF08opus/sonnet\uFF09",
|
|
292
|
-
configureAiMemory: "\u914D\u7F6E AI \u8F93\u51FA\u8BED\u8A00\u548C\u89D2\u8272\u98CE\u683C",
|
|
293
|
-
configureEnvPermission: "\u5BFC\u5165\u9690\u79C1\u4FDD\u62A4\u73AF\u5883\u53D8\u91CF\u548C\u7CFB\u7EDF\u6743\u9650\u914D\u7F6E",
|
|
294
|
-
configureCcr: "\u914D\u7F6E Claude Code Router \u4EE5\u4F7F\u7528\u591A\u4E2A AI \u6A21\u578B",
|
|
295
|
-
ccrManagement: "\u914D\u7F6E Claude Code Router \u4EE5\u4F7F\u7528\u591A\u4E2A AI \u6A21\u578B",
|
|
296
|
-
ccusage: "Claude Code \u7528\u91CF\u5206\u6790",
|
|
297
|
-
cometixLine: "\u57FA\u4E8E Rust \u7684\u9AD8\u6027\u80FD Claude Code \u72B6\u6001\u680F\u5DE5\u5177\uFF0C\u96C6\u6210 Git \u4FE1\u606F\u548C\u5B9E\u65F6\u4F7F\u7528\u91CF\u8DDF\u8E2A",
|
|
298
|
-
installBmad: "AI \u9A71\u52A8\u7684\u5F00\u53D1\u65B9\u6CD5\u8BBA\u6846\u67B6",
|
|
299
|
-
clearCache: "\u6E05\u9664\u504F\u597D\u8BED\u8A00\u7B49\u7F13\u5B58",
|
|
300
|
-
checkUpdates: "\u68C0\u67E5\u5E76\u66F4\u65B0 Claude Code\u3001CCR \u548C CCometixLine \u7684\u7248\u672C",
|
|
301
|
-
changeLanguage: "\u66F4\u6539 ZCF \u754C\u9762\u8BED\u8A00"
|
|
302
|
-
}
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
const workflow$1 = {
|
|
306
|
-
selectWorkflowType: "\u9009\u62E9\u8981\u5B89\u88C5\u7684\u5DE5\u4F5C\u6D41\u7C7B\u578B",
|
|
307
|
-
workflowOption: {
|
|
308
|
-
featPlanUx: "\u529F\u80FD\u89C4\u5212\u548C UX \u8BBE\u8BA1 (feat + planner + ui-ux-designer)",
|
|
309
|
-
sixStepsWorkflow: "\u516D\u6B65\u5DE5\u4F5C\u6D41 (workflow)",
|
|
310
|
-
bmadWorkflow: "BMAD-Method \u6269\u5C55\u5B89\u88C5\u5668 (\u652F\u6301\u654F\u6377\u5F00\u53D1\u5DE5\u4F5C\u6D41)",
|
|
311
|
-
gitWorkflow: "Git \u6307\u4EE4 (commit + rollback + cleanBranches + worktree)"
|
|
312
|
-
},
|
|
313
|
-
// BMAD workflow
|
|
314
|
-
bmadInitPrompt: "\u2728 \u8BF7\u5728\u9879\u76EE\u4E2D\u8FD0\u884C /bmad-init \u547D\u4EE4\u6765\u521D\u59CB\u5316\u6216\u66F4\u65B0 BMAD-Method \u6269\u5C55",
|
|
315
|
-
bmadInstallSuccess: "\u6210\u529F\u5B89\u88C5 BMAD-Method \u5B89\u88C5\u5668",
|
|
316
|
-
// General workflow installation
|
|
317
|
-
installingWorkflow: "\u6B63\u5728\u5B89\u88C5\u5DE5\u4F5C\u6D41",
|
|
318
|
-
installedCommand: "\u5DF2\u5B89\u88C5\u547D\u4EE4",
|
|
319
|
-
installedAgent: "\u5DF2\u5B89\u88C5\u4EE3\u7406",
|
|
320
|
-
failedToInstallCommand: "\u5B89\u88C5\u547D\u4EE4\u5931\u8D25",
|
|
321
|
-
failedToInstallAgent: "\u5B89\u88C5\u4EE3\u7406\u5931\u8D25",
|
|
322
|
-
workflowInstallSuccess: "\u5DE5\u4F5C\u6D41\u5B89\u88C5\u6210\u529F",
|
|
323
|
-
workflowInstallError: "\u5DE5\u4F5C\u6D41\u5B89\u88C5\u51FA\u9519",
|
|
324
|
-
cleaningOldFiles: "\u6E05\u7406\u65E7\u7248\u672C\u6587\u4EF6",
|
|
325
|
-
removedOldFile: "\u5DF2\u5220\u9664\u65E7\u6587\u4EF6"
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
const cli$1 = {
|
|
329
|
-
runFullInit: "\u76F4\u63A5\u8FD0\u884C\u5B8C\u6574\u521D\u59CB\u5316",
|
|
330
|
-
forceOverwrite: "\u5F3A\u5236\u8986\u76D6\u73B0\u6709\u914D\u7F6E",
|
|
331
|
-
initClaudeConfig: "\u521D\u59CB\u5316 Claude Code \u914D\u7F6E",
|
|
332
|
-
updatePromptsOnly: "\u4EC5\u66F4\u65B0 Claude Code \u63D0\u793A"
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
const bmad$1 = {
|
|
336
|
-
// BMad CLI command
|
|
337
|
-
description: "\u5B89\u88C5 BMad Method \u7528\u4E8E AI \u9A71\u52A8\u7684\u5F00\u53D1",
|
|
338
|
-
directoryOption: "\u5B89\u88C5\u7684\u76EE\u6807\u76EE\u5F55",
|
|
339
|
-
forceOption: "\u5F3A\u5236\u91CD\u65B0\u5B89\u88C5\uFF0C\u5373\u4F7F\u5DF2\u5B58\u5728",
|
|
340
|
-
versionOption: "\u8981\u5B89\u88C5\u7684\u7279\u5B9A BMad \u7248\u672C",
|
|
341
|
-
// Installation messages
|
|
342
|
-
checkingExisting: "\u6B63\u5728\u68C0\u67E5\u73B0\u6709 BMad \u5B89\u88C5...",
|
|
343
|
-
alreadyInstalled: "BMad \u5DF2\u5B89\u88C5\uFF08\u7248\u672C\uFF1A{version}\uFF09",
|
|
344
|
-
existingAction: "\u9009\u62E9\u64CD\u4F5C\uFF1A",
|
|
345
|
-
actionUpdate: "\u66F4\u65B0\u5230\u6700\u65B0\u7248\u672C",
|
|
346
|
-
actionReinstall: "\u91CD\u65B0\u5B89\u88C5",
|
|
347
|
-
actionSkip: "\u8DF3\u8FC7\u5B89\u88C5",
|
|
348
|
-
installationSkipped: "\u5DF2\u8DF3\u8FC7 BMad \u5B89\u88C5",
|
|
349
|
-
installing: "\u6B63\u5728\u5B89\u88C5 BMad Method...",
|
|
350
|
-
installSuccess: "\u2705 BMad Method \u5B89\u88C5\u6210\u529F\uFF01",
|
|
351
|
-
installFailed: "\u274C BMad Method \u5B89\u88C5\u5931\u8D25",
|
|
352
|
-
installError: "\u274C BMad \u5B89\u88C5\u9519\u8BEF",
|
|
353
|
-
nextSteps: "\u4E0B\u4E00\u6B65\uFF1A\u8FDB\u5165 {directory} \u76EE\u5F55\u5F00\u59CB\u4F7F\u7528 BMad",
|
|
354
|
-
// BMad workflow messages
|
|
355
|
-
installingBmadWorkflow: "\u6B63\u5728\u5B89\u88C5 BMAD \u5DE5\u4F5C\u6D41...",
|
|
356
|
-
bmadWorkflowInstalled: "BMAD \u5DE5\u4F5C\u6D41\u5DF2\u5B89\u88C5",
|
|
357
|
-
bmadWorkflowFailed: "\u5B89\u88C5 BMAD \u5DE5\u4F5C\u6D41\u5931\u8D25",
|
|
358
|
-
// BMad agent messages
|
|
359
|
-
installingAgent: "\u6B63\u5728\u5B89\u88C5 {agent} \u4EE3\u7406...",
|
|
360
|
-
agentInstalled: "{agent} \u4EE3\u7406\u5DF2\u5B89\u88C5",
|
|
361
|
-
agentFailed: "\u5B89\u88C5 {agent} \u4EE3\u7406\u5931\u8D25",
|
|
362
|
-
// BMad user prompts
|
|
363
|
-
selectBmadOption: "\u9009\u62E9 BMAD \u9009\u9879",
|
|
364
|
-
confirmInstallBmad: "\u786E\u8BA4\u5B89\u88C5 BMAD \u5DE5\u4F5C\u6D41\uFF1F",
|
|
365
|
-
bmadInstallComplete: "BMAD \u5B89\u88C5\u5B8C\u6210",
|
|
366
|
-
// BMad log messages
|
|
367
|
-
checkingBmadDependencies: "\u68C0\u67E5 BMAD \u4F9D\u8D56...",
|
|
368
|
-
bmadDependenciesMet: "BMAD \u4F9D\u8D56\u6EE1\u8DB3",
|
|
369
|
-
bmadDependenciesMissing: "\u7F3A\u5C11 BMAD \u4F9D\u8D56\uFF1A{deps}",
|
|
370
|
-
// BMad commands
|
|
371
|
-
runningBmadCommand: "\u6267\u884C BMAD \u547D\u4EE4\uFF1A{command}",
|
|
372
|
-
bmadCommandSuccess: "BMAD \u547D\u4EE4\u6267\u884C\u6210\u529F",
|
|
373
|
-
bmadCommandFailed: "BMAD \u547D\u4EE4\u6267\u884C\u5931\u8D25\uFF1A{error}",
|
|
374
|
-
// BMad configuration
|
|
375
|
-
configuringBmad: "\u914D\u7F6E BMAD \u8BBE\u7F6E...",
|
|
376
|
-
bmadConfigured: "BMAD \u5DF2\u914D\u7F6E",
|
|
377
|
-
bmadConfigFailed: "BMAD \u914D\u7F6E\u5931\u8D25"
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
const errors$1 = {
|
|
381
|
-
// General errors
|
|
382
|
-
failedToSetOnboarding: "\u8BBE\u7F6E\u5165\u95E8\u5B8C\u6210\u6807\u5FD7\u5931\u8D25\uFF1A",
|
|
383
|
-
failedToWriteMcpConfig: "\u5199\u5165 MCP \u914D\u7F6E\u5931\u8D25\uFF1A",
|
|
384
|
-
templateDirNotFound: "\u6A21\u677F\u76EE\u5F55\u672A\u627E\u5230\uFF1A",
|
|
385
|
-
failedToReadTemplateSettings: "\u8BFB\u53D6\u6A21\u677F settings.json \u5931\u8D25\uFF1A",
|
|
386
|
-
failedToMergeSettings: "\u5408\u5E76 settings.json \u5931\u8D25\uFF1A",
|
|
387
|
-
preservingExistingSettings: "\u7531\u4E8E\u5408\u5E76\u9519\u8BEF\uFF0C\u4FDD\u7559\u73B0\u6709\u7684 settings.json",
|
|
388
|
-
// File system errors
|
|
389
|
-
failedToReadFile: "\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
390
|
-
failedToWriteFile: "\u5199\u5165\u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
391
|
-
failedToCopyFile: "\u590D\u5236\u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
392
|
-
failedToRemoveFile: "\u5220\u9664\u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
393
|
-
failedToReadDirectory: "\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25\uFF1A",
|
|
394
|
-
failedToGetStats: "\u83B7\u53D6\u6587\u4EF6\u72B6\u6001\u5931\u8D25\uFF1A",
|
|
395
|
-
sourceDirNotExist: "\u6E90\u76EE\u5F55\u4E0D\u5B58\u5728\uFF1A",
|
|
396
|
-
memoryDirNotFound: "\u8BB0\u5FC6\u76EE\u5F55\u672A\u627E\u5230\uFF1A",
|
|
397
|
-
// JSON config errors
|
|
398
|
-
invalidConfiguration: "\u914D\u7F6E\u65E0\u6548\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C",
|
|
399
|
-
failedToParseJson: "\u89E3\u6790 JSON \u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
400
|
-
failedToBackupConfig: "\u5907\u4EFD\u914D\u7F6E\u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
401
|
-
invalidEnvConfig: "\u65E0\u6548\u7684 env \u914D\u7F6E\uFF1A\u671F\u671B\u5BF9\u8C61",
|
|
402
|
-
invalidApiUrl: "\u65E0\u6548\u7684 ANTHROPIC_BASE_URL\uFF1A\u671F\u671B\u5B57\u7B26\u4E32",
|
|
403
|
-
invalidApiKey: "\u65E0\u6548\u7684 ANTHROPIC_API_KEY\uFF1A\u671F\u671B\u5B57\u7B26\u4E32",
|
|
404
|
-
invalidAuthToken: "\u65E0\u6548\u7684 ANTHROPIC_AUTH_TOKEN\uFF1A\u671F\u671B\u5B57\u7B26\u4E32",
|
|
405
|
-
invalidPermissionsConfig: "\u65E0\u6548\u7684\u6743\u9650\u914D\u7F6E\uFF1A\u671F\u671B\u5BF9\u8C61",
|
|
406
|
-
invalidPermissionsAllow: "\u65E0\u6548\u7684 permissions.allow\uFF1A\u671F\u671B\u6570\u7EC4",
|
|
407
|
-
// MCP errors
|
|
408
|
-
failedToAddOnboardingFlag: "\u6DFB\u52A0 hasCompletedOnboarding \u6807\u5FD7\u5931\u8D25\uFF1A",
|
|
409
|
-
// AI personality errors
|
|
410
|
-
failedToApplyPersonality: "\u5E94\u7528\u4E2A\u6027\u6307\u4EE4\u5931\u8D25\uFF1A"
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
const tools$1 = {
|
|
414
|
-
// CCUsage
|
|
415
|
-
runningCcusage: "\u6B63\u5728\u8FD0\u884C Claude Code \u7528\u91CF\u5206\u6790\u5DE5\u5177...",
|
|
416
|
-
ccusageDescription: "\u5206\u6790\u4EE4\u724C\u4F7F\u7528\u91CF\u548C\u6210\u672C - https://github.com/ryoppippi/ccusage",
|
|
417
|
-
selectAnalysisMode: "\u9009\u62E9\u5206\u6790\u6A21\u5F0F:",
|
|
418
|
-
ccusageModes: {
|
|
419
|
-
daily: "\u6BCF\u65E5\u4F7F\u7528\u91CF",
|
|
420
|
-
monthly: "\u6BCF\u6708\u4F7F\u7528\u91CF",
|
|
421
|
-
session: "\u4F1A\u8BDD\u7EDF\u8BA1",
|
|
422
|
-
blocks: "\u533A\u5757\u7EDF\u8BA1",
|
|
423
|
-
custom: "\u81EA\u5B9A\u4E49\u53C2\u6570"
|
|
424
|
-
},
|
|
425
|
-
enterCustomArgs: "\u8F93\u5165\u81EA\u5B9A\u4E49\u53C2\u6570 (\u4F8B\u5982: daily --json):",
|
|
426
|
-
pressEnterToContinue: "\u6309 Enter \u952E\u7EE7\u7EED...",
|
|
427
|
-
ccusageFailed: "\u8FD0\u884C ccusage \u5931\u8D25",
|
|
428
|
-
checkNetworkConnection: "\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5",
|
|
429
|
-
errorDetails: "\u9519\u8BEF\u8BE6\u60C5:"
|
|
138
|
+
const bmad$1 = {
|
|
139
|
+
// BMad CLI command
|
|
140
|
+
description: "Install BMad Method for AI-driven development",
|
|
141
|
+
directoryOption: "Target directory for installation",
|
|
142
|
+
forceOption: "Force reinstall even if already exists",
|
|
143
|
+
versionOption: "Specific BMad version to install",
|
|
144
|
+
// Installation messages
|
|
145
|
+
checkingExisting: "Checking for existing BMad installation...",
|
|
146
|
+
alreadyInstalled: "BMad is already installed (version: {version})",
|
|
147
|
+
existingAction: "Choose an action:",
|
|
148
|
+
actionUpdate: "Update to latest version",
|
|
149
|
+
actionReinstall: "Reinstall",
|
|
150
|
+
actionSkip: "Skip installation",
|
|
151
|
+
installationSkipped: "BMad installation skipped",
|
|
152
|
+
installing: "Installing BMad Method...",
|
|
153
|
+
installSuccess: "\u2705 BMad Method installed successfully!",
|
|
154
|
+
installFailed: "\u274C BMad Method installation failed",
|
|
155
|
+
installError: "\u274C BMad installation error",
|
|
156
|
+
nextSteps: "Next steps: Navigate to {directory} to start using BMad",
|
|
157
|
+
// BMad workflow messages
|
|
158
|
+
installingBmadWorkflow: "Installing BMAD workflow...",
|
|
159
|
+
bmadWorkflowInstalled: "BMAD workflow installed",
|
|
160
|
+
bmadWorkflowFailed: "Failed to install BMAD workflow",
|
|
161
|
+
// BMad agent messages
|
|
162
|
+
installingAgent: "Installing {agent} agent...",
|
|
163
|
+
agentInstalled: "{agent} agent installed",
|
|
164
|
+
agentFailed: "Failed to install {agent} agent",
|
|
165
|
+
// BMad user prompts
|
|
166
|
+
selectBmadOption: "Select BMAD option",
|
|
167
|
+
confirmInstallBmad: "Confirm install BMAD workflow?",
|
|
168
|
+
bmadInstallComplete: "BMAD installation complete",
|
|
169
|
+
// BMad log messages
|
|
170
|
+
checkingBmadDependencies: "Checking BMAD dependencies...",
|
|
171
|
+
bmadDependenciesMet: "BMAD dependencies met",
|
|
172
|
+
bmadDependenciesMissing: "Missing BMAD dependencies: {deps}",
|
|
173
|
+
// BMad commands
|
|
174
|
+
runningBmadCommand: "Running BMAD command: {command}",
|
|
175
|
+
bmadCommandSuccess: "BMAD command executed successfully",
|
|
176
|
+
bmadCommandFailed: "BMAD command failed: {error}",
|
|
177
|
+
// BMad configuration
|
|
178
|
+
configuringBmad: "Configuring BMAD settings...",
|
|
179
|
+
bmadConfigured: "BMAD configured",
|
|
180
|
+
bmadConfigFailed: "BMAD configuration failed"
|
|
430
181
|
};
|
|
431
182
|
|
|
432
183
|
const ccrMessages$1 = {
|
|
433
184
|
// Installation
|
|
434
|
-
installingCcr: "
|
|
435
|
-
ccrInstallSuccess: "Claude Code Router
|
|
436
|
-
ccrInstallFailed: "
|
|
437
|
-
ccrAlreadyInstalled: "Claude Code Router
|
|
438
|
-
detectedIncorrectPackage: "
|
|
439
|
-
uninstalledIncorrectPackage: "
|
|
440
|
-
failedToUninstallIncorrectPackage: "
|
|
185
|
+
installingCcr: "Installing Claude Code Router...",
|
|
186
|
+
ccrInstallSuccess: "Claude Code Router installed successfully",
|
|
187
|
+
ccrInstallFailed: "Failed to install Claude Code Router",
|
|
188
|
+
ccrAlreadyInstalled: "Claude Code Router is already installed",
|
|
189
|
+
detectedIncorrectPackage: "Detected incorrect package claude-code-router, uninstalling...",
|
|
190
|
+
uninstalledIncorrectPackage: "Successfully uninstalled incorrect package",
|
|
191
|
+
failedToUninstallIncorrectPackage: "Failed to uninstall incorrect package, continuing with installation",
|
|
441
192
|
// Configuration
|
|
442
|
-
configureCcr: "
|
|
443
|
-
useCcrProxy: "
|
|
444
|
-
ccrProxyDesc: "
|
|
445
|
-
fetchingPresets: "
|
|
446
|
-
noPresetsAvailable: "
|
|
447
|
-
selectCcrPreset: "
|
|
448
|
-
keyRequired: "API
|
|
193
|
+
configureCcr: "Configure Model Proxy (CCR)",
|
|
194
|
+
useCcrProxy: "Use CCR Proxy",
|
|
195
|
+
ccrProxyDesc: "Connect to multiple AI models via Claude Code Router",
|
|
196
|
+
fetchingPresets: "Fetching provider presets...",
|
|
197
|
+
noPresetsAvailable: "No presets available",
|
|
198
|
+
selectCcrPreset: "Select a provider preset:",
|
|
199
|
+
keyRequired: "API key is required",
|
|
449
200
|
// Existing config
|
|
450
|
-
existingCcrConfig: "
|
|
451
|
-
overwriteCcrConfig: "
|
|
452
|
-
keepingExistingConfig: "
|
|
453
|
-
backupCcrConfig: "
|
|
454
|
-
ccrBackupSuccess: "CCR
|
|
455
|
-
ccrBackupFailed: "
|
|
201
|
+
existingCcrConfig: "Existing CCR configuration found",
|
|
202
|
+
overwriteCcrConfig: "Backup existing CCR configuration and reconfigure?",
|
|
203
|
+
keepingExistingConfig: "Keeping existing configuration",
|
|
204
|
+
backupCcrConfig: "Backing up existing CCR configuration...",
|
|
205
|
+
ccrBackupSuccess: "CCR configuration backed up to: {path}",
|
|
206
|
+
ccrBackupFailed: "Failed to backup CCR configuration",
|
|
456
207
|
// Model selection
|
|
457
|
-
selectDefaultModelForProvider: "
|
|
458
|
-
enterApiKeyForProvider: "
|
|
208
|
+
selectDefaultModelForProvider: "Select default model for {provider}:",
|
|
209
|
+
enterApiKeyForProvider: "Enter API key for {provider}:",
|
|
459
210
|
// Skip option
|
|
460
|
-
skipOption: "
|
|
461
|
-
skipConfiguring: "
|
|
211
|
+
skipOption: "Skip, configure in CCR manually",
|
|
212
|
+
skipConfiguring: "Skipping preset configuration, will create empty configuration framework",
|
|
462
213
|
// Success/Error messages
|
|
463
|
-
ccrConfigSuccess: "CCR
|
|
464
|
-
proxyConfigSuccess: "
|
|
465
|
-
ccrConfigFailed: "
|
|
466
|
-
ccrSetupComplete: "CCR
|
|
467
|
-
fetchPresetsError: "
|
|
468
|
-
failedToStartCcrService: "
|
|
469
|
-
errorStartingCcrService: "
|
|
214
|
+
ccrConfigSuccess: "CCR configuration saved",
|
|
215
|
+
proxyConfigSuccess: "Proxy settings configured",
|
|
216
|
+
ccrConfigFailed: "Failed to configure CCR",
|
|
217
|
+
ccrSetupComplete: "CCR setup complete",
|
|
218
|
+
fetchPresetsError: "Failed to fetch provider presets",
|
|
219
|
+
failedToStartCcrService: "Failed to start CCR service",
|
|
220
|
+
errorStartingCcrService: "Error starting CCR service",
|
|
470
221
|
// CCR service status
|
|
471
|
-
ccrRestartSuccess: "CCR
|
|
472
|
-
ccrRestartFailed: "CCR
|
|
222
|
+
ccrRestartSuccess: "CCR service restarted",
|
|
223
|
+
ccrRestartFailed: "Failed to restart CCR service",
|
|
473
224
|
// Configuration tips
|
|
474
|
-
configTips: "
|
|
475
|
-
useClaudeCommand: "
|
|
476
|
-
advancedConfigTip: "
|
|
477
|
-
manualConfigTip: "
|
|
225
|
+
configTips: "Configuration Tips",
|
|
226
|
+
useClaudeCommand: "Use the claude command to start Claude Code (not ccr code)",
|
|
227
|
+
advancedConfigTip: "You can use the ccr ui command for advanced configuration",
|
|
228
|
+
manualConfigTip: "After manually modifying the configuration file, run ccr restart to apply changes",
|
|
478
229
|
// CCR Menu
|
|
479
|
-
ccrMenuTitle: "CCR - Claude Code Router
|
|
230
|
+
ccrMenuTitle: "CCR - Claude Code Router Management",
|
|
480
231
|
ccrMenuOptions: {
|
|
481
|
-
initCcr: "
|
|
482
|
-
startUi: "
|
|
483
|
-
checkStatus: "
|
|
484
|
-
restart: "
|
|
485
|
-
start: "
|
|
486
|
-
stop: "
|
|
487
|
-
back: "
|
|
488
|
-
},
|
|
489
|
-
ccrMenuDescriptions: {
|
|
490
|
-
initCcr: "
|
|
491
|
-
startUi: "
|
|
492
|
-
checkStatus: "
|
|
493
|
-
restart: "
|
|
494
|
-
start: "
|
|
495
|
-
stop: "
|
|
232
|
+
initCcr: "Initialize CCR",
|
|
233
|
+
startUi: "Start CCR UI",
|
|
234
|
+
checkStatus: "Check CCR Status",
|
|
235
|
+
restart: "Restart CCR",
|
|
236
|
+
start: "Start CCR",
|
|
237
|
+
stop: "Stop CCR",
|
|
238
|
+
back: "Back to Main Menu"
|
|
239
|
+
},
|
|
240
|
+
ccrMenuDescriptions: {
|
|
241
|
+
initCcr: "Install and configure CCR",
|
|
242
|
+
startUi: "Open web interface to manage CCR",
|
|
243
|
+
checkStatus: "View CCR service status",
|
|
244
|
+
restart: "Restart CCR service",
|
|
245
|
+
start: "Start CCR service",
|
|
246
|
+
stop: "Stop CCR service"
|
|
496
247
|
},
|
|
497
248
|
// Command execution messages
|
|
498
|
-
startingCcrUi: "
|
|
499
|
-
ccrUiStarted: "CCR UI
|
|
500
|
-
checkingCcrStatus: "
|
|
501
|
-
ccrStatusTitle: "CCR
|
|
502
|
-
restartingCcr: "
|
|
503
|
-
ccrRestarted: "CCR
|
|
504
|
-
startingCcr: "
|
|
505
|
-
ccrStarted: "CCR
|
|
506
|
-
stoppingCcr: "
|
|
507
|
-
ccrStopped: "CCR
|
|
508
|
-
ccrCommandFailed: "
|
|
249
|
+
startingCcrUi: "Starting CCR UI...",
|
|
250
|
+
ccrUiStarted: "CCR UI started",
|
|
251
|
+
checkingCcrStatus: "Checking CCR status...",
|
|
252
|
+
ccrStatusTitle: "CCR Status:",
|
|
253
|
+
restartingCcr: "Restarting CCR...",
|
|
254
|
+
ccrRestarted: "CCR restarted",
|
|
255
|
+
startingCcr: "Starting CCR...",
|
|
256
|
+
ccrStarted: "CCR started",
|
|
257
|
+
stoppingCcr: "Stopping CCR...",
|
|
258
|
+
ccrStopped: "CCR stopped",
|
|
259
|
+
ccrCommandFailed: "Failed to execute CCR command",
|
|
509
260
|
// Configuration check messages
|
|
510
|
-
ccrNotConfigured: "CCR
|
|
511
|
-
pleaseInitFirst: "
|
|
261
|
+
ccrNotConfigured: "CCR is not configured yet. Please initialize CCR first.",
|
|
262
|
+
pleaseInitFirst: "Please select option 1 to initialize CCR.",
|
|
512
263
|
// UI API Key messages
|
|
513
|
-
ccrUiApiKey: "CCR UI
|
|
514
|
-
ccrUiApiKeyHint: "
|
|
264
|
+
ccrUiApiKey: "CCR UI API Key",
|
|
265
|
+
ccrUiApiKeyHint: "Use this API key to login to CCR UI"
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
const cli$1 = {
|
|
269
|
+
runFullInit: "Run full initialization directly",
|
|
270
|
+
forceOverwrite: "Force overwrite existing configuration",
|
|
271
|
+
initClaudeConfig: "Initialize Claude Code configuration",
|
|
272
|
+
updatePromptsOnly: "Update Claude Code prompts only"
|
|
515
273
|
};
|
|
516
274
|
|
|
517
275
|
const cometixMessages$1 = {
|
|
518
276
|
// Installation
|
|
519
|
-
installingCometix: "
|
|
520
|
-
cometixInstallSuccess: "CCometixLine
|
|
521
|
-
cometixInstallFailed: "
|
|
522
|
-
cometixAlreadyInstalled: "CCometixLine
|
|
523
|
-
statusLineConfigured: "Claude Code
|
|
524
|
-
statusLineConfigFailed: "
|
|
525
|
-
statusLineManualConfig: "
|
|
526
|
-
statusLineAlreadyConfigured: "Claude Code
|
|
277
|
+
installingCometix: "Installing CCometixLine...",
|
|
278
|
+
cometixInstallSuccess: "CCometixLine installed successfully",
|
|
279
|
+
cometixInstallFailed: "Failed to install CCometixLine",
|
|
280
|
+
cometixAlreadyInstalled: "CCometixLine is already installed",
|
|
281
|
+
statusLineConfigured: "Claude Code statusLine configured",
|
|
282
|
+
statusLineConfigFailed: "Failed to configure statusLine",
|
|
283
|
+
statusLineManualConfig: "Please manually add statusLine configuration to Claude Code settings",
|
|
284
|
+
statusLineAlreadyConfigured: "Claude Code statusLine already configured",
|
|
527
285
|
// Installation prompt in init
|
|
528
|
-
installCometixPrompt: "
|
|
529
|
-
cometixSkipped: "CCometixLine
|
|
286
|
+
installCometixPrompt: "Install CCometixLine - High-performance Claude Code statusline tool with Git integration and real-time usage tracking?",
|
|
287
|
+
cometixSkipped: "CCometixLine installation skipped",
|
|
530
288
|
// Commands
|
|
531
|
-
installingOrUpdating: "
|
|
532
|
-
installUpdateSuccess: "CCometixLine
|
|
533
|
-
installUpdateFailed: "
|
|
534
|
-
printingConfig: "
|
|
535
|
-
printConfigSuccess: "
|
|
536
|
-
printConfigFailed: "
|
|
537
|
-
enteringTuiConfig: "
|
|
538
|
-
tuiConfigSuccess: "TUI
|
|
539
|
-
tuiConfigFailed: "
|
|
540
|
-
commandNotFound: "ccline
|
|
289
|
+
installingOrUpdating: "Installing/updating CCometixLine...",
|
|
290
|
+
installUpdateSuccess: "CCometixLine install/update completed",
|
|
291
|
+
installUpdateFailed: "Failed to install/update CCometixLine",
|
|
292
|
+
printingConfig: "Printing CCometixLine configuration...",
|
|
293
|
+
printConfigSuccess: "Configuration printed successfully",
|
|
294
|
+
printConfigFailed: "Failed to print configuration",
|
|
295
|
+
enteringTuiConfig: "Entering CCometixLine TUI configuration mode...",
|
|
296
|
+
tuiConfigSuccess: "TUI configuration completed successfully",
|
|
297
|
+
tuiConfigFailed: "Failed to run TUI configuration",
|
|
298
|
+
commandNotFound: "ccline command not found. Please install CCometixLine first.",
|
|
541
299
|
// CCometixLine Menu
|
|
542
|
-
cometixMenuTitle: "CCometixLine -
|
|
300
|
+
cometixMenuTitle: "CCometixLine - High-performance Claude Code statusline tool with Git integration and real-time usage tracking",
|
|
543
301
|
cometixMenuOptions: {
|
|
544
|
-
installOrUpdate: "
|
|
545
|
-
printConfig: "
|
|
546
|
-
customConfig: "
|
|
547
|
-
back: "
|
|
302
|
+
installOrUpdate: "Install or Update",
|
|
303
|
+
printConfig: "Print Default Configuration",
|
|
304
|
+
customConfig: "Custom Config",
|
|
305
|
+
back: "Back to Main Menu"
|
|
548
306
|
},
|
|
549
307
|
cometixMenuDescriptions: {
|
|
550
|
-
installOrUpdate: "
|
|
551
|
-
printConfig: "
|
|
552
|
-
customConfig: "
|
|
308
|
+
installOrUpdate: "Install or update CCometixLine using npm",
|
|
309
|
+
printConfig: "Display current CCometixLine configuration",
|
|
310
|
+
customConfig: "Enter TUI configuration mode for CCometixLine"
|
|
553
311
|
}
|
|
554
312
|
};
|
|
555
313
|
|
|
556
|
-
const
|
|
557
|
-
checkingVersion: "\u6B63\u5728\u68C0\u67E5\u7248\u672C...",
|
|
558
|
-
checkingTools: "\u68C0\u67E5\u5DE5\u5177\u7248\u672C",
|
|
559
|
-
ccrNotInstalled: "CCR \u672A\u5B89\u88C5",
|
|
560
|
-
ccrUpToDate: "CCR \u5DF2\u662F\u6700\u65B0\u7248\u672C (v{version})",
|
|
561
|
-
claudeCodeNotInstalled: "Claude Code \u672A\u5B89\u88C5",
|
|
562
|
-
claudeCodeUpToDate: "Claude Code \u5DF2\u662F\u6700\u65B0\u7248\u672C (v{version})",
|
|
563
|
-
cometixLineNotInstalled: "CCometixLine \u672A\u5B89\u88C5",
|
|
564
|
-
cometixLineUpToDate: "CCometixLine \u5DF2\u662F\u6700\u65B0\u7248\u672C (v{version})",
|
|
565
|
-
cannotCheckVersion: "\u65E0\u6CD5\u68C0\u67E5\u6700\u65B0\u7248\u672C",
|
|
566
|
-
currentVersion: "\u5F53\u524D\u7248\u672C: v{version}",
|
|
567
|
-
latestVersion: "\u6700\u65B0\u7248\u672C: v{version}",
|
|
568
|
-
confirmUpdate: "\u662F\u5426\u66F4\u65B0 {tool} \u5230\u6700\u65B0\u7248\u672C\uFF1F",
|
|
569
|
-
updateSkipped: "\u5DF2\u8DF3\u8FC7\u66F4\u65B0",
|
|
570
|
-
updating: "\u6B63\u5728\u66F4\u65B0 {tool}...",
|
|
571
|
-
updateSuccess: "{tool} \u66F4\u65B0\u6210\u529F\uFF01",
|
|
572
|
-
updateFailed: "{tool} \u66F4\u65B0\u5931\u8D25",
|
|
573
|
-
checkFailed: "\u7248\u672C\u68C0\u67E5\u5931\u8D25"
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
const zhCN = {
|
|
577
|
-
common: common$1,
|
|
578
|
-
language: language$1,
|
|
579
|
-
installation: installation$1,
|
|
580
|
-
api: api$1,
|
|
581
|
-
configuration: configuration$1,
|
|
582
|
-
mcp: mcp$1,
|
|
583
|
-
menu: menu$1,
|
|
584
|
-
workflow: workflow$1,
|
|
585
|
-
cli: cli$1,
|
|
586
|
-
bmad: bmad$1,
|
|
587
|
-
errors: errors$1,
|
|
588
|
-
tools: tools$1,
|
|
589
|
-
ccr: ccrMessages$1,
|
|
590
|
-
cometix: cometixMessages$1,
|
|
591
|
-
updater: updater$1
|
|
592
|
-
};
|
|
593
|
-
|
|
594
|
-
const common = {
|
|
314
|
+
const common$1 = {
|
|
595
315
|
// Basic
|
|
596
316
|
multiSelectHint: " (Space to select, a to select all, i to invert, Enter to confirm)",
|
|
597
317
|
yes: "Yes",
|
|
@@ -610,84 +330,7 @@ const common = {
|
|
|
610
330
|
back: "Back"
|
|
611
331
|
};
|
|
612
332
|
|
|
613
|
-
const
|
|
614
|
-
selectScriptLang: "Select ZCF display language",
|
|
615
|
-
selectConfigLang: "Select Claude Code configuration language",
|
|
616
|
-
selectAiOutputLang: "Select AI output language",
|
|
617
|
-
aiOutputLangHint: "AI will respond to you in this language",
|
|
618
|
-
enterCustomLanguage: "Enter custom language (e.g., Japanese, French, etc.)",
|
|
619
|
-
languageChanged: "Language changed",
|
|
620
|
-
configLangHint: {
|
|
621
|
-
"zh-CN": "easier for Chinese users to customize",
|
|
622
|
-
en: "recommended, lower token consumption"
|
|
623
|
-
},
|
|
624
|
-
updateConfigLangPrompt: "Select configuration language",
|
|
625
|
-
updateConfigLangChoice: {
|
|
626
|
-
"zh-CN": "Chinese configuration",
|
|
627
|
-
en: "English configuration"
|
|
628
|
-
}
|
|
629
|
-
};
|
|
630
|
-
|
|
631
|
-
const installation = {
|
|
632
|
-
installPrompt: "Claude Code not found. Install automatically?",
|
|
633
|
-
installing: "Installing Claude Code...",
|
|
634
|
-
installSuccess: "Claude Code installed successfully",
|
|
635
|
-
alreadyInstalled: "Claude Code is already installed",
|
|
636
|
-
installFailed: "Failed to install Claude Code",
|
|
637
|
-
npmNotFound: "npm is not installed. Please install Node.js and npm first.",
|
|
638
|
-
// Termux specific
|
|
639
|
-
termuxDetected: "Termux environment detected",
|
|
640
|
-
termuxInstallHint: "In Termux, please run first: pkg install nodejs or pkg install nodejs-lts",
|
|
641
|
-
termuxPathInfo: "Using Termux path: {path}",
|
|
642
|
-
termuxEnvironmentInfo: "Termux environment provides Node.js and npm through pkg manager",
|
|
643
|
-
// Windows specific
|
|
644
|
-
windowsDetected: "Windows detected, will configure compatible format"
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
const api = {
|
|
648
|
-
// Basic API configuration
|
|
649
|
-
configureApi: "Select API authentication method",
|
|
650
|
-
useAuthToken: "Use Auth Token (OAuth authentication)",
|
|
651
|
-
authTokenDesc: "For tokens obtained via OAuth or browser login",
|
|
652
|
-
useApiKey: "Use API Key (Key authentication)",
|
|
653
|
-
apiKeyDesc: "For API keys from Anthropic Console",
|
|
654
|
-
useCcrProxy: "Use CCR Proxy",
|
|
655
|
-
ccrProxyDesc: "Use multiple AI models via Claude Code Router",
|
|
656
|
-
skipApi: "Skip (configure manually later)",
|
|
657
|
-
enterApiUrl: "Enter API URL",
|
|
658
|
-
enterAuthToken: "Enter Auth Token",
|
|
659
|
-
enterApiKey: "Enter API Key",
|
|
660
|
-
apiConfigSuccess: "API configured",
|
|
661
|
-
// API modification
|
|
662
|
-
existingApiConfig: "Existing API configuration detected:",
|
|
663
|
-
apiConfigUrl: "URL",
|
|
664
|
-
apiConfigKey: "Key",
|
|
665
|
-
apiConfigAuthType: "Auth Type",
|
|
666
|
-
selectApiAction: "Select API processing operation",
|
|
667
|
-
keepExistingConfig: "Keep existing configuration",
|
|
668
|
-
modifyAllConfig: "Modify all configuration",
|
|
669
|
-
modifyPartialConfig: "Modify partial configuration",
|
|
670
|
-
selectModifyItems: "Select items to modify",
|
|
671
|
-
modifyApiUrl: "Modify API URL",
|
|
672
|
-
modifyApiKey: "Modify API Key",
|
|
673
|
-
modifyAuthType: "Modify auth type",
|
|
674
|
-
continueModification: "Continue modifying other configurations?",
|
|
675
|
-
modificationSaved: "Configuration saved",
|
|
676
|
-
enterNewApiUrl: "Enter new API URL (current: {url})",
|
|
677
|
-
enterNewApiKey: "Enter new API Key (current: {key})",
|
|
678
|
-
selectNewAuthType: "Select new auth type (current: {type})",
|
|
679
|
-
// API validation
|
|
680
|
-
apiKeyValidation: {
|
|
681
|
-
empty: "API Key cannot be empty",
|
|
682
|
-
example: "Example format: sk-abcdef123456_789xyz"
|
|
683
|
-
},
|
|
684
|
-
urlRequired: "URL is required",
|
|
685
|
-
invalidUrl: "Invalid URL",
|
|
686
|
-
keyRequired: "Key is required",
|
|
687
|
-
invalidKeyFormat: "Invalid key format"
|
|
688
|
-
};
|
|
689
|
-
|
|
690
|
-
const configuration = {
|
|
333
|
+
const configuration$1 = {
|
|
691
334
|
existingConfig: "Existing config detected. How to proceed?",
|
|
692
335
|
backupAndOverwrite: "Backup and overwrite all",
|
|
693
336
|
updateDocsOnly: "Update workflow-related md files only with backup",
|
|
@@ -712,12 +355,13 @@ const configuration = {
|
|
|
712
355
|
selectMemoryOption: "Select configuration option",
|
|
713
356
|
configureAiLanguage: "Configure AI output language",
|
|
714
357
|
configureAiPersonality: "Configure AI personality",
|
|
358
|
+
configureOutputStyle: "Configure global AI output style",
|
|
715
359
|
aiLanguageConfigured: "AI output language configured",
|
|
716
360
|
existingLanguageConfig: "Existing AI output language configuration detected",
|
|
717
361
|
currentLanguage: "Current language",
|
|
718
362
|
modifyLanguage: "Modify AI output language?",
|
|
719
363
|
keepLanguage: "Keeping existing language configuration",
|
|
720
|
-
// AI personality
|
|
364
|
+
// AI personality (deprecated - replaced by output styles)
|
|
721
365
|
selectAiPersonality: "Select AI personality",
|
|
722
366
|
customPersonalityHint: "Define your own personality",
|
|
723
367
|
enterCustomPersonality: "Enter custom personality description",
|
|
@@ -728,6 +372,43 @@ const configuration = {
|
|
|
728
372
|
keepPersonality: "Keeping existing personality",
|
|
729
373
|
directiveCannotBeEmpty: "Directive cannot be empty",
|
|
730
374
|
languageRequired: "Language is required",
|
|
375
|
+
// Output styles
|
|
376
|
+
selectOutputStyles: "Select output styles to install",
|
|
377
|
+
selectDefaultOutputStyle: "Select global default output style",
|
|
378
|
+
outputStyleInstalled: "Output styles installed successfully",
|
|
379
|
+
selectedStyles: "Selected styles",
|
|
380
|
+
defaultStyle: "Default style",
|
|
381
|
+
selectAtLeastOne: "Please select at least one output style",
|
|
382
|
+
legacyFilesDetected: "Legacy personality configuration files detected",
|
|
383
|
+
cleanupLegacyFiles: "Clean up legacy configuration files?",
|
|
384
|
+
legacyFilesRemoved: "Legacy configuration files removed",
|
|
385
|
+
// Output style names and descriptions
|
|
386
|
+
outputStyles: {
|
|
387
|
+
"engineer-professional": {
|
|
388
|
+
name: "Engineer Professional",
|
|
389
|
+
description: "Professional software engineer following SOLID, KISS, DRY, YAGNI principles"
|
|
390
|
+
},
|
|
391
|
+
"nekomata-engineer": {
|
|
392
|
+
name: "Nekomata Engineer",
|
|
393
|
+
description: "Professional catgirl engineer Nova, combining rigorous engineering with cute catgirl traits"
|
|
394
|
+
},
|
|
395
|
+
"laowang-engineer": {
|
|
396
|
+
name: "Laowang Grumpy Tech",
|
|
397
|
+
description: "Laowang grumpy tech style, never tolerates code errors and non-standard code"
|
|
398
|
+
},
|
|
399
|
+
"default": {
|
|
400
|
+
name: "Default",
|
|
401
|
+
description: "Claude completes coding tasks efficiently and provides concise responses (Claude Code built-in)"
|
|
402
|
+
},
|
|
403
|
+
"explanatory": {
|
|
404
|
+
name: "Explanatory",
|
|
405
|
+
description: "Claude explains its implementation choices and codebase patterns (Claude Code built-in)"
|
|
406
|
+
},
|
|
407
|
+
"learning": {
|
|
408
|
+
name: "Learning",
|
|
409
|
+
description: "Learn-by-doing mode where Claude pauses and asks you to write small pieces of code for hands-on practice (Claude Code built-in)"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
731
412
|
// Cache
|
|
732
413
|
confirmClearCache: "Confirm clear all ZCF preference cache?",
|
|
733
414
|
cacheCleared: "ZCF cache cleared",
|
|
@@ -755,24 +436,91 @@ const configuration = {
|
|
|
755
436
|
fixWindowsMcp: "Fix Windows MCP configuration?"
|
|
756
437
|
};
|
|
757
438
|
|
|
758
|
-
const
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
439
|
+
const errors$1 = {
|
|
440
|
+
// General errors
|
|
441
|
+
failedToSetOnboarding: "Failed to set onboarding completion flag:",
|
|
442
|
+
failedToWriteMcpConfig: "Failed to write MCP config:",
|
|
443
|
+
templateDirNotFound: "Template directory not found:",
|
|
444
|
+
failedToReadTemplateSettings: "Failed to read template settings.json:",
|
|
445
|
+
failedToMergeSettings: "Failed to merge settings.json:",
|
|
446
|
+
preservingExistingSettings: "Preserving existing settings.json due to merge error",
|
|
447
|
+
// File system errors
|
|
448
|
+
failedToReadFile: "Failed to read file:",
|
|
449
|
+
failedToWriteFile: "Failed to write file:",
|
|
450
|
+
failedToCopyFile: "Failed to copy file:",
|
|
451
|
+
failedToRemoveFile: "Failed to remove file:",
|
|
452
|
+
failedToReadDirectory: "Failed to read directory:",
|
|
453
|
+
failedToGetStats: "Failed to get stats for:",
|
|
454
|
+
sourceDirNotExist: "Source directory does not exist:",
|
|
455
|
+
memoryDirNotFound: "Memory directory not found:",
|
|
456
|
+
// JSON config errors
|
|
457
|
+
invalidConfiguration: "Invalid configuration, using default value",
|
|
458
|
+
failedToParseJson: "Failed to parse JSON file:",
|
|
459
|
+
failedToBackupConfig: "Failed to backup config file:",
|
|
460
|
+
invalidEnvConfig: "Invalid env configuration: expected object",
|
|
461
|
+
invalidApiUrl: "Invalid ANTHROPIC_BASE_URL: expected string",
|
|
462
|
+
invalidApiKey: "Invalid ANTHROPIC_API_KEY: expected string",
|
|
463
|
+
invalidAuthToken: "Invalid ANTHROPIC_AUTH_TOKEN: expected string",
|
|
464
|
+
invalidPermissionsConfig: "Invalid permissions configuration: expected object",
|
|
465
|
+
invalidPermissionsAllow: "Invalid permissions.allow: expected array",
|
|
466
|
+
// MCP errors
|
|
467
|
+
failedToAddOnboardingFlag: "Failed to add hasCompletedOnboarding flag:",
|
|
468
|
+
// AI personality errors
|
|
469
|
+
failedToApplyPersonality: "Failed to apply personality directive:"
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
const installation$1 = {
|
|
473
|
+
installPrompt: "Claude Code not found. Install automatically?",
|
|
474
|
+
installing: "Installing Claude Code...",
|
|
475
|
+
installSuccess: "Claude Code installed successfully",
|
|
476
|
+
alreadyInstalled: "Claude Code is already installed",
|
|
477
|
+
installFailed: "Failed to install Claude Code",
|
|
478
|
+
npmNotFound: "npm is not installed. Please install Node.js and npm first.",
|
|
479
|
+
// Termux specific
|
|
480
|
+
termuxDetected: "Termux environment detected",
|
|
481
|
+
termuxInstallHint: "In Termux, please run first: pkg install nodejs or pkg install nodejs-lts",
|
|
482
|
+
termuxPathInfo: "Using Termux path: {path}",
|
|
483
|
+
termuxEnvironmentInfo: "Termux environment provides Node.js and npm through pkg manager",
|
|
484
|
+
// Windows specific
|
|
485
|
+
windowsDetected: "Windows detected, will configure compatible format"
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
const language$1 = {
|
|
489
|
+
selectScriptLang: "Select ZCF display language",
|
|
490
|
+
selectConfigLang: "Select Claude Code configuration language",
|
|
491
|
+
selectAiOutputLang: "Select AI output language",
|
|
492
|
+
aiOutputLangHint: "AI will respond to you in this language",
|
|
493
|
+
enterCustomLanguage: "Enter custom language (e.g., Japanese, French, etc.)",
|
|
494
|
+
languageChanged: "Language changed",
|
|
495
|
+
configLangHint: {
|
|
496
|
+
"zh-CN": "easier for Chinese users to customize",
|
|
497
|
+
"en": "lower token consumption"
|
|
498
|
+
},
|
|
499
|
+
updateConfigLangPrompt: "Select configuration language",
|
|
500
|
+
updateConfigLangChoice: {
|
|
501
|
+
"zh-CN": "Chinese configuration",
|
|
502
|
+
"en": "English configuration"
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
const mcp$1 = {
|
|
507
|
+
configureMcp: "Configure MCP services?",
|
|
508
|
+
selectMcpServices: "Select MCP services to install",
|
|
509
|
+
allServices: "Install all",
|
|
510
|
+
mcpServiceInstalled: "Selected MCP services",
|
|
511
|
+
enterExaApiKey: "Enter Exa API Key (get from https://dashboard.exa.ai/api-keys)",
|
|
512
|
+
skipMcp: "Skip MCP configuration",
|
|
513
|
+
mcpConfigSuccess: "MCP services configured",
|
|
514
|
+
mcpBackupSuccess: "Original MCP config backed up",
|
|
515
|
+
fixWindowsMcp: "Fix Windows MCP Configuration",
|
|
516
|
+
fixWindowsMcpDesc: "Fix Windows platform MCP command configuration issues",
|
|
517
|
+
windowsMcpFixed: "Windows MCP configuration fixed",
|
|
518
|
+
configureMcpServices: "Configure MCP Services",
|
|
519
|
+
selectMcpOption: "Select MCP configuration option"
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
const menu$1 = {
|
|
523
|
+
selectFunction: "Select function",
|
|
776
524
|
menuSections: {
|
|
777
525
|
otherTools: "Other Tools"
|
|
778
526
|
},
|
|
@@ -795,298 +543,656 @@ const menu = {
|
|
|
795
543
|
changeLanguage: "Select display language / \u66F4\u6539\u663E\u793A\u8BED\u8A00",
|
|
796
544
|
exit: "Exit"
|
|
797
545
|
},
|
|
798
|
-
menuDescriptions: {
|
|
799
|
-
fullInit: "Install Claude Code + Import workflow + Configure API or CCR proxy + Configure MCP services",
|
|
800
|
-
importWorkflow: "Import/update workflow-related files only",
|
|
801
|
-
configureApiOrCcr: "Configure API URL, authentication or CCR proxy",
|
|
802
|
-
configureApi: "Configure API URL and authentication",
|
|
803
|
-
configureMcp: "Configure MCP services (includes Windows fix)",
|
|
804
|
-
configureModel: "Set default model (opus/sonnet)",
|
|
805
|
-
configureAiMemory: "Configure AI output language and personality",
|
|
806
|
-
configureEnvPermission: "Import privacy protection environment variables and system permissions",
|
|
807
|
-
configureCcr: "Configure Claude Code Router to use multiple AI models",
|
|
808
|
-
ccrManagement: "Configure Claude Code Router to use multiple AI models",
|
|
809
|
-
ccusage: "Claude Code usage analysis",
|
|
810
|
-
cometixLine: "High-performance Claude Code statusline tool with Git integration and real-time usage tracking",
|
|
811
|
-
installBmad: "AI-driven development methodology framework",
|
|
812
|
-
clearCache: "Clear preference language and other caches",
|
|
813
|
-
checkUpdates: "Check and update Claude Code, CCR and CCometixLine versions",
|
|
814
|
-
changeLanguage: "Change ZCF interface language"
|
|
546
|
+
menuDescriptions: {
|
|
547
|
+
fullInit: "Install Claude Code + Import workflow + Configure API or CCR proxy + Configure MCP services",
|
|
548
|
+
importWorkflow: "Import/update workflow-related files only",
|
|
549
|
+
configureApiOrCcr: "Configure API URL, authentication or CCR proxy",
|
|
550
|
+
configureApi: "Configure API URL and authentication",
|
|
551
|
+
configureMcp: "Configure MCP services (includes Windows fix)",
|
|
552
|
+
configureModel: "Set default model (opus/sonnet)",
|
|
553
|
+
configureAiMemory: "Configure AI output language and personality",
|
|
554
|
+
configureEnvPermission: "Import privacy protection environment variables and system permissions",
|
|
555
|
+
configureCcr: "Configure Claude Code Router to use multiple AI models",
|
|
556
|
+
ccrManagement: "Configure Claude Code Router to use multiple AI models",
|
|
557
|
+
ccusage: "Claude Code usage analysis",
|
|
558
|
+
cometixLine: "High-performance Claude Code statusline tool with Git integration and real-time usage tracking",
|
|
559
|
+
installBmad: "AI-driven development methodology framework",
|
|
560
|
+
clearCache: "Clear preference language and other caches",
|
|
561
|
+
checkUpdates: "Check and update Claude Code, CCR and CCometixLine versions",
|
|
562
|
+
changeLanguage: "Change ZCF interface language"
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
const tools$1 = {
|
|
567
|
+
// CCUsage
|
|
568
|
+
runningCcusage: "Running Claude Code usage analysis tool...",
|
|
569
|
+
ccusageDescription: "Analyze token usage and costs - https://github.com/ryoppippi/ccusage",
|
|
570
|
+
selectAnalysisMode: "Select analysis mode:",
|
|
571
|
+
ccusageModes: {
|
|
572
|
+
daily: "Daily usage",
|
|
573
|
+
monthly: "Monthly usage",
|
|
574
|
+
session: "Session statistics",
|
|
575
|
+
blocks: "Block statistics",
|
|
576
|
+
custom: "Custom parameters"
|
|
577
|
+
},
|
|
578
|
+
enterCustomArgs: "Enter custom arguments (e.g., daily --json):",
|
|
579
|
+
pressEnterToContinue: "Press Enter to continue...",
|
|
580
|
+
ccusageFailed: "Failed to run ccusage",
|
|
581
|
+
checkNetworkConnection: "Please check your network connection and try again",
|
|
582
|
+
errorDetails: "Error details:"
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
const updater$1 = {
|
|
586
|
+
checkingVersion: "Checking version...",
|
|
587
|
+
checkingTools: "Checking tool versions",
|
|
588
|
+
ccrNotInstalled: "CCR is not installed",
|
|
589
|
+
ccrUpToDate: "CCR is up to date (v{version})",
|
|
590
|
+
claudeCodeNotInstalled: "Claude Code is not installed",
|
|
591
|
+
claudeCodeUpToDate: "Claude Code is up to date (v{version})",
|
|
592
|
+
cometixLineNotInstalled: "CCometixLine is not installed",
|
|
593
|
+
cometixLineUpToDate: "CCometixLine is up to date (v{version})",
|
|
594
|
+
cannotCheckVersion: "Cannot check latest version",
|
|
595
|
+
currentVersion: "Current version: v{version}",
|
|
596
|
+
latestVersion: "Latest version: v{version}",
|
|
597
|
+
confirmUpdate: "Update {tool} to the latest version?",
|
|
598
|
+
updateSkipped: "Update skipped",
|
|
599
|
+
updating: "Updating {tool}...",
|
|
600
|
+
updateSuccess: "{tool} updated successfully!",
|
|
601
|
+
updateFailed: "{tool} update failed",
|
|
602
|
+
checkFailed: "Version check failed"
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
const workflow$1 = {
|
|
606
|
+
selectWorkflowType: "Select workflow type to install",
|
|
607
|
+
workflowOption: {
|
|
608
|
+
commonTools: "Common Tools (Hierarchical Directory Initialization + General-purpose agents)",
|
|
609
|
+
featPlanUx: "Feature Planning and UX Design (feat + planner + ui-ux-designer)",
|
|
610
|
+
sixStepsWorkflow: "Six Steps Workflow (workflow)",
|
|
611
|
+
bmadWorkflow: "BMAD-Method Extension Installer (Agile Development Workflow)",
|
|
612
|
+
gitWorkflow: "Git Commands (commit + rollback + cleanBranches + worktree)"
|
|
613
|
+
},
|
|
614
|
+
workflowDescription: {
|
|
615
|
+
commonTools: "Provides project initialization and architecture analysis tools, including hierarchical directory initialization commands and intelligent architecture analysis agents",
|
|
616
|
+
featPlanUx: "Feature planning and user experience design workflow with planning and UX design agents",
|
|
617
|
+
sixStepsWorkflow: "Professional development assistant structured six-step workflow",
|
|
618
|
+
bmadWorkflow: "BMAD-Method enterprise-grade agile development workflow extension",
|
|
619
|
+
gitWorkflow: "Git version control related commands collection"
|
|
620
|
+
},
|
|
621
|
+
// BMAD workflow
|
|
622
|
+
bmadInitPrompt: "\u2728 Please run /bmad-init command in your project to initialize or update BMAD-Method extension",
|
|
623
|
+
bmadInstallSuccess: "Successfully installed BMAD-Method installer",
|
|
624
|
+
// General workflow installation
|
|
625
|
+
installingWorkflow: "Installing workflow",
|
|
626
|
+
installedCommand: "Installed command",
|
|
627
|
+
installedAgent: "Installed agent",
|
|
628
|
+
failedToInstallCommand: "Failed to install command",
|
|
629
|
+
failedToInstallAgent: "Failed to install agent",
|
|
630
|
+
workflowInstallSuccess: "workflow installed successfully",
|
|
631
|
+
workflowInstallError: "workflow installation had errors",
|
|
632
|
+
cleaningOldFiles: "Cleaning up old version files",
|
|
633
|
+
removedOldFile: "Removed old file"
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
const en = {
|
|
637
|
+
common: common$1,
|
|
638
|
+
language: language$1,
|
|
639
|
+
installation: installation$1,
|
|
640
|
+
api: api$1,
|
|
641
|
+
configuration: configuration$1,
|
|
642
|
+
mcp: mcp$1,
|
|
643
|
+
menu: menu$1,
|
|
644
|
+
workflow: workflow$1,
|
|
645
|
+
cli: cli$1,
|
|
646
|
+
bmad: bmad$1,
|
|
647
|
+
errors: errors$1,
|
|
648
|
+
tools: tools$1,
|
|
649
|
+
ccr: ccrMessages$1,
|
|
650
|
+
cometix: cometixMessages$1,
|
|
651
|
+
updater: updater$1
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
const api = {
|
|
655
|
+
// Basic API configuration
|
|
656
|
+
configureApi: "\u9009\u62E9 API \u8BA4\u8BC1\u65B9\u5F0F",
|
|
657
|
+
useAuthToken: "\u4F7F\u7528 Auth Token (OAuth \u8BA4\u8BC1)",
|
|
658
|
+
authTokenDesc: "\u9002\u7528\u4E8E\u901A\u8FC7 OAuth \u6216\u6D4F\u89C8\u5668\u767B\u5F55\u83B7\u53D6\u7684\u4EE4\u724C",
|
|
659
|
+
useApiKey: "\u4F7F\u7528 API Key (\u5BC6\u94A5\u8BA4\u8BC1)",
|
|
660
|
+
apiKeyDesc: "\u9002\u7528\u4E8E\u4ECE Anthropic Console \u83B7\u53D6\u7684 API \u5BC6\u94A5",
|
|
661
|
+
useCcrProxy: "\u4F7F\u7528 CCR \u4EE3\u7406",
|
|
662
|
+
ccrProxyDesc: "\u901A\u8FC7 Claude Code Router \u4F7F\u7528\u591A\u4E2A AI \u6A21\u578B",
|
|
663
|
+
skipApi: "\u8DF3\u8FC7\uFF08\u7A0D\u540E\u624B\u52A8\u914D\u7F6E\uFF09",
|
|
664
|
+
enterApiUrl: "\u8BF7\u8F93\u5165 API URL",
|
|
665
|
+
enterAuthToken: "\u8BF7\u8F93\u5165 Auth Token",
|
|
666
|
+
enterApiKey: "\u8BF7\u8F93\u5165 API Key",
|
|
667
|
+
apiConfigSuccess: "API \u914D\u7F6E\u5B8C\u6210",
|
|
668
|
+
// API modification
|
|
669
|
+
existingApiConfig: "\u68C0\u6D4B\u5230\u5DF2\u6709 API \u914D\u7F6E\uFF1A",
|
|
670
|
+
apiConfigUrl: "URL",
|
|
671
|
+
apiConfigKey: "Key",
|
|
672
|
+
apiConfigAuthType: "\u8BA4\u8BC1\u7C7B\u578B",
|
|
673
|
+
selectApiAction: "\u8BF7\u9009\u62E9API\u5904\u7406\u64CD\u4F5C",
|
|
674
|
+
keepExistingConfig: "\u4FDD\u7559\u73B0\u6709\u914D\u7F6E",
|
|
675
|
+
modifyAllConfig: "\u4FEE\u6539\u5168\u90E8\u914D\u7F6E",
|
|
676
|
+
modifyPartialConfig: "\u4FEE\u6539\u90E8\u5206\u914D\u7F6E",
|
|
677
|
+
selectModifyItems: "\u8BF7\u9009\u62E9\u8981\u4FEE\u6539\u7684\u9879",
|
|
678
|
+
modifyApiUrl: "\u4FEE\u6539 API URL",
|
|
679
|
+
modifyApiKey: "\u4FEE\u6539 API Key",
|
|
680
|
+
modifyAuthType: "\u4FEE\u6539\u8BA4\u8BC1\u7C7B\u578B",
|
|
681
|
+
continueModification: "\u662F\u5426\u7EE7\u7EED\u4FEE\u6539\u5176\u4ED6\u914D\u7F6E\uFF1F",
|
|
682
|
+
modificationSaved: "\u914D\u7F6E\u5DF2\u4FDD\u5B58",
|
|
683
|
+
enterNewApiUrl: "\u8BF7\u8F93\u5165\u65B0\u7684 API URL\uFF08\u5F53\u524D\uFF1A{url}\uFF09",
|
|
684
|
+
enterNewApiKey: "\u8BF7\u8F93\u5165\u65B0\u7684 API Key\uFF08\u5F53\u524D\uFF1A{key}\uFF09",
|
|
685
|
+
selectNewAuthType: "\u9009\u62E9\u65B0\u7684\u8BA4\u8BC1\u7C7B\u578B\uFF08\u5F53\u524D\uFF1A{type}\uFF09",
|
|
686
|
+
// API validation
|
|
687
|
+
apiKeyValidation: {
|
|
688
|
+
empty: "API Key \u4E0D\u80FD\u4E3A\u7A7A",
|
|
689
|
+
example: "\u793A\u4F8B\u683C\u5F0F: sk-abcdef123456_789xyz"
|
|
690
|
+
},
|
|
691
|
+
urlRequired: "URL \u4E3A\u5FC5\u586B\u9879",
|
|
692
|
+
invalidUrl: "\u65E0\u6548\u7684 URL",
|
|
693
|
+
keyRequired: "\u5BC6\u94A5\u4E3A\u5FC5\u586B\u9879",
|
|
694
|
+
invalidKeyFormat: "\u65E0\u6548\u7684\u5BC6\u94A5\u683C\u5F0F"
|
|
695
|
+
};
|
|
696
|
+
|
|
697
|
+
const bmad = {
|
|
698
|
+
// BMad CLI command
|
|
699
|
+
description: "\u5B89\u88C5 BMad Method \u7528\u4E8E AI \u9A71\u52A8\u7684\u5F00\u53D1",
|
|
700
|
+
directoryOption: "\u5B89\u88C5\u7684\u76EE\u6807\u76EE\u5F55",
|
|
701
|
+
forceOption: "\u5F3A\u5236\u91CD\u65B0\u5B89\u88C5\uFF0C\u5373\u4F7F\u5DF2\u5B58\u5728",
|
|
702
|
+
versionOption: "\u8981\u5B89\u88C5\u7684\u7279\u5B9A BMad \u7248\u672C",
|
|
703
|
+
// Installation messages
|
|
704
|
+
checkingExisting: "\u6B63\u5728\u68C0\u67E5\u73B0\u6709 BMad \u5B89\u88C5...",
|
|
705
|
+
alreadyInstalled: "BMad \u5DF2\u5B89\u88C5\uFF08\u7248\u672C\uFF1A{version}\uFF09",
|
|
706
|
+
existingAction: "\u9009\u62E9\u64CD\u4F5C\uFF1A",
|
|
707
|
+
actionUpdate: "\u66F4\u65B0\u5230\u6700\u65B0\u7248\u672C",
|
|
708
|
+
actionReinstall: "\u91CD\u65B0\u5B89\u88C5",
|
|
709
|
+
actionSkip: "\u8DF3\u8FC7\u5B89\u88C5",
|
|
710
|
+
installationSkipped: "\u5DF2\u8DF3\u8FC7 BMad \u5B89\u88C5",
|
|
711
|
+
installing: "\u6B63\u5728\u5B89\u88C5 BMad Method...",
|
|
712
|
+
installSuccess: "\u2705 BMad Method \u5B89\u88C5\u6210\u529F\uFF01",
|
|
713
|
+
installFailed: "\u274C BMad Method \u5B89\u88C5\u5931\u8D25",
|
|
714
|
+
installError: "\u274C BMad \u5B89\u88C5\u9519\u8BEF",
|
|
715
|
+
nextSteps: "\u4E0B\u4E00\u6B65\uFF1A\u8FDB\u5165 {directory} \u76EE\u5F55\u5F00\u59CB\u4F7F\u7528 BMad",
|
|
716
|
+
// BMad workflow messages
|
|
717
|
+
installingBmadWorkflow: "\u6B63\u5728\u5B89\u88C5 BMAD \u5DE5\u4F5C\u6D41...",
|
|
718
|
+
bmadWorkflowInstalled: "BMAD \u5DE5\u4F5C\u6D41\u5DF2\u5B89\u88C5",
|
|
719
|
+
bmadWorkflowFailed: "\u5B89\u88C5 BMAD \u5DE5\u4F5C\u6D41\u5931\u8D25",
|
|
720
|
+
// BMad agent messages
|
|
721
|
+
installingAgent: "\u6B63\u5728\u5B89\u88C5 {agent} \u4EE3\u7406...",
|
|
722
|
+
agentInstalled: "{agent} \u4EE3\u7406\u5DF2\u5B89\u88C5",
|
|
723
|
+
agentFailed: "\u5B89\u88C5 {agent} \u4EE3\u7406\u5931\u8D25",
|
|
724
|
+
// BMad user prompts
|
|
725
|
+
selectBmadOption: "\u9009\u62E9 BMAD \u9009\u9879",
|
|
726
|
+
confirmInstallBmad: "\u786E\u8BA4\u5B89\u88C5 BMAD \u5DE5\u4F5C\u6D41\uFF1F",
|
|
727
|
+
bmadInstallComplete: "BMAD \u5B89\u88C5\u5B8C\u6210",
|
|
728
|
+
// BMad log messages
|
|
729
|
+
checkingBmadDependencies: "\u68C0\u67E5 BMAD \u4F9D\u8D56...",
|
|
730
|
+
bmadDependenciesMet: "BMAD \u4F9D\u8D56\u6EE1\u8DB3",
|
|
731
|
+
bmadDependenciesMissing: "\u7F3A\u5C11 BMAD \u4F9D\u8D56\uFF1A{deps}",
|
|
732
|
+
// BMad commands
|
|
733
|
+
runningBmadCommand: "\u6267\u884C BMAD \u547D\u4EE4\uFF1A{command}",
|
|
734
|
+
bmadCommandSuccess: "BMAD \u547D\u4EE4\u6267\u884C\u6210\u529F",
|
|
735
|
+
bmadCommandFailed: "BMAD \u547D\u4EE4\u6267\u884C\u5931\u8D25\uFF1A{error}",
|
|
736
|
+
// BMad configuration
|
|
737
|
+
configuringBmad: "\u914D\u7F6E BMAD \u8BBE\u7F6E...",
|
|
738
|
+
bmadConfigured: "BMAD \u5DF2\u914D\u7F6E",
|
|
739
|
+
bmadConfigFailed: "BMAD \u914D\u7F6E\u5931\u8D25"
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
const ccrMessages = {
|
|
743
|
+
// Installation
|
|
744
|
+
installingCcr: "\u6B63\u5728\u5B89\u88C5 Claude Code Router...",
|
|
745
|
+
ccrInstallSuccess: "Claude Code Router \u5B89\u88C5\u6210\u529F",
|
|
746
|
+
ccrInstallFailed: "\u5B89\u88C5 Claude Code Router \u5931\u8D25",
|
|
747
|
+
ccrAlreadyInstalled: "Claude Code Router \u5DF2\u5B89\u88C5",
|
|
748
|
+
detectedIncorrectPackage: "\u68C0\u6D4B\u5230\u9519\u8BEF\u7684\u5305 claude-code-router\uFF0C\u6B63\u5728\u5378\u8F7D...",
|
|
749
|
+
uninstalledIncorrectPackage: "\u6210\u529F\u5378\u8F7D\u9519\u8BEF\u7684\u5305",
|
|
750
|
+
failedToUninstallIncorrectPackage: "\u5378\u8F7D\u9519\u8BEF\u7684\u5305\u5931\u8D25\uFF0C\u7EE7\u7EED\u5B89\u88C5",
|
|
751
|
+
// Configuration
|
|
752
|
+
configureCcr: "\u914D\u7F6E\u6A21\u578B\u4EE3\u7406 (CCR)",
|
|
753
|
+
useCcrProxy: "\u4F7F\u7528 CCR \u4EE3\u7406",
|
|
754
|
+
ccrProxyDesc: "\u901A\u8FC7 Claude Code Router \u8FDE\u63A5\u591A\u4E2A AI \u6A21\u578B",
|
|
755
|
+
fetchingPresets: "\u6B63\u5728\u83B7\u53D6\u63D0\u4F9B\u5546\u9884\u8BBE...",
|
|
756
|
+
noPresetsAvailable: "\u6CA1\u6709\u53EF\u7528\u7684\u9884\u8BBE",
|
|
757
|
+
selectCcrPreset: "\u9009\u62E9\u4E00\u4E2A\u63D0\u4F9B\u5546\u9884\u8BBE\uFF1A",
|
|
758
|
+
keyRequired: "API \u5BC6\u94A5\u4E0D\u80FD\u4E3A\u7A7A",
|
|
759
|
+
// Existing config
|
|
760
|
+
existingCcrConfig: "\u53D1\u73B0\u73B0\u6709\u7684 CCR \u914D\u7F6E",
|
|
761
|
+
overwriteCcrConfig: "\u662F\u5426\u5907\u4EFD\u73B0\u6709\u7684 CCR \u914D\u7F6E\u5E76\u91CD\u65B0\u914D\u7F6E\uFF1F",
|
|
762
|
+
keepingExistingConfig: "\u4FDD\u7559\u73B0\u6709\u914D\u7F6E",
|
|
763
|
+
backupCcrConfig: "\u6B63\u5728\u5907\u4EFD\u73B0\u6709\u7684 CCR \u914D\u7F6E...",
|
|
764
|
+
ccrBackupSuccess: "CCR \u914D\u7F6E\u5DF2\u5907\u4EFD\u5230\uFF1A{path}",
|
|
765
|
+
ccrBackupFailed: "\u5907\u4EFD CCR \u914D\u7F6E\u5931\u8D25",
|
|
766
|
+
// Model selection
|
|
767
|
+
selectDefaultModelForProvider: "\u9009\u62E9 {provider} \u7684\u9ED8\u8BA4\u6A21\u578B\uFF1A",
|
|
768
|
+
enterApiKeyForProvider: "\u8BF7\u8F93\u5165 {provider} \u7684 API \u5BC6\u94A5\uFF1A",
|
|
769
|
+
// Skip option
|
|
770
|
+
skipOption: "\u8DF3\u8FC7\uFF0C\u5728 CCR \u4E2D\u81EA\u884C\u914D\u7F6E",
|
|
771
|
+
skipConfiguring: "\u8DF3\u8FC7\u9884\u8BBE\u914D\u7F6E\uFF0C\u5C06\u521B\u5EFA\u7A7A\u914D\u7F6E\u6846\u67B6",
|
|
772
|
+
// Success/Error messages
|
|
773
|
+
ccrConfigSuccess: "CCR \u914D\u7F6E\u5DF2\u4FDD\u5B58",
|
|
774
|
+
proxyConfigSuccess: "\u4EE3\u7406\u8BBE\u7F6E\u5DF2\u914D\u7F6E",
|
|
775
|
+
ccrConfigFailed: "\u914D\u7F6E CCR \u5931\u8D25",
|
|
776
|
+
ccrSetupComplete: "CCR \u8BBE\u7F6E\u5B8C\u6210",
|
|
777
|
+
fetchPresetsError: "\u83B7\u53D6\u63D0\u4F9B\u5546\u9884\u8BBE\u5931\u8D25",
|
|
778
|
+
failedToStartCcrService: "\u542F\u52A8 CCR \u670D\u52A1\u5931\u8D25",
|
|
779
|
+
errorStartingCcrService: "\u542F\u52A8 CCR \u670D\u52A1\u65F6\u51FA\u9519",
|
|
780
|
+
// CCR service status
|
|
781
|
+
ccrRestartSuccess: "CCR \u670D\u52A1\u5DF2\u91CD\u542F",
|
|
782
|
+
ccrRestartFailed: "CCR \u670D\u52A1\u91CD\u542F\u5931\u8D25",
|
|
783
|
+
// Configuration tips
|
|
784
|
+
configTips: "\u914D\u7F6E\u63D0\u793A",
|
|
785
|
+
useClaudeCommand: "\u8BF7\u4F7F\u7528 claude \u547D\u4EE4\u542F\u52A8 Claude Code\uFF08\u800C\u975E ccr code\uFF09",
|
|
786
|
+
advancedConfigTip: "\u60A8\u53EF\u4EE5\u4F7F\u7528 ccr ui \u547D\u4EE4\u8FDB\u884C\u66F4\u9AD8\u7EA7\u7684\u914D\u7F6E",
|
|
787
|
+
manualConfigTip: "\u624B\u52A8\u4FEE\u6539\u914D\u7F6E\u6587\u4EF6\u540E\uFF0C\u8BF7\u6267\u884C ccr restart \u4F7F\u914D\u7F6E\u751F\u6548",
|
|
788
|
+
// CCR Menu
|
|
789
|
+
ccrMenuTitle: "CCR - Claude Code Router \u7BA1\u7406",
|
|
790
|
+
ccrMenuOptions: {
|
|
791
|
+
initCcr: "\u521D\u59CB\u5316 CCR",
|
|
792
|
+
startUi: "\u542F\u52A8 CCR UI",
|
|
793
|
+
checkStatus: "\u67E5\u8BE2 CCR \u72B6\u6001",
|
|
794
|
+
restart: "\u91CD\u542F CCR",
|
|
795
|
+
start: "\u542F\u52A8 CCR",
|
|
796
|
+
stop: "\u505C\u6B62 CCR",
|
|
797
|
+
back: "\u8FD4\u56DE\u4E3B\u83DC\u5355"
|
|
798
|
+
},
|
|
799
|
+
ccrMenuDescriptions: {
|
|
800
|
+
initCcr: "\u5B89\u88C5\u5E76\u914D\u7F6E CCR",
|
|
801
|
+
startUi: "\u6253\u5F00 Web \u754C\u9762\u7BA1\u7406 CCR",
|
|
802
|
+
checkStatus: "\u67E5\u770B CCR \u670D\u52A1\u8FD0\u884C\u72B6\u6001",
|
|
803
|
+
restart: "\u91CD\u542F CCR \u670D\u52A1",
|
|
804
|
+
start: "\u542F\u52A8 CCR \u670D\u52A1",
|
|
805
|
+
stop: "\u505C\u6B62 CCR \u670D\u52A1"
|
|
806
|
+
},
|
|
807
|
+
// Command execution messages
|
|
808
|
+
startingCcrUi: "\u6B63\u5728\u542F\u52A8 CCR UI...",
|
|
809
|
+
ccrUiStarted: "CCR UI \u5DF2\u542F\u52A8",
|
|
810
|
+
checkingCcrStatus: "\u6B63\u5728\u67E5\u8BE2 CCR \u72B6\u6001...",
|
|
811
|
+
ccrStatusTitle: "CCR \u72B6\u6001\u4FE1\u606F\uFF1A",
|
|
812
|
+
restartingCcr: "\u6B63\u5728\u91CD\u542F CCR...",
|
|
813
|
+
ccrRestarted: "CCR \u5DF2\u91CD\u542F",
|
|
814
|
+
startingCcr: "\u6B63\u5728\u542F\u52A8 CCR...",
|
|
815
|
+
ccrStarted: "CCR \u5DF2\u542F\u52A8",
|
|
816
|
+
stoppingCcr: "\u6B63\u5728\u505C\u6B62 CCR...",
|
|
817
|
+
ccrStopped: "CCR \u5DF2\u505C\u6B62",
|
|
818
|
+
ccrCommandFailed: "\u6267\u884C CCR \u547D\u4EE4\u5931\u8D25",
|
|
819
|
+
// Configuration check messages
|
|
820
|
+
ccrNotConfigured: "CCR \u5C1A\u672A\u914D\u7F6E\u3002\u8BF7\u5148\u521D\u59CB\u5316 CCR\u3002",
|
|
821
|
+
pleaseInitFirst: "\u8BF7\u9009\u62E9\u9009\u9879 1 \u6765\u521D\u59CB\u5316 CCR\u3002",
|
|
822
|
+
// UI API Key messages
|
|
823
|
+
ccrUiApiKey: "CCR UI \u767B\u5F55\u5BC6\u94A5",
|
|
824
|
+
ccrUiApiKeyHint: "\u4F7F\u7528\u6B64\u5BC6\u94A5\u767B\u5F55 CCR UI \u754C\u9762"
|
|
825
|
+
};
|
|
826
|
+
|
|
827
|
+
const cli = {
|
|
828
|
+
runFullInit: "\u76F4\u63A5\u8FD0\u884C\u5B8C\u6574\u521D\u59CB\u5316",
|
|
829
|
+
forceOverwrite: "\u5F3A\u5236\u8986\u76D6\u73B0\u6709\u914D\u7F6E",
|
|
830
|
+
initClaudeConfig: "\u521D\u59CB\u5316 Claude Code \u914D\u7F6E",
|
|
831
|
+
updatePromptsOnly: "\u4EC5\u66F4\u65B0 Claude Code \u63D0\u793A"
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
const cometixMessages = {
|
|
835
|
+
// Installation
|
|
836
|
+
installingCometix: "\u6B63\u5728\u5B89\u88C5 CCometixLine...",
|
|
837
|
+
cometixInstallSuccess: "CCometixLine \u5B89\u88C5\u6210\u529F",
|
|
838
|
+
cometixInstallFailed: "\u5B89\u88C5 CCometixLine \u5931\u8D25",
|
|
839
|
+
cometixAlreadyInstalled: "CCometixLine \u5DF2\u5B89\u88C5",
|
|
840
|
+
statusLineConfigured: "Claude Code \u72B6\u6001\u680F\u914D\u7F6E\u5DF2\u8BBE\u7F6E",
|
|
841
|
+
statusLineConfigFailed: "\u72B6\u6001\u680F\u914D\u7F6E\u5931\u8D25",
|
|
842
|
+
statusLineManualConfig: "\u8BF7\u624B\u52A8\u6DFB\u52A0\u72B6\u6001\u680F\u914D\u7F6E\u5230 Claude Code \u8BBE\u7F6E\u4E2D",
|
|
843
|
+
statusLineAlreadyConfigured: "Claude Code \u72B6\u6001\u680F\u914D\u7F6E\u5DF2\u5B58\u5728",
|
|
844
|
+
// Installation prompt in init
|
|
845
|
+
installCometixPrompt: "\u662F\u5426\u5B89\u88C5 CCometixLine - \u57FA\u4E8E Rust \u7684\u9AD8\u6027\u80FD Claude Code \u72B6\u6001\u680F\u5DE5\u5177\uFF0C\u96C6\u6210 Git \u4FE1\u606F\u548C\u5B9E\u65F6\u4F7F\u7528\u91CF\u8DDF\u8E2A\uFF1F",
|
|
846
|
+
cometixSkipped: "CCometixLine \u5B89\u88C5\u5DF2\u8DF3\u8FC7",
|
|
847
|
+
// Commands
|
|
848
|
+
installingOrUpdating: "\u6B63\u5728\u5B89\u88C5/\u66F4\u65B0 CCometixLine...",
|
|
849
|
+
installUpdateSuccess: "CCometixLine \u5B89\u88C5/\u66F4\u65B0\u5B8C\u6210",
|
|
850
|
+
installUpdateFailed: "\u5B89\u88C5/\u66F4\u65B0 CCometixLine \u5931\u8D25",
|
|
851
|
+
printingConfig: "\u6B63\u5728\u6253\u5370 CCometixLine \u914D\u7F6E...",
|
|
852
|
+
printConfigSuccess: "\u914D\u7F6E\u6253\u5370\u6210\u529F",
|
|
853
|
+
printConfigFailed: "\u6253\u5370\u914D\u7F6E\u5931\u8D25",
|
|
854
|
+
enteringTuiConfig: "\u6B63\u5728\u8FDB\u5165 CCometixLine TUI \u914D\u7F6E\u6A21\u5F0F...",
|
|
855
|
+
tuiConfigSuccess: "TUI \u914D\u7F6E\u5B8C\u6210\u6210\u529F",
|
|
856
|
+
tuiConfigFailed: "\u8FD0\u884C TUI \u914D\u7F6E\u5931\u8D25",
|
|
857
|
+
commandNotFound: "ccline \u547D\u4EE4\u672A\u627E\u5230\u3002\u8BF7\u5148\u5B89\u88C5 CCometixLine\u3002",
|
|
858
|
+
// CCometixLine Menu
|
|
859
|
+
cometixMenuTitle: "CCometixLine - \u57FA\u4E8E Rust \u7684\u9AD8\u6027\u80FD Claude Code \u72B6\u6001\u680F\u5DE5\u5177\uFF0C\u96C6\u6210 Git \u4FE1\u606F\u548C\u5B9E\u65F6\u4F7F\u7528\u91CF\u8DDF\u8E2A",
|
|
860
|
+
cometixMenuOptions: {
|
|
861
|
+
installOrUpdate: "\u5B89\u88C5\u6216\u66F4\u65B0",
|
|
862
|
+
printConfig: "\u6253\u5370\u9ED8\u8BA4\u914D\u7F6E",
|
|
863
|
+
customConfig: "\u81EA\u5B9A\u4E49\u914D\u7F6E",
|
|
864
|
+
back: "\u8FD4\u56DE\u4E3B\u83DC\u5355"
|
|
865
|
+
},
|
|
866
|
+
cometixMenuDescriptions: {
|
|
867
|
+
installOrUpdate: "\u4F7F\u7528 npm \u5B89\u88C5\u6216\u66F4\u65B0 CCometixLine",
|
|
868
|
+
printConfig: "\u663E\u793A\u5F53\u524D CCometixLine \u914D\u7F6E",
|
|
869
|
+
customConfig: "\u8FDB\u5165 CCometixLine \u7684 TUI \u914D\u7F6E\u6A21\u5F0F"
|
|
815
870
|
}
|
|
816
871
|
};
|
|
817
872
|
|
|
818
|
-
const
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
workflowInstallSuccess: "workflow installed successfully",
|
|
836
|
-
workflowInstallError: "workflow installation had errors",
|
|
837
|
-
cleaningOldFiles: "Cleaning up old version files",
|
|
838
|
-
removedOldFile: "Removed old file"
|
|
839
|
-
};
|
|
840
|
-
|
|
841
|
-
const cli = {
|
|
842
|
-
runFullInit: "Run full initialization directly",
|
|
843
|
-
forceOverwrite: "Force overwrite existing configuration",
|
|
844
|
-
initClaudeConfig: "Initialize Claude Code configuration",
|
|
845
|
-
updatePromptsOnly: "Update Claude Code prompts only"
|
|
873
|
+
const common = {
|
|
874
|
+
// Basic
|
|
875
|
+
multiSelectHint: "\uFF08\u7A7A\u683C\u9009\u62E9\uFF0Ca\u5168\u9009\uFF0Ci\u53CD\u9009\uFF0C\u56DE\u8F66\u786E\u8BA4\uFF09",
|
|
876
|
+
yes: "\u662F",
|
|
877
|
+
no: "\u5426",
|
|
878
|
+
skip: "\u8DF3\u8FC7",
|
|
879
|
+
cancelled: "\u64CD\u4F5C\u5DF2\u53D6\u6D88",
|
|
880
|
+
error: "\u9519\u8BEF",
|
|
881
|
+
complete: "\u{1F389} \u914D\u7F6E\u5B8C\u6210\uFF01\u4F7F\u7528 'claude' \u547D\u4EE4\u5F00\u59CB\u4F53\u9A8C\u3002",
|
|
882
|
+
none: "\u65E0",
|
|
883
|
+
notConfigured: "\u672A\u914D\u7F6E",
|
|
884
|
+
spaceToSelectReturn: "- \u7A7A\u683C\u9009\u62E9\uFF0C\u56DE\u8F66\u63D0\u4EA4",
|
|
885
|
+
enterChoice: "\u8BF7\u8F93\u5165\u9009\u9879\uFF0C\u56DE\u8F66\u786E\u8BA4\uFF08\u4E0D\u533A\u5206\u5927\u5C0F\u5199\uFF09",
|
|
886
|
+
invalidChoice: "\u65E0\u6548\u9009\u62E9\u3002\u8BF7\u8F93\u5165\u6709\u6548\u9009\u9879\u3002",
|
|
887
|
+
goodbye: "\u{1F44B} \u611F\u8C22\u4F7F\u7528 ZCF\uFF01\u518D\u89C1\uFF01",
|
|
888
|
+
returnToMenu: "\u8FD4\u56DE\u4E3B\u83DC\u5355\uFF1F",
|
|
889
|
+
back: "\u8FD4\u56DE"
|
|
846
890
|
};
|
|
847
891
|
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
//
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
892
|
+
const configuration = {
|
|
893
|
+
existingConfig: "\u68C0\u6D4B\u5230\u5DF2\u6709\u914D\u7F6E\u6587\u4EF6\uFF0C\u5982\u4F55\u5904\u7406\uFF1F",
|
|
894
|
+
backupAndOverwrite: "\u5907\u4EFD\u5E76\u8986\u76D6\u5168\u90E8",
|
|
895
|
+
updateDocsOnly: "\u4EC5\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173md\u5E76\u5907\u4EFD\u65E7\u914D\u7F6E",
|
|
896
|
+
mergeConfig: "\u5408\u5E76\u914D\u7F6E",
|
|
897
|
+
backupSuccess: "\u5DF2\u5907\u4EFD\u6240\u6709\u914D\u7F6E\u6587\u4EF6\u5230",
|
|
898
|
+
copying: "\u6B63\u5728\u590D\u5236\u914D\u7F6E\u6587\u4EF6...",
|
|
899
|
+
configSuccess: "\u914D\u7F6E\u6587\u4EF6\u5DF2\u590D\u5236\u5230",
|
|
900
|
+
noExistingConfig: "\u672A\u627E\u5230\u73B0\u6709\u914D\u7F6E\u3002\u8BF7\u5148\u8FD0\u884C `zcf`\u3002",
|
|
901
|
+
updatingPrompts: "\u6B63\u5728\u66F4\u65B0 Claude Code \u8BB0\u5FC6\u6587\u6863...",
|
|
902
|
+
// Model configuration
|
|
903
|
+
selectDefaultModel: "\u9009\u62E9\u9ED8\u8BA4\u6A21\u578B",
|
|
904
|
+
modelConfigSuccess: "\u9ED8\u8BA4\u6A21\u578B\u5DF2\u914D\u7F6E",
|
|
905
|
+
existingModelConfig: "\u68C0\u6D4B\u5230\u5DF2\u6709\u6A21\u578B\u914D\u7F6E",
|
|
906
|
+
currentModel: "\u5F53\u524D\u6A21\u578B",
|
|
907
|
+
modifyModel: "\u662F\u5426\u4FEE\u6539\u6A21\u578B\u914D\u7F6E\uFF1F",
|
|
908
|
+
keepModel: "\u4FDD\u6301\u5F53\u524D\u6A21\u578B\u914D\u7F6E",
|
|
909
|
+
defaultModelOption: "\u9ED8\u8BA4 - \u8BA9 Claude Code \u81EA\u52A8\u9009\u62E9",
|
|
910
|
+
opusModelOption: "Opus - \u53EA\u7528opus\uFF0Ctoken\u6D88\u8017\u9AD8\uFF0C\u614E\u7528",
|
|
911
|
+
opusPlanModelOption: "OpusPlan - Opus\u505A\u8BA1\u5212\uFF0Csonnet\u7F16\u5199\u4EE3\u7801\uFF0C\u63A8\u8350",
|
|
912
|
+
modelConfigured: "\u9ED8\u8BA4\u6A21\u578B\u5DF2\u914D\u7F6E",
|
|
913
|
+
// AI memory configuration
|
|
914
|
+
selectMemoryOption: "\u9009\u62E9\u914D\u7F6E\u9009\u9879",
|
|
915
|
+
configureAiLanguage: "\u914D\u7F6E AI \u8F93\u51FA\u8BED\u8A00",
|
|
916
|
+
configureAiPersonality: "\u914D\u7F6E AI \u4E2A\u6027\u98CE\u683C",
|
|
917
|
+
configureOutputStyle: "\u914D\u7F6E\u5168\u5C40 AI \u8F93\u51FA\u98CE\u683C",
|
|
918
|
+
aiLanguageConfigured: "AI \u8F93\u51FA\u8BED\u8A00\u5DF2\u914D\u7F6E",
|
|
919
|
+
existingLanguageConfig: "\u68C0\u6D4B\u5230\u5DF2\u6709 AI \u8F93\u51FA\u8BED\u8A00\u914D\u7F6E",
|
|
920
|
+
currentLanguage: "\u5F53\u524D\u8BED\u8A00",
|
|
921
|
+
modifyLanguage: "\u662F\u5426\u4FEE\u6539 AI \u8F93\u51FA\u8BED\u8A00\uFF1F",
|
|
922
|
+
keepLanguage: "\u4FDD\u6301\u5F53\u524D\u8BED\u8A00\u914D\u7F6E",
|
|
923
|
+
// AI personality (deprecated - replaced by output styles)
|
|
924
|
+
selectAiPersonality: "\u9009\u62E9 AI \u4E2A\u6027\u98CE\u683C",
|
|
925
|
+
customPersonalityHint: "\u5B9A\u4E49\u4F60\u81EA\u5DF1\u7684\u4E2A\u6027",
|
|
926
|
+
enterCustomPersonality: "\u8BF7\u8F93\u5165\u81EA\u5B9A\u4E49\u4E2A\u6027\u63CF\u8FF0",
|
|
927
|
+
personalityConfigured: "AI \u4E2A\u6027\u5DF2\u914D\u7F6E",
|
|
928
|
+
existingPersonality: "\u68C0\u6D4B\u5230\u5DF2\u6709 AI \u4E2A\u6027\u914D\u7F6E",
|
|
929
|
+
currentPersonality: "\u5F53\u524D\u4E2A\u6027",
|
|
930
|
+
modifyPersonality: "\u662F\u5426\u4FEE\u6539 AI \u4E2A\u6027\u914D\u7F6E\uFF1F",
|
|
931
|
+
keepPersonality: "\u4FDD\u6301\u5F53\u524D\u4E2A\u6027\u914D\u7F6E",
|
|
932
|
+
directiveCannotBeEmpty: "\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A",
|
|
933
|
+
languageRequired: "\u8BED\u8A00\u4E3A\u5FC5\u586B\u9879",
|
|
934
|
+
// Output styles
|
|
935
|
+
selectOutputStyles: "\u9009\u62E9\u8981\u5B89\u88C5\u7684\u8F93\u51FA\u98CE\u683C",
|
|
936
|
+
selectDefaultOutputStyle: "\u9009\u62E9\u5168\u5C40\u9ED8\u8BA4\u8F93\u51FA\u98CE\u683C",
|
|
937
|
+
outputStyleInstalled: "\u8F93\u51FA\u98CE\u683C\u5B89\u88C5\u6210\u529F",
|
|
938
|
+
selectedStyles: "\u5DF2\u9009\u62E9\u98CE\u683C",
|
|
939
|
+
defaultStyle: "\u9ED8\u8BA4\u98CE\u683C",
|
|
940
|
+
selectAtLeastOne: "\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u8F93\u51FA\u98CE\u683C",
|
|
941
|
+
legacyFilesDetected: "\u68C0\u6D4B\u5230\u65E7\u7248\u4E2A\u6027\u914D\u7F6E\u6587\u4EF6",
|
|
942
|
+
cleanupLegacyFiles: "\u662F\u5426\u6E05\u7406\u65E7\u7248\u914D\u7F6E\u6587\u4EF6\uFF1F",
|
|
943
|
+
legacyFilesRemoved: "\u65E7\u7248\u914D\u7F6E\u6587\u4EF6\u5DF2\u6E05\u7406",
|
|
944
|
+
// Output style names and descriptions
|
|
945
|
+
outputStyles: {
|
|
946
|
+
"engineer-professional": {
|
|
947
|
+
name: "\u5DE5\u7A0B\u5E08\u4E13\u4E1A\u7248",
|
|
948
|
+
description: "\u4E13\u4E1A\u7684\u8F6F\u4EF6\u5DE5\u7A0B\u5E08\uFF0C\u4E25\u683C\u9075\u5FAASOLID\u3001KISS\u3001DRY\u3001YAGNI\u539F\u5219"
|
|
949
|
+
},
|
|
950
|
+
"nekomata-engineer": {
|
|
951
|
+
name: "\u732B\u5A18\u5DE5\u7A0B\u5E08",
|
|
952
|
+
description: "\u4E13\u4E1A\u7684\u732B\u5A18\u5DE5\u7A0B\u5E08Nova\uFF0C\u7ED3\u5408\u4E25\u8C28\u5DE5\u7A0B\u5E08\u7D20\u517B\u4E0E\u53EF\u7231\u732B\u5A18\u7279\u8D28"
|
|
953
|
+
},
|
|
954
|
+
"laowang-engineer": {
|
|
955
|
+
name: "\u8001\u738B\u66B4\u8E81\u6280\u672F\u6D41",
|
|
956
|
+
description: "\u8001\u738B\u66B4\u8E81\u6280\u672F\u6D41\uFF0C\u7EDD\u4E0D\u5BB9\u5FCD\u4EE3\u7801\u62A5\u9519\u548C\u4E0D\u89C4\u8303\u7684\u4EE3\u7801"
|
|
957
|
+
},
|
|
958
|
+
"default": {
|
|
959
|
+
name: "\u9ED8\u8BA4\u98CE\u683C",
|
|
960
|
+
description: "\u5B8C\u6210\u7F16\u7801\u4EFB\u52A1\u65F6\u9AD8\u6548\u4E14\u63D0\u4F9B\u7B80\u6D01\u54CD\u5E94 (Claude Code\u81EA\u5E26)"
|
|
961
|
+
},
|
|
962
|
+
"explanatory": {
|
|
963
|
+
name: "\u89E3\u91CA\u98CE\u683C",
|
|
964
|
+
description: "\u89E3\u91CA\u5176\u5B9E\u73B0\u9009\u62E9\u548C\u4EE3\u7801\u5E93\u6A21\u5F0F (Claude Code\u81EA\u5E26)"
|
|
965
|
+
},
|
|
966
|
+
"learning": {
|
|
967
|
+
name: "\u5B66\u4E60\u98CE\u683C",
|
|
968
|
+
description: "\u534F\u4F5C\u5F0F\u7684\u8FB9\u505A\u8FB9\u5B66\u6A21\u5F0F\uFF0C\u6682\u505C\u5E76\u8981\u6C42\u60A8\u7F16\u5199\u5C0F\u6BB5\u4EE3\u7801\u8FDB\u884C\u5B9E\u8DF5\u7EC3\u4E60 (Claude Code\u81EA\u5E26)"
|
|
969
|
+
}
|
|
970
|
+
},
|
|
971
|
+
// Cache
|
|
972
|
+
confirmClearCache: "\u786E\u8BA4\u6E05\u9664\u6240\u6709 ZCF \u504F\u597D\u7F13\u5B58\uFF1F",
|
|
973
|
+
cacheCleared: "ZCF \u7F13\u5B58\u5DF2\u6E05\u9664",
|
|
974
|
+
noCacheFound: "\u672A\u627E\u5230\u7F13\u5B58\u6587\u4EF6",
|
|
975
|
+
// Environment and permissions
|
|
976
|
+
selectEnvPermissionOption: "\u8BF7\u9009\u62E9\u914D\u7F6E\u9009\u9879",
|
|
977
|
+
importRecommendedEnv: "\u5BFC\u5165 ZCF \u63A8\u8350\u73AF\u5883\u53D8\u91CF",
|
|
978
|
+
importRecommendedEnvDesc: "\u9690\u79C1\u4FDD\u62A4\u53D8\u91CF\u7B49",
|
|
979
|
+
importRecommendedPermissions: "\u5BFC\u5165 ZCF \u63A8\u8350\u6743\u9650\u914D\u7F6E",
|
|
980
|
+
importRecommendedPermissionsDesc: "\u51E0\u4E4E\u5168\u90E8\u6743\u9650\uFF0C\u51CF\u5C11\u9891\u7E41\u8BF7\u6C42\u6743\u9650\uFF0C\u5371\u9669\u64CD\u4F5C\u7531\u89C4\u5219\u9650\u5236",
|
|
981
|
+
openSettingsJson: "\u6253\u5F00 settings.json \u624B\u52A8\u914D\u7F6E",
|
|
982
|
+
openSettingsJsonDesc: "\u9AD8\u7EA7\u7528\u6237\u81EA\u5B9A\u4E49",
|
|
983
|
+
envImportSuccess: "\u73AF\u5883\u53D8\u91CF\u5DF2\u5BFC\u5165",
|
|
984
|
+
permissionsImportSuccess: "\u6743\u9650\u914D\u7F6E\u5DF2\u5BFC\u5165",
|
|
985
|
+
openingSettingsJson: "\u6B63\u5728\u6253\u5F00 settings.json...",
|
|
986
|
+
// JSON config related
|
|
987
|
+
invalidConfiguration: "\u914D\u7F6E\u65E0\u6548",
|
|
988
|
+
failedToParseJson: "\u89E3\u6790 JSON \u6587\u4EF6\u5931\u8D25:",
|
|
989
|
+
failedToBackupConfig: "\u5907\u4EFD\u914D\u7F6E\u5931\u8D25",
|
|
990
|
+
failedToReadTemplateSettings: "\u8BFB\u53D6\u6A21\u677F\u8BBE\u7F6E\u5931\u8D25",
|
|
991
|
+
failedToMergeSettings: "\u5408\u5E76\u8BBE\u7F6E\u5931\u8D25",
|
|
992
|
+
preservingExistingSettings: "\u4FDD\u7559\u73B0\u6709\u8BBE\u7F6E",
|
|
993
|
+
memoryDirNotFound: "\u672A\u627E\u5230\u8BB0\u5FC6\u76EE\u5F55",
|
|
994
|
+
failedToSetOnboarding: "\u8BBE\u7F6E\u5F15\u5BFC\u6807\u5FD7\u5931\u8D25",
|
|
995
|
+
fixWindowsMcp: "\u4FEE\u590D Windows MCP \u914D\u7F6E\uFF1F"
|
|
891
996
|
};
|
|
892
997
|
|
|
893
998
|
const errors = {
|
|
894
999
|
// General errors
|
|
895
|
-
failedToSetOnboarding: "
|
|
896
|
-
failedToWriteMcpConfig: "
|
|
897
|
-
templateDirNotFound: "
|
|
898
|
-
failedToReadTemplateSettings: "
|
|
899
|
-
failedToMergeSettings: "
|
|
900
|
-
preservingExistingSettings: "
|
|
1000
|
+
failedToSetOnboarding: "\u8BBE\u7F6E\u5165\u95E8\u5B8C\u6210\u6807\u5FD7\u5931\u8D25\uFF1A",
|
|
1001
|
+
failedToWriteMcpConfig: "\u5199\u5165 MCP \u914D\u7F6E\u5931\u8D25\uFF1A",
|
|
1002
|
+
templateDirNotFound: "\u6A21\u677F\u76EE\u5F55\u672A\u627E\u5230\uFF1A",
|
|
1003
|
+
failedToReadTemplateSettings: "\u8BFB\u53D6\u6A21\u677F settings.json \u5931\u8D25\uFF1A",
|
|
1004
|
+
failedToMergeSettings: "\u5408\u5E76 settings.json \u5931\u8D25\uFF1A",
|
|
1005
|
+
preservingExistingSettings: "\u7531\u4E8E\u5408\u5E76\u9519\u8BEF\uFF0C\u4FDD\u7559\u73B0\u6709\u7684 settings.json",
|
|
901
1006
|
// File system errors
|
|
902
|
-
failedToReadFile: "
|
|
903
|
-
failedToWriteFile: "
|
|
904
|
-
failedToCopyFile: "
|
|
905
|
-
failedToRemoveFile: "
|
|
906
|
-
failedToReadDirectory: "
|
|
907
|
-
failedToGetStats: "
|
|
908
|
-
sourceDirNotExist: "
|
|
909
|
-
memoryDirNotFound: "
|
|
1007
|
+
failedToReadFile: "\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
1008
|
+
failedToWriteFile: "\u5199\u5165\u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
1009
|
+
failedToCopyFile: "\u590D\u5236\u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
1010
|
+
failedToRemoveFile: "\u5220\u9664\u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
1011
|
+
failedToReadDirectory: "\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25\uFF1A",
|
|
1012
|
+
failedToGetStats: "\u83B7\u53D6\u6587\u4EF6\u72B6\u6001\u5931\u8D25\uFF1A",
|
|
1013
|
+
sourceDirNotExist: "\u6E90\u76EE\u5F55\u4E0D\u5B58\u5728\uFF1A",
|
|
1014
|
+
memoryDirNotFound: "\u8BB0\u5FC6\u76EE\u5F55\u672A\u627E\u5230\uFF1A",
|
|
910
1015
|
// JSON config errors
|
|
911
|
-
invalidConfiguration: "
|
|
912
|
-
failedToParseJson: "
|
|
913
|
-
failedToBackupConfig: "
|
|
914
|
-
invalidEnvConfig: "
|
|
915
|
-
invalidApiUrl: "
|
|
916
|
-
invalidApiKey: "
|
|
917
|
-
invalidAuthToken: "
|
|
918
|
-
invalidPermissionsConfig: "
|
|
919
|
-
invalidPermissionsAllow: "
|
|
1016
|
+
invalidConfiguration: "\u914D\u7F6E\u65E0\u6548\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C",
|
|
1017
|
+
failedToParseJson: "\u89E3\u6790 JSON \u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
1018
|
+
failedToBackupConfig: "\u5907\u4EFD\u914D\u7F6E\u6587\u4EF6\u5931\u8D25\uFF1A",
|
|
1019
|
+
invalidEnvConfig: "\u65E0\u6548\u7684 env \u914D\u7F6E\uFF1A\u671F\u671B\u5BF9\u8C61",
|
|
1020
|
+
invalidApiUrl: "\u65E0\u6548\u7684 ANTHROPIC_BASE_URL\uFF1A\u671F\u671B\u5B57\u7B26\u4E32",
|
|
1021
|
+
invalidApiKey: "\u65E0\u6548\u7684 ANTHROPIC_API_KEY\uFF1A\u671F\u671B\u5B57\u7B26\u4E32",
|
|
1022
|
+
invalidAuthToken: "\u65E0\u6548\u7684 ANTHROPIC_AUTH_TOKEN\uFF1A\u671F\u671B\u5B57\u7B26\u4E32",
|
|
1023
|
+
invalidPermissionsConfig: "\u65E0\u6548\u7684\u6743\u9650\u914D\u7F6E\uFF1A\u671F\u671B\u5BF9\u8C61",
|
|
1024
|
+
invalidPermissionsAllow: "\u65E0\u6548\u7684 permissions.allow\uFF1A\u671F\u671B\u6570\u7EC4",
|
|
920
1025
|
// MCP errors
|
|
921
|
-
failedToAddOnboardingFlag: "
|
|
1026
|
+
failedToAddOnboardingFlag: "\u6DFB\u52A0 hasCompletedOnboarding \u6807\u5FD7\u5931\u8D25\uFF1A",
|
|
922
1027
|
// AI personality errors
|
|
923
|
-
failedToApplyPersonality: "
|
|
1028
|
+
failedToApplyPersonality: "\u5E94\u7528\u4E2A\u6027\u6307\u4EE4\u5931\u8D25\uFF1A"
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1031
|
+
const installation = {
|
|
1032
|
+
installPrompt: "\u68C0\u6D4B\u5230 Claude Code \u672A\u5B89\u88C5\uFF0C\u662F\u5426\u81EA\u52A8\u5B89\u88C5\uFF1F",
|
|
1033
|
+
installing: "\u6B63\u5728\u5B89\u88C5 Claude Code...",
|
|
1034
|
+
installSuccess: "Claude Code \u5B89\u88C5\u6210\u529F",
|
|
1035
|
+
alreadyInstalled: "Claude Code \u5DF2\u5B89\u88C5",
|
|
1036
|
+
installFailed: "Claude Code \u5B89\u88C5\u5931\u8D25",
|
|
1037
|
+
npmNotFound: "npm \u672A\u5B89\u88C5\u3002\u8BF7\u5148\u5B89\u88C5 Node.js \u548C npm\u3002",
|
|
1038
|
+
// Termux specific
|
|
1039
|
+
termuxDetected: "\u68C0\u6D4B\u5230 Termux \u73AF\u5883",
|
|
1040
|
+
termuxInstallHint: "\u5728 Termux \u4E2D\uFF0C\u8BF7\u5148\u8FD0\u884C: pkg install nodejs \u6216 pkg install nodejs-lts",
|
|
1041
|
+
termuxPathInfo: "\u4F7F\u7528 Termux \u8DEF\u5F84: {path}",
|
|
1042
|
+
termuxEnvironmentInfo: "Termux \u73AF\u5883\u901A\u8FC7 pkg \u7BA1\u7406\u5668\u63D0\u4F9B Node.js \u548C npm",
|
|
1043
|
+
// Windows specific
|
|
1044
|
+
windowsDetected: "\u68C0\u6D4B\u5230 Windows \u7CFB\u7EDF\uFF0C\u5C06\u81EA\u52A8\u914D\u7F6E\u517C\u5BB9\u683C\u5F0F"
|
|
924
1045
|
};
|
|
925
1046
|
|
|
926
|
-
const
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
custom: "Custom parameters"
|
|
1047
|
+
const language = {
|
|
1048
|
+
selectScriptLang: "\u9009\u62E9ZCF\u663E\u793A\u8BED\u8A00",
|
|
1049
|
+
selectConfigLang: "\u9009\u62E9 Claude Code \u914D\u7F6E\u8BED\u8A00",
|
|
1050
|
+
selectAiOutputLang: "\u9009\u62E9 AI \u8F93\u51FA\u8BED\u8A00",
|
|
1051
|
+
aiOutputLangHint: "AI \u5C06\u4F7F\u7528\u6B64\u8BED\u8A00\u56DE\u590D\u4F60\u7684\u95EE\u9898",
|
|
1052
|
+
enterCustomLanguage: "\u8BF7\u8F93\u5165\u81EA\u5B9A\u4E49\u8BED\u8A00\uFF08\u4F8B\u5982\uFF1AJapanese, French \u7B49\uFF09",
|
|
1053
|
+
languageChanged: "\u8BED\u8A00\u5DF2\u66F4\u6539",
|
|
1054
|
+
configLangHint: {
|
|
1055
|
+
"zh-CN": "\u4FBF\u4E8E\u4E2D\u6587\u7528\u6237\u81EA\u5B9A\u4E49",
|
|
1056
|
+
"en": "token \u6D88\u8017\u66F4\u4F4E"
|
|
937
1057
|
},
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1058
|
+
updateConfigLangPrompt: "\u9009\u62E9\u914D\u7F6E\u8BED\u8A00",
|
|
1059
|
+
updateConfigLangChoice: {
|
|
1060
|
+
"zh-CN": "\u4E2D\u6587\u7248\u914D\u7F6E",
|
|
1061
|
+
"en": "\u82F1\u6587\u7248\u914D\u7F6E"
|
|
1062
|
+
}
|
|
943
1063
|
};
|
|
944
1064
|
|
|
945
|
-
const
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
keepingExistingConfig: "Keeping existing configuration",
|
|
966
|
-
backupCcrConfig: "Backing up existing CCR configuration...",
|
|
967
|
-
ccrBackupSuccess: "CCR configuration backed up to: {path}",
|
|
968
|
-
ccrBackupFailed: "Failed to backup CCR configuration",
|
|
969
|
-
// Model selection
|
|
970
|
-
selectDefaultModelForProvider: "Select default model for {provider}:",
|
|
971
|
-
enterApiKeyForProvider: "Enter API key for {provider}:",
|
|
972
|
-
// Skip option
|
|
973
|
-
skipOption: "Skip, configure in CCR manually",
|
|
974
|
-
skipConfiguring: "Skipping preset configuration, will create empty configuration framework",
|
|
975
|
-
// Success/Error messages
|
|
976
|
-
ccrConfigSuccess: "CCR configuration saved",
|
|
977
|
-
proxyConfigSuccess: "Proxy settings configured",
|
|
978
|
-
ccrConfigFailed: "Failed to configure CCR",
|
|
979
|
-
ccrSetupComplete: "CCR setup complete",
|
|
980
|
-
fetchPresetsError: "Failed to fetch provider presets",
|
|
981
|
-
failedToStartCcrService: "Failed to start CCR service",
|
|
982
|
-
errorStartingCcrService: "Error starting CCR service",
|
|
983
|
-
// CCR service status
|
|
984
|
-
ccrRestartSuccess: "CCR service restarted",
|
|
985
|
-
ccrRestartFailed: "Failed to restart CCR service",
|
|
986
|
-
// Configuration tips
|
|
987
|
-
configTips: "Configuration Tips",
|
|
988
|
-
useClaudeCommand: "Use the claude command to start Claude Code (not ccr code)",
|
|
989
|
-
advancedConfigTip: "You can use the ccr ui command for advanced configuration",
|
|
990
|
-
manualConfigTip: "After manually modifying the configuration file, run ccr restart to apply changes",
|
|
991
|
-
// CCR Menu
|
|
992
|
-
ccrMenuTitle: "CCR - Claude Code Router Management",
|
|
993
|
-
ccrMenuOptions: {
|
|
994
|
-
initCcr: "Initialize CCR",
|
|
995
|
-
startUi: "Start CCR UI",
|
|
996
|
-
checkStatus: "Check CCR Status",
|
|
997
|
-
restart: "Restart CCR",
|
|
998
|
-
start: "Start CCR",
|
|
999
|
-
stop: "Stop CCR",
|
|
1000
|
-
back: "Back to Main Menu"
|
|
1065
|
+
const mcp = {
|
|
1066
|
+
configureMcp: "\u662F\u5426\u914D\u7F6E MCP \u670D\u52A1\uFF1F",
|
|
1067
|
+
selectMcpServices: "\u9009\u62E9\u8981\u5B89\u88C5\u7684 MCP \u670D\u52A1",
|
|
1068
|
+
allServices: "\u5168\u90E8\u5B89\u88C5",
|
|
1069
|
+
mcpServiceInstalled: "\u5DF2\u9009\u62E9\u7684 MCP \u670D\u52A1",
|
|
1070
|
+
enterExaApiKey: "\u8BF7\u8F93\u5165 Exa API Key\uFF08\u53EF\u4ECE https://dashboard.exa.ai/api-keys \u83B7\u53D6\uFF09",
|
|
1071
|
+
skipMcp: "\u8DF3\u8FC7 MCP \u914D\u7F6E",
|
|
1072
|
+
mcpConfigSuccess: "MCP \u670D\u52A1\u5DF2\u914D\u7F6E",
|
|
1073
|
+
mcpBackupSuccess: "\u5DF2\u5907\u4EFD\u539F\u6709 MCP \u914D\u7F6E",
|
|
1074
|
+
fixWindowsMcp: "\u4FEE\u590D Windows MCP \u914D\u7F6E",
|
|
1075
|
+
fixWindowsMcpDesc: "\u4FEE\u590D Windows \u5E73\u53F0 MCP \u547D\u4EE4\u914D\u7F6E\u95EE\u9898",
|
|
1076
|
+
windowsMcpFixed: "Windows MCP \u914D\u7F6E\u5DF2\u4FEE\u590D",
|
|
1077
|
+
configureMcpServices: "\u914D\u7F6E MCP \u670D\u52A1",
|
|
1078
|
+
selectMcpOption: "\u9009\u62E9 MCP \u914D\u7F6E\u9009\u9879"
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
const menu = {
|
|
1082
|
+
selectFunction: "\u8BF7\u9009\u62E9\u529F\u80FD",
|
|
1083
|
+
menuSections: {
|
|
1084
|
+
otherTools: "\u5176\u4ED6\u5DE5\u5177"
|
|
1001
1085
|
},
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1086
|
+
menuOptions: {
|
|
1087
|
+
fullInit: "\u5B8C\u6574\u521D\u59CB\u5316",
|
|
1088
|
+
importWorkflow: "\u5BFC\u5165\u5DE5\u4F5C\u6D41",
|
|
1089
|
+
configureApiOrCcr: "\u914D\u7F6E API \u6216 CCR \u4EE3\u7406",
|
|
1090
|
+
configureApi: "\u914D\u7F6E API",
|
|
1091
|
+
configureMcp: "\u914D\u7F6E MCP",
|
|
1092
|
+
configureModel: "\u914D\u7F6E\u9ED8\u8BA4\u6A21\u578B",
|
|
1093
|
+
configureAiMemory: "\u914D\u7F6E Claude \u5168\u5C40\u8BB0\u5FC6",
|
|
1094
|
+
configureEnvPermission: "\u5BFC\u5165\u63A8\u8350\u73AF\u5883\u53D8\u91CF\u548C\u6743\u9650\u914D\u7F6E",
|
|
1095
|
+
configureCcr: "\u914D\u7F6E\u6A21\u578B\u4EE3\u7406 (CCR)",
|
|
1096
|
+
ccrManagement: "CCR",
|
|
1097
|
+
ccusage: "ccusage",
|
|
1098
|
+
cometixLine: "CCometixLine",
|
|
1099
|
+
installBmad: "\u5B89\u88C5 BMad Method",
|
|
1100
|
+
clearCache: "\u6E05\u9664\u504F\u597D\u7F13\u5B58",
|
|
1101
|
+
checkUpdates: "\u68C0\u67E5\u66F4\u65B0",
|
|
1102
|
+
changeLanguage: "\u66F4\u6539\u663E\u793A\u8BED\u8A00 / Select display language",
|
|
1103
|
+
exit: "\u9000\u51FA"
|
|
1009
1104
|
},
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1105
|
+
menuDescriptions: {
|
|
1106
|
+
fullInit: "\u5B89\u88C5 Claude Code + \u5BFC\u5165\u5DE5\u4F5C\u6D41 + \u914D\u7F6E API \u6216 CCR \u4EE3\u7406 + \u914D\u7F6E MCP \u670D\u52A1",
|
|
1107
|
+
importWorkflow: "\u4EC5\u5BFC\u5165/\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173\u6587\u4EF6",
|
|
1108
|
+
configureApiOrCcr: "\u914D\u7F6E API URL\u3001\u8BA4\u8BC1\u4FE1\u606F\u6216 CCR \u4EE3\u7406",
|
|
1109
|
+
configureApi: "\u914D\u7F6E API URL \u548C\u8BA4\u8BC1\u4FE1\u606F",
|
|
1110
|
+
configureMcp: "\u914D\u7F6E MCP \u670D\u52A1\uFF08\u542B Windows \u4FEE\u590D\uFF09",
|
|
1111
|
+
configureModel: "\u8BBE\u7F6E\u9ED8\u8BA4\u6A21\u578B\uFF08opus/sonnet\uFF09",
|
|
1112
|
+
configureAiMemory: "\u914D\u7F6E AI \u8F93\u51FA\u8BED\u8A00\u548C\u89D2\u8272\u98CE\u683C",
|
|
1113
|
+
configureEnvPermission: "\u5BFC\u5165\u9690\u79C1\u4FDD\u62A4\u73AF\u5883\u53D8\u91CF\u548C\u7CFB\u7EDF\u6743\u9650\u914D\u7F6E",
|
|
1114
|
+
configureCcr: "\u914D\u7F6E Claude Code Router \u4EE5\u4F7F\u7528\u591A\u4E2A AI \u6A21\u578B",
|
|
1115
|
+
ccrManagement: "\u914D\u7F6E Claude Code Router \u4EE5\u4F7F\u7528\u591A\u4E2A AI \u6A21\u578B",
|
|
1116
|
+
ccusage: "Claude Code \u7528\u91CF\u5206\u6790",
|
|
1117
|
+
cometixLine: "\u57FA\u4E8E Rust \u7684\u9AD8\u6027\u80FD Claude Code \u72B6\u6001\u680F\u5DE5\u5177\uFF0C\u96C6\u6210 Git \u4FE1\u606F\u548C\u5B9E\u65F6\u4F7F\u7528\u91CF\u8DDF\u8E2A",
|
|
1118
|
+
installBmad: "AI \u9A71\u52A8\u7684\u5F00\u53D1\u65B9\u6CD5\u8BBA\u6846\u67B6",
|
|
1119
|
+
clearCache: "\u6E05\u9664\u504F\u597D\u8BED\u8A00\u7B49\u7F13\u5B58",
|
|
1120
|
+
checkUpdates: "\u68C0\u67E5\u5E76\u66F4\u65B0 Claude Code\u3001CCR \u548C CCometixLine \u7684\u7248\u672C",
|
|
1121
|
+
changeLanguage: "\u66F4\u6539 ZCF \u754C\u9762\u8BED\u8A00"
|
|
1122
|
+
}
|
|
1028
1123
|
};
|
|
1029
1124
|
|
|
1030
|
-
const
|
|
1031
|
-
//
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
installCometixPrompt: "Install CCometixLine - High-performance Claude Code statusline tool with Git integration and real-time usage tracking?",
|
|
1042
|
-
cometixSkipped: "CCometixLine installation skipped",
|
|
1043
|
-
// Commands
|
|
1044
|
-
installingOrUpdating: "Installing/updating CCometixLine...",
|
|
1045
|
-
installUpdateSuccess: "CCometixLine install/update completed",
|
|
1046
|
-
installUpdateFailed: "Failed to install/update CCometixLine",
|
|
1047
|
-
printingConfig: "Printing CCometixLine configuration...",
|
|
1048
|
-
printConfigSuccess: "Configuration printed successfully",
|
|
1049
|
-
printConfigFailed: "Failed to print configuration",
|
|
1050
|
-
enteringTuiConfig: "Entering CCometixLine TUI configuration mode...",
|
|
1051
|
-
tuiConfigSuccess: "TUI configuration completed successfully",
|
|
1052
|
-
tuiConfigFailed: "Failed to run TUI configuration",
|
|
1053
|
-
commandNotFound: "ccline command not found. Please install CCometixLine first.",
|
|
1054
|
-
// CCometixLine Menu
|
|
1055
|
-
cometixMenuTitle: "CCometixLine - High-performance Claude Code statusline tool with Git integration and real-time usage tracking",
|
|
1056
|
-
cometixMenuOptions: {
|
|
1057
|
-
installOrUpdate: "Install or Update",
|
|
1058
|
-
printConfig: "Print Default Configuration",
|
|
1059
|
-
customConfig: "Custom Config",
|
|
1060
|
-
back: "Back to Main Menu"
|
|
1125
|
+
const tools = {
|
|
1126
|
+
// CCUsage
|
|
1127
|
+
runningCcusage: "\u6B63\u5728\u8FD0\u884C Claude Code \u7528\u91CF\u5206\u6790\u5DE5\u5177...",
|
|
1128
|
+
ccusageDescription: "\u5206\u6790\u4EE4\u724C\u4F7F\u7528\u91CF\u548C\u6210\u672C - https://github.com/ryoppippi/ccusage",
|
|
1129
|
+
selectAnalysisMode: "\u9009\u62E9\u5206\u6790\u6A21\u5F0F:",
|
|
1130
|
+
ccusageModes: {
|
|
1131
|
+
daily: "\u6BCF\u65E5\u4F7F\u7528\u91CF",
|
|
1132
|
+
monthly: "\u6BCF\u6708\u4F7F\u7528\u91CF",
|
|
1133
|
+
session: "\u4F1A\u8BDD\u7EDF\u8BA1",
|
|
1134
|
+
blocks: "\u533A\u5757\u7EDF\u8BA1",
|
|
1135
|
+
custom: "\u81EA\u5B9A\u4E49\u53C2\u6570"
|
|
1061
1136
|
},
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1137
|
+
enterCustomArgs: "\u8F93\u5165\u81EA\u5B9A\u4E49\u53C2\u6570 (\u4F8B\u5982: daily --json):",
|
|
1138
|
+
pressEnterToContinue: "\u6309 Enter \u952E\u7EE7\u7EED...",
|
|
1139
|
+
ccusageFailed: "\u8FD0\u884C ccusage \u5931\u8D25",
|
|
1140
|
+
checkNetworkConnection: "\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5",
|
|
1141
|
+
errorDetails: "\u9519\u8BEF\u8BE6\u60C5:"
|
|
1067
1142
|
};
|
|
1068
1143
|
|
|
1069
1144
|
const updater = {
|
|
1070
|
-
checkingVersion: "
|
|
1071
|
-
checkingTools: "
|
|
1072
|
-
ccrNotInstalled: "CCR
|
|
1073
|
-
ccrUpToDate: "CCR
|
|
1074
|
-
claudeCodeNotInstalled: "Claude Code
|
|
1075
|
-
claudeCodeUpToDate: "Claude Code
|
|
1076
|
-
cometixLineNotInstalled: "CCometixLine
|
|
1077
|
-
cometixLineUpToDate: "CCometixLine
|
|
1078
|
-
cannotCheckVersion: "
|
|
1079
|
-
currentVersion: "
|
|
1080
|
-
latestVersion: "
|
|
1081
|
-
confirmUpdate: "
|
|
1082
|
-
updateSkipped: "
|
|
1083
|
-
updating: "
|
|
1084
|
-
updateSuccess: "{tool}
|
|
1085
|
-
updateFailed: "{tool}
|
|
1086
|
-
checkFailed: "
|
|
1145
|
+
checkingVersion: "\u6B63\u5728\u68C0\u67E5\u7248\u672C...",
|
|
1146
|
+
checkingTools: "\u68C0\u67E5\u5DE5\u5177\u7248\u672C",
|
|
1147
|
+
ccrNotInstalled: "CCR \u672A\u5B89\u88C5",
|
|
1148
|
+
ccrUpToDate: "CCR \u5DF2\u662F\u6700\u65B0\u7248\u672C (v{version})",
|
|
1149
|
+
claudeCodeNotInstalled: "Claude Code \u672A\u5B89\u88C5",
|
|
1150
|
+
claudeCodeUpToDate: "Claude Code \u5DF2\u662F\u6700\u65B0\u7248\u672C (v{version})",
|
|
1151
|
+
cometixLineNotInstalled: "CCometixLine \u672A\u5B89\u88C5",
|
|
1152
|
+
cometixLineUpToDate: "CCometixLine \u5DF2\u662F\u6700\u65B0\u7248\u672C (v{version})",
|
|
1153
|
+
cannotCheckVersion: "\u65E0\u6CD5\u68C0\u67E5\u6700\u65B0\u7248\u672C",
|
|
1154
|
+
currentVersion: "\u5F53\u524D\u7248\u672C: v{version}",
|
|
1155
|
+
latestVersion: "\u6700\u65B0\u7248\u672C: v{version}",
|
|
1156
|
+
confirmUpdate: "\u662F\u5426\u66F4\u65B0 {tool} \u5230\u6700\u65B0\u7248\u672C\uFF1F",
|
|
1157
|
+
updateSkipped: "\u5DF2\u8DF3\u8FC7\u66F4\u65B0",
|
|
1158
|
+
updating: "\u6B63\u5728\u66F4\u65B0 {tool}...",
|
|
1159
|
+
updateSuccess: "{tool} \u66F4\u65B0\u6210\u529F\uFF01",
|
|
1160
|
+
updateFailed: "{tool} \u66F4\u65B0\u5931\u8D25",
|
|
1161
|
+
checkFailed: "\u7248\u672C\u68C0\u67E5\u5931\u8D25"
|
|
1162
|
+
};
|
|
1163
|
+
|
|
1164
|
+
const workflow = {
|
|
1165
|
+
selectWorkflowType: "\u9009\u62E9\u8981\u5B89\u88C5\u7684\u5DE5\u4F5C\u6D41\u7C7B\u578B",
|
|
1166
|
+
workflowOption: {
|
|
1167
|
+
commonTools: "\u901A\u7528\u5DE5\u5177 (\u5C42\u7EA7\u76EE\u5F55\u521D\u59CB\u5316 + \u901A\u7528agents)",
|
|
1168
|
+
featPlanUx: "\u529F\u80FD\u89C4\u5212\u548C UX \u8BBE\u8BA1 (feat + planner + ui-ux-designer)",
|
|
1169
|
+
sixStepsWorkflow: "\u516D\u6B65\u5DE5\u4F5C\u6D41 (workflow)",
|
|
1170
|
+
bmadWorkflow: "BMAD-Method \u6269\u5C55\u5B89\u88C5\u5668 (\u652F\u6301\u654F\u6377\u5F00\u53D1\u5DE5\u4F5C\u6D41)",
|
|
1171
|
+
gitWorkflow: "Git \u6307\u4EE4 (commit + rollback + cleanBranches + worktree)"
|
|
1172
|
+
},
|
|
1173
|
+
workflowDescription: {
|
|
1174
|
+
commonTools: "\u63D0\u4F9B\u9879\u76EE\u521D\u59CB\u5316\u548C\u67B6\u6784\u5206\u6790\u5DE5\u5177\uFF0C\u5305\u542B\u5C42\u7EA7\u76EE\u5F55\u521D\u59CB\u5316\u547D\u4EE4\u548C\u667A\u80FD\u67B6\u6784\u5206\u6790\u4EE3\u7406",
|
|
1175
|
+
featPlanUx: "\u529F\u80FD\u89C4\u5212\u548C\u7528\u6237\u4F53\u9A8C\u8BBE\u8BA1\u5DE5\u4F5C\u6D41\uFF0C\u5305\u542B\u89C4\u5212\u4EE3\u7406\u548C UX \u8BBE\u8BA1\u4EE3\u7406",
|
|
1176
|
+
sixStepsWorkflow: "\u4E13\u4E1A\u5F00\u53D1\u52A9\u624B\u7684\u7ED3\u6784\u5316\u516D\u6B65\u5DE5\u4F5C\u6D41\u7A0B",
|
|
1177
|
+
bmadWorkflow: "BMAD-Method \u4F01\u4E1A\u7EA7\u654F\u6377\u5F00\u53D1\u5DE5\u4F5C\u6D41\u6269\u5C55",
|
|
1178
|
+
gitWorkflow: "Git \u7248\u672C\u63A7\u5236\u76F8\u5173\u547D\u4EE4\u96C6\u5408"
|
|
1179
|
+
},
|
|
1180
|
+
// BMAD workflow
|
|
1181
|
+
bmadInitPrompt: "\u2728 \u8BF7\u5728\u9879\u76EE\u4E2D\u8FD0\u884C /bmad-init \u547D\u4EE4\u6765\u521D\u59CB\u5316\u6216\u66F4\u65B0 BMAD-Method \u6269\u5C55",
|
|
1182
|
+
bmadInstallSuccess: "\u6210\u529F\u5B89\u88C5 BMAD-Method \u5B89\u88C5\u5668",
|
|
1183
|
+
// General workflow installation
|
|
1184
|
+
installingWorkflow: "\u6B63\u5728\u5B89\u88C5\u5DE5\u4F5C\u6D41",
|
|
1185
|
+
installedCommand: "\u5DF2\u5B89\u88C5\u547D\u4EE4",
|
|
1186
|
+
installedAgent: "\u5DF2\u5B89\u88C5\u4EE3\u7406",
|
|
1187
|
+
failedToInstallCommand: "\u5B89\u88C5\u547D\u4EE4\u5931\u8D25",
|
|
1188
|
+
failedToInstallAgent: "\u5B89\u88C5\u4EE3\u7406\u5931\u8D25",
|
|
1189
|
+
workflowInstallSuccess: "\u5DE5\u4F5C\u6D41\u5B89\u88C5\u6210\u529F",
|
|
1190
|
+
workflowInstallError: "\u5DE5\u4F5C\u6D41\u5B89\u88C5\u51FA\u9519",
|
|
1191
|
+
cleaningOldFiles: "\u6E05\u7406\u65E7\u7248\u672C\u6587\u4EF6",
|
|
1192
|
+
removedOldFile: "\u5DF2\u5220\u9664\u65E7\u6587\u4EF6"
|
|
1087
1193
|
};
|
|
1088
1194
|
|
|
1089
|
-
const
|
|
1195
|
+
const zhCN = {
|
|
1090
1196
|
common,
|
|
1091
1197
|
language,
|
|
1092
1198
|
installation,
|
|
@@ -1106,7 +1212,7 @@ const en = {
|
|
|
1106
1212
|
|
|
1107
1213
|
const I18N$1 = {
|
|
1108
1214
|
"zh-CN": zhCN,
|
|
1109
|
-
en
|
|
1215
|
+
"en": en
|
|
1110
1216
|
};
|
|
1111
1217
|
function getTranslation(lang) {
|
|
1112
1218
|
return I18N$1[lang];
|
|
@@ -1121,21 +1227,21 @@ const ZCF_CONFIG_FILE = join(CLAUDE_DIR, ".zcf-config.json");
|
|
|
1121
1227
|
const SUPPORTED_LANGS = ["zh-CN", "en"];
|
|
1122
1228
|
const LANG_LABELS = {
|
|
1123
1229
|
"zh-CN": "\u7B80\u4F53\u4E2D\u6587",
|
|
1124
|
-
en: "English"
|
|
1230
|
+
"en": "English"
|
|
1125
1231
|
};
|
|
1126
1232
|
const AI_OUTPUT_LANGUAGES = {
|
|
1127
1233
|
"zh-CN": { label: "\u7B80\u4F53\u4E2D\u6587", directive: "Always respond in Chinese-simplified" },
|
|
1128
|
-
en: { label: "English", directive: "Always respond in English" },
|
|
1129
|
-
custom: { label: "Custom", directive: "" }
|
|
1234
|
+
"en": { label: "English", directive: "Always respond in English" },
|
|
1235
|
+
"custom": { label: "Custom", directive: "" }
|
|
1130
1236
|
};
|
|
1131
1237
|
const I18N = I18N$1;
|
|
1132
1238
|
const MCP_SERVICES = [
|
|
1133
1239
|
{
|
|
1134
1240
|
id: "context7",
|
|
1135
|
-
name: { "zh-CN": "Context7 \u6587\u6863\u67E5\u8BE2", en: "Context7 Docs" },
|
|
1241
|
+
name: { "zh-CN": "Context7 \u6587\u6863\u67E5\u8BE2", "en": "Context7 Docs" },
|
|
1136
1242
|
description: {
|
|
1137
1243
|
"zh-CN": "\u67E5\u8BE2\u6700\u65B0\u7684\u5E93\u6587\u6863\u548C\u4EE3\u7801\u793A\u4F8B",
|
|
1138
|
-
en: "Query latest library documentation and code examples"
|
|
1244
|
+
"en": "Query latest library documentation and code examples"
|
|
1139
1245
|
},
|
|
1140
1246
|
requiresApiKey: false,
|
|
1141
1247
|
config: {
|
|
@@ -1147,10 +1253,10 @@ const MCP_SERVICES = [
|
|
|
1147
1253
|
},
|
|
1148
1254
|
{
|
|
1149
1255
|
id: "mcp-deepwiki",
|
|
1150
|
-
name: { "zh-CN": "DeepWiki", en: "DeepWiki" },
|
|
1256
|
+
name: { "zh-CN": "DeepWiki", "en": "DeepWiki" },
|
|
1151
1257
|
description: {
|
|
1152
1258
|
"zh-CN": "\u67E5\u8BE2 GitHub \u4ED3\u5E93\u6587\u6863\u548C\u793A\u4F8B",
|
|
1153
|
-
en: "Query GitHub repository documentation and examples"
|
|
1259
|
+
"en": "Query GitHub repository documentation and examples"
|
|
1154
1260
|
},
|
|
1155
1261
|
requiresApiKey: false,
|
|
1156
1262
|
config: {
|
|
@@ -1162,10 +1268,10 @@ const MCP_SERVICES = [
|
|
|
1162
1268
|
},
|
|
1163
1269
|
{
|
|
1164
1270
|
id: "Playwright",
|
|
1165
|
-
name: { "zh-CN": "Playwright \u6D4F\u89C8\u5668\u63A7\u5236", en: "Playwright Browser Control" },
|
|
1271
|
+
name: { "zh-CN": "Playwright \u6D4F\u89C8\u5668\u63A7\u5236", "en": "Playwright Browser Control" },
|
|
1166
1272
|
description: {
|
|
1167
1273
|
"zh-CN": "\u76F4\u63A5\u63A7\u5236\u6D4F\u89C8\u5668\u8FDB\u884C\u81EA\u52A8\u5316\u64CD\u4F5C",
|
|
1168
|
-
en: "Direct browser control for automation"
|
|
1274
|
+
"en": "Direct browser control for automation"
|
|
1169
1275
|
},
|
|
1170
1276
|
requiresApiKey: false,
|
|
1171
1277
|
config: {
|
|
@@ -1177,15 +1283,15 @@ const MCP_SERVICES = [
|
|
|
1177
1283
|
},
|
|
1178
1284
|
{
|
|
1179
1285
|
id: "exa",
|
|
1180
|
-
name: { "zh-CN": "Exa AI \u641C\u7D22", en: "Exa AI Search" },
|
|
1286
|
+
name: { "zh-CN": "Exa AI \u641C\u7D22", "en": "Exa AI Search" },
|
|
1181
1287
|
description: {
|
|
1182
1288
|
"zh-CN": "\u4F7F\u7528 Exa AI \u8FDB\u884C\u7F51\u9875\u641C\u7D22",
|
|
1183
|
-
en: "Web search using Exa AI"
|
|
1289
|
+
"en": "Web search using Exa AI"
|
|
1184
1290
|
},
|
|
1185
1291
|
requiresApiKey: true,
|
|
1186
1292
|
apiKeyPrompt: {
|
|
1187
1293
|
"zh-CN": "\u8BF7\u8F93\u5165 Exa API Key\uFF08\u53EF\u4ECE https://dashboard.exa.ai/api-keys \u83B7\u53D6\uFF09",
|
|
1188
|
-
en: "Enter Exa API Key (get from https://dashboard.exa.ai/api-keys)"
|
|
1294
|
+
"en": "Enter Exa API Key (get from https://dashboard.exa.ai/api-keys)"
|
|
1189
1295
|
},
|
|
1190
1296
|
apiKeyEnvVar: "EXA_API_KEY",
|
|
1191
1297
|
config: {
|
|
@@ -1276,6 +1382,19 @@ function getStats(path) {
|
|
|
1276
1382
|
);
|
|
1277
1383
|
}
|
|
1278
1384
|
}
|
|
1385
|
+
function removeFile(path) {
|
|
1386
|
+
try {
|
|
1387
|
+
if (exists(path)) {
|
|
1388
|
+
unlinkSync(path);
|
|
1389
|
+
}
|
|
1390
|
+
} catch (error) {
|
|
1391
|
+
throw new FileSystemError(
|
|
1392
|
+
`Failed to remove file: ${path}`,
|
|
1393
|
+
path,
|
|
1394
|
+
error
|
|
1395
|
+
);
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1279
1398
|
function copyDir(src, dest, options = {}) {
|
|
1280
1399
|
const { filter, overwrite = true } = options;
|
|
1281
1400
|
if (!exists(src)) {
|
|
@@ -1301,6 +1420,36 @@ function copyDir(src, dest, options = {}) {
|
|
|
1301
1420
|
}
|
|
1302
1421
|
}
|
|
1303
1422
|
|
|
1423
|
+
function readZcfConfig() {
|
|
1424
|
+
let config = readJsonConfig(ZCF_CONFIG_FILE);
|
|
1425
|
+
if (!config && existsSync(LEGACY_ZCF_CONFIG_FILE)) {
|
|
1426
|
+
config = readJsonConfig(LEGACY_ZCF_CONFIG_FILE);
|
|
1427
|
+
}
|
|
1428
|
+
return config;
|
|
1429
|
+
}
|
|
1430
|
+
async function readZcfConfigAsync() {
|
|
1431
|
+
return readZcfConfig();
|
|
1432
|
+
}
|
|
1433
|
+
function writeZcfConfig(config) {
|
|
1434
|
+
try {
|
|
1435
|
+
writeJsonConfig(ZCF_CONFIG_FILE, config);
|
|
1436
|
+
} catch {
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
function updateZcfConfig(updates) {
|
|
1440
|
+
const existingConfig = readZcfConfig();
|
|
1441
|
+
const newConfig = {
|
|
1442
|
+
version: updates.version || existingConfig?.version || "1.0.0",
|
|
1443
|
+
preferredLang: updates.preferredLang || existingConfig?.preferredLang || "en",
|
|
1444
|
+
aiOutputLang: updates.aiOutputLang || existingConfig?.aiOutputLang,
|
|
1445
|
+
aiPersonality: updates.aiPersonality !== void 0 ? updates.aiPersonality : existingConfig?.aiPersonality,
|
|
1446
|
+
outputStyles: updates.outputStyles !== void 0 ? updates.outputStyles : existingConfig?.outputStyles,
|
|
1447
|
+
defaultOutputStyle: updates.defaultOutputStyle !== void 0 ? updates.defaultOutputStyle : existingConfig?.defaultOutputStyle,
|
|
1448
|
+
lastUpdated: (/* @__PURE__ */ new Date()).toISOString()
|
|
1449
|
+
};
|
|
1450
|
+
writeZcfConfig(newConfig);
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1304
1453
|
function readJsonConfig(path, options = {}) {
|
|
1305
1454
|
const { defaultValue = null, validate, sanitize } = options;
|
|
1306
1455
|
if (!exists(path)) {
|
|
@@ -1311,7 +1460,7 @@ function readJsonConfig(path, options = {}) {
|
|
|
1311
1460
|
const data = JSON.parse(content);
|
|
1312
1461
|
if (validate && !validate(data)) {
|
|
1313
1462
|
const i18n = getTranslation(readZcfConfig()?.preferredLang || "en");
|
|
1314
|
-
console.
|
|
1463
|
+
console.log(`${i18n.configuration.invalidConfiguration} (${path})`);
|
|
1315
1464
|
return defaultValue;
|
|
1316
1465
|
}
|
|
1317
1466
|
if (sanitize) {
|
|
@@ -1351,34 +1500,6 @@ function backupJsonConfig(path, backupDir) {
|
|
|
1351
1500
|
}
|
|
1352
1501
|
}
|
|
1353
1502
|
|
|
1354
|
-
function readZcfConfig() {
|
|
1355
|
-
let config = readJsonConfig(ZCF_CONFIG_FILE);
|
|
1356
|
-
if (!config && existsSync(LEGACY_ZCF_CONFIG_FILE)) {
|
|
1357
|
-
config = readJsonConfig(LEGACY_ZCF_CONFIG_FILE);
|
|
1358
|
-
}
|
|
1359
|
-
return config;
|
|
1360
|
-
}
|
|
1361
|
-
async function readZcfConfigAsync() {
|
|
1362
|
-
return readZcfConfig();
|
|
1363
|
-
}
|
|
1364
|
-
function writeZcfConfig(config) {
|
|
1365
|
-
try {
|
|
1366
|
-
writeJsonConfig(ZCF_CONFIG_FILE, config);
|
|
1367
|
-
} catch (error) {
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
function updateZcfConfig(updates) {
|
|
1371
|
-
const existingConfig = readZcfConfig();
|
|
1372
|
-
const newConfig = {
|
|
1373
|
-
version: updates.version || existingConfig?.version || "1.0.0",
|
|
1374
|
-
preferredLang: updates.preferredLang || existingConfig?.preferredLang || "en",
|
|
1375
|
-
aiOutputLang: updates.aiOutputLang || existingConfig?.aiOutputLang,
|
|
1376
|
-
aiPersonality: updates.aiPersonality !== void 0 ? updates.aiPersonality : existingConfig?.aiPersonality,
|
|
1377
|
-
lastUpdated: (/* @__PURE__ */ new Date()).toISOString()
|
|
1378
|
-
};
|
|
1379
|
-
writeZcfConfig(newConfig);
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
1503
|
function addNumbersToChoices(choices, startFrom = 1, format = (n) => `${n}. `) {
|
|
1383
1504
|
let currentNumber = startFrom;
|
|
1384
1505
|
return choices.map((choice) => {
|
|
@@ -1394,141 +1515,158 @@ function addNumbersToChoices(choices, startFrom = 1, format = (n) => `${n}. `) {
|
|
|
1394
1515
|
});
|
|
1395
1516
|
}
|
|
1396
1517
|
|
|
1397
|
-
const
|
|
1518
|
+
const OUTPUT_STYLES = [
|
|
1519
|
+
// Custom styles (have template files)
|
|
1398
1520
|
{
|
|
1399
|
-
id: "professional",
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
"zh-CN": "\u4F60\u662F\u4E00\u540D\u7ECF\u9A8C\u4E30\u5BCC\u7684[\u4E13\u4E1A\u9886\u57DF\uFF0C\u4F8B\u5982\uFF1A\u8F6F\u4EF6\u5F00\u53D1\u5DE5\u7A0B\u5E08 / \u7CFB\u7EDF\u8BBE\u8BA1\u5E08 / \u4EE3\u7801\u67B6\u6784\u5E08]\uFF0C\u4E13\u6CE8\u4E8E\u6784\u5EFA[\u6838\u5FC3\u7279\u957F\uFF0C\u4F8B\u5982\uFF1A\u9AD8\u6027\u80FD / \u53EF\u7EF4\u62A4 / \u5065\u58EE / \u9886\u57DF\u9A71\u52A8]\u7684\u89E3\u51B3\u65B9\u6848\u3002",
|
|
1403
|
-
en: "You are an experienced [professional domain, e.g., Software Development Engineer / System Designer / Code Architect], specializing in building [core strengths, e.g., high-performance / maintainable / robust / domain-driven] solutions."
|
|
1404
|
-
}
|
|
1521
|
+
id: "engineer-professional",
|
|
1522
|
+
isCustom: true,
|
|
1523
|
+
filePath: "engineer-professional.md"
|
|
1405
1524
|
},
|
|
1406
1525
|
{
|
|
1407
|
-
id: "
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
"zh-CN": '\u4F60\u662F\u4E00\u4F4D\u53EF\u7231\u7684\u732B\u5A18\u7F16\u7A0B\u52A9\u624B\u55B5~ \u5728\u4FDD\u6301\u4E13\u4E1A\u7684\u540C\u65F6\uFF0C\u4F1A\u9002\u5F53\u5730\u4F7F\u7528"\u55B5"\u3001"nya"\u7B49\u8BED\u6C14\u8BCD\uFF0C\u8BA9\u5BF9\u8BDD\u66F4\u52A0\u8F7B\u677E\u6109\u5FEB\u55B5~',
|
|
1411
|
-
en: 'You are a cute catgirl programming assistant nya~ While maintaining professionalism, you occasionally use "nya", "meow" and similar expressions to make conversations more enjoyable nya~'
|
|
1412
|
-
}
|
|
1526
|
+
id: "nekomata-engineer",
|
|
1527
|
+
isCustom: true,
|
|
1528
|
+
filePath: "nekomata-engineer.md"
|
|
1413
1529
|
},
|
|
1414
1530
|
{
|
|
1415
|
-
id: "
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
"zh-CN": "\u4F60\u662F\u4E00\u4F4D\u53CB\u597D\u3001\u8010\u5FC3\u3001\u5584\u4E8E\u89E3\u91CA\u7684\u7F16\u7A0B\u52A9\u624B\u3002\u4F1A\u7528\u901A\u4FD7\u6613\u61C2\u7684\u65B9\u5F0F\u89E3\u91CA\u590D\u6742\u6982\u5FF5\uFF0C\u5E76\u7ECF\u5E38\u7ED9\u4E88\u9F13\u52B1\u3002",
|
|
1419
|
-
en: "You are a friendly, patient, and explanatory programming assistant. You explain complex concepts in easy-to-understand ways and often provide encouragement."
|
|
1420
|
-
}
|
|
1531
|
+
id: "laowang-engineer",
|
|
1532
|
+
isCustom: true,
|
|
1533
|
+
filePath: "laowang-engineer.md"
|
|
1421
1534
|
},
|
|
1535
|
+
// Built-in styles (no template files)
|
|
1422
1536
|
{
|
|
1423
|
-
id: "
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1537
|
+
id: "default",
|
|
1538
|
+
isCustom: false
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
id: "explanatory",
|
|
1542
|
+
isCustom: false
|
|
1429
1543
|
},
|
|
1430
1544
|
{
|
|
1431
|
-
id: "
|
|
1432
|
-
|
|
1433
|
-
directive: { "zh-CN": "", en: "" }
|
|
1545
|
+
id: "learning",
|
|
1546
|
+
isCustom: false
|
|
1434
1547
|
}
|
|
1435
1548
|
];
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
return
|
|
1439
|
-
}
|
|
1440
|
-
function getPersonalityInfo(personalityId) {
|
|
1441
|
-
return AI_PERSONALITIES.find((p) => p.id === personalityId);
|
|
1549
|
+
const LEGACY_FILES = ["personality.md", "rules.md", "technical-guides.md", "mcp.md", "language.md"];
|
|
1550
|
+
function getAvailableOutputStyles() {
|
|
1551
|
+
return OUTPUT_STYLES;
|
|
1442
1552
|
}
|
|
1443
|
-
async function
|
|
1444
|
-
const
|
|
1445
|
-
|
|
1446
|
-
const
|
|
1447
|
-
const
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
if (selected) {
|
|
1455
|
-
directive2 = selected.directive[scriptLang];
|
|
1456
|
-
} else {
|
|
1457
|
-
console.error(ansis.red(`Invalid personality: ${preselected}`));
|
|
1458
|
-
return;
|
|
1459
|
-
}
|
|
1553
|
+
async function copyOutputStyles(selectedStyles, lang) {
|
|
1554
|
+
const outputStylesDir = join(CLAUDE_DIR, "output-styles");
|
|
1555
|
+
ensureDir(outputStylesDir);
|
|
1556
|
+
const currentFilePath = fileURLToPath(import.meta.url);
|
|
1557
|
+
const distDir = dirname(dirname(currentFilePath));
|
|
1558
|
+
const rootDir = dirname(distDir);
|
|
1559
|
+
const templateDir = join(rootDir, "templates", lang, "output-styles");
|
|
1560
|
+
for (const styleId of selectedStyles) {
|
|
1561
|
+
const style = OUTPUT_STYLES.find((s) => s.id === styleId);
|
|
1562
|
+
if (!style || !style.isCustom || !style.filePath) {
|
|
1563
|
+
continue;
|
|
1460
1564
|
}
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
}
|
|
1466
|
-
if (showExisting && existingPersonality) {
|
|
1467
|
-
const personalityInfo = getPersonalityInfo(existingPersonality);
|
|
1468
|
-
if (personalityInfo) {
|
|
1469
|
-
console.log("\n" + ansis.blue(`\u2139 ${i18n.configuration.existingPersonality || "Existing AI personality configuration"}`));
|
|
1470
|
-
console.log(
|
|
1471
|
-
ansis.gray(` ${i18n.configuration.currentPersonality || "Current personality"}: ${personalityInfo.name[scriptLang]}`)
|
|
1472
|
-
);
|
|
1473
|
-
const { modify } = await inquirer.prompt({
|
|
1474
|
-
type: "confirm",
|
|
1475
|
-
name: "modify",
|
|
1476
|
-
message: i18n.configuration.modifyPersonality || "Modify AI personality?",
|
|
1477
|
-
default: false
|
|
1478
|
-
});
|
|
1479
|
-
if (!modify) {
|
|
1480
|
-
console.log(ansis.green(`\u2714 ${i18n.configuration.keepPersonality || "Keeping existing personality"}`));
|
|
1481
|
-
return;
|
|
1482
|
-
}
|
|
1565
|
+
const sourcePath = join(templateDir, style.filePath);
|
|
1566
|
+
const destPath = join(outputStylesDir, style.filePath);
|
|
1567
|
+
if (exists(sourcePath)) {
|
|
1568
|
+
copyFile(sourcePath, destPath);
|
|
1483
1569
|
}
|
|
1484
1570
|
}
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1571
|
+
}
|
|
1572
|
+
function setGlobalDefaultOutputStyle(styleId) {
|
|
1573
|
+
const existingSettings = readJsonConfig(SETTINGS_FILE) || {};
|
|
1574
|
+
const updatedSettings = {
|
|
1575
|
+
...existingSettings,
|
|
1576
|
+
outputStyle: styleId
|
|
1577
|
+
};
|
|
1578
|
+
writeJsonConfig(SETTINGS_FILE, updatedSettings);
|
|
1579
|
+
}
|
|
1580
|
+
function hasLegacyPersonalityFiles() {
|
|
1581
|
+
return LEGACY_FILES.some((filename) => exists(join(CLAUDE_DIR, filename)));
|
|
1582
|
+
}
|
|
1583
|
+
function cleanupLegacyPersonalityFiles() {
|
|
1584
|
+
LEGACY_FILES.forEach((filename) => {
|
|
1585
|
+
const filePath = join(CLAUDE_DIR, filename);
|
|
1586
|
+
if (exists(filePath)) {
|
|
1587
|
+
removeFile(filePath);
|
|
1588
|
+
}
|
|
1495
1589
|
});
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
const {
|
|
1503
|
-
type: "
|
|
1504
|
-
name: "
|
|
1505
|
-
message: i18n.configuration.
|
|
1506
|
-
|
|
1590
|
+
}
|
|
1591
|
+
async function configureOutputStyle(displayLang, configLang, preselectedStyles, preselectedDefault) {
|
|
1592
|
+
const i18n = getTranslation(displayLang);
|
|
1593
|
+
const availableStyles = getAvailableOutputStyles();
|
|
1594
|
+
if (hasLegacyPersonalityFiles() && !preselectedStyles) {
|
|
1595
|
+
console.log(ansis.yellow(`\u26A0\uFE0F ${i18n.configuration.legacyFilesDetected}`));
|
|
1596
|
+
const { cleanupLegacy } = await inquirer.prompt({
|
|
1597
|
+
type: "confirm",
|
|
1598
|
+
name: "cleanupLegacy",
|
|
1599
|
+
message: i18n.configuration.cleanupLegacyFiles,
|
|
1600
|
+
default: true
|
|
1601
|
+
});
|
|
1602
|
+
if (cleanupLegacy) {
|
|
1603
|
+
cleanupLegacyPersonalityFiles();
|
|
1604
|
+
console.log(ansis.green(`\u2714 ${i18n.configuration.legacyFilesRemoved}`));
|
|
1605
|
+
}
|
|
1606
|
+
} else if (hasLegacyPersonalityFiles() && preselectedStyles) {
|
|
1607
|
+
cleanupLegacyPersonalityFiles();
|
|
1608
|
+
}
|
|
1609
|
+
let selectedStyles;
|
|
1610
|
+
let defaultStyle;
|
|
1611
|
+
if (preselectedStyles && preselectedDefault) {
|
|
1612
|
+
selectedStyles = preselectedStyles;
|
|
1613
|
+
defaultStyle = preselectedDefault;
|
|
1614
|
+
} else {
|
|
1615
|
+
const customStyles = availableStyles.filter((style) => style.isCustom);
|
|
1616
|
+
const { selectedStyles: promptedStyles } = await inquirer.prompt({
|
|
1617
|
+
type: "checkbox",
|
|
1618
|
+
name: "selectedStyles",
|
|
1619
|
+
message: `${i18n.configuration.selectOutputStyles}${i18n.common.multiSelectHint}`,
|
|
1620
|
+
choices: addNumbersToChoices(customStyles.map((style) => ({
|
|
1621
|
+
name: `${i18n.configuration.outputStyles[style.id]?.name || style.id} - ${ansis.gray(i18n.configuration.outputStyles[style.id]?.description || "")}`,
|
|
1622
|
+
value: style.id,
|
|
1623
|
+
checked: true
|
|
1624
|
+
// Default select all custom styles
|
|
1625
|
+
}))),
|
|
1626
|
+
validate: (input) => input.length > 0 || i18n.configuration.selectAtLeastOne
|
|
1507
1627
|
});
|
|
1508
|
-
if (!
|
|
1628
|
+
if (!promptedStyles || promptedStyles.length === 0) {
|
|
1509
1629
|
console.log(ansis.yellow(i18n.common.cancelled));
|
|
1510
1630
|
return;
|
|
1511
1631
|
}
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1632
|
+
selectedStyles = promptedStyles;
|
|
1633
|
+
const { defaultStyle: promptedDefault } = await inquirer.prompt({
|
|
1634
|
+
type: "list",
|
|
1635
|
+
name: "defaultStyle",
|
|
1636
|
+
message: i18n.configuration.selectDefaultOutputStyle,
|
|
1637
|
+
choices: addNumbersToChoices([
|
|
1638
|
+
// Show selected custom styles first (only what user actually installed)
|
|
1639
|
+
...selectedStyles.map((styleId) => {
|
|
1640
|
+
return {
|
|
1641
|
+
name: `${i18n.configuration.outputStyles[styleId]?.name || styleId} - ${ansis.gray(i18n.configuration.outputStyles[styleId]?.description || "")}`,
|
|
1642
|
+
value: styleId,
|
|
1643
|
+
short: i18n.configuration.outputStyles[styleId]?.name || styleId
|
|
1644
|
+
};
|
|
1645
|
+
}),
|
|
1646
|
+
// Then show all built-in styles (always available)
|
|
1647
|
+
...availableStyles.filter((style) => !style.isCustom).map((style) => ({
|
|
1648
|
+
name: `${i18n.configuration.outputStyles[style.id]?.name || style.id} - ${ansis.gray(i18n.configuration.outputStyles[style.id]?.description || "")}`,
|
|
1649
|
+
value: style.id,
|
|
1650
|
+
short: i18n.configuration.outputStyles[style.id]?.name || style.id
|
|
1651
|
+
}))
|
|
1652
|
+
]),
|
|
1653
|
+
default: selectedStyles.includes("engineer-professional") ? "engineer-professional" : selectedStyles[0]
|
|
1654
|
+
});
|
|
1655
|
+
if (!promptedDefault) {
|
|
1656
|
+
console.log(ansis.yellow(i18n.common.cancelled));
|
|
1657
|
+
return;
|
|
1517
1658
|
}
|
|
1659
|
+
defaultStyle = promptedDefault;
|
|
1518
1660
|
}
|
|
1519
|
-
await
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
}
|
|
1528
|
-
const lang = readZcfConfig()?.preferredLang || "en";
|
|
1529
|
-
const errorI18n = getTranslation(lang);
|
|
1530
|
-
console.error(ansis.red(errorI18n.configuration.failedToApplyPersonality || "Failed to apply personality"), error);
|
|
1531
|
-
}
|
|
1661
|
+
await copyOutputStyles(selectedStyles, configLang);
|
|
1662
|
+
setGlobalDefaultOutputStyle(defaultStyle);
|
|
1663
|
+
updateZcfConfig({
|
|
1664
|
+
outputStyles: selectedStyles,
|
|
1665
|
+
defaultOutputStyle: defaultStyle
|
|
1666
|
+
});
|
|
1667
|
+
console.log(ansis.green(`\u2714 ${i18n.configuration.outputStyleInstalled}`));
|
|
1668
|
+
console.log(ansis.gray(` ${i18n.configuration.selectedStyles}: ${selectedStyles.join(", ")}`));
|
|
1669
|
+
console.log(ansis.gray(` ${i18n.configuration.defaultStyle}: ${defaultStyle}`));
|
|
1532
1670
|
}
|
|
1533
1671
|
|
|
1534
1672
|
function displayBanner(subtitle) {
|
|
@@ -1620,40 +1758,12 @@ function deepClone(obj) {
|
|
|
1620
1758
|
return obj;
|
|
1621
1759
|
}
|
|
1622
1760
|
|
|
1623
|
-
function cleanupPermissions(templatePermissions, userPermissions) {
|
|
1624
|
-
const templateSet = new Set(templatePermissions);
|
|
1625
|
-
const cleanedPermissions = userPermissions.filter((permission) => {
|
|
1626
|
-
if (["mcp__.*", "mcp__*", "mcp__(*)"].includes(permission)) {
|
|
1627
|
-
return false;
|
|
1628
|
-
}
|
|
1629
|
-
for (const templatePerm of templatePermissions) {
|
|
1630
|
-
if (permission === templatePerm) {
|
|
1631
|
-
continue;
|
|
1632
|
-
}
|
|
1633
|
-
if (permission.startsWith(templatePerm)) {
|
|
1634
|
-
return false;
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
return true;
|
|
1638
|
-
});
|
|
1639
|
-
const merged = [...templateSet];
|
|
1640
|
-
for (const permission of cleanedPermissions) {
|
|
1641
|
-
if (!templateSet.has(permission)) {
|
|
1642
|
-
merged.push(permission);
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
return merged;
|
|
1646
|
-
}
|
|
1647
|
-
function mergeAndCleanPermissions(templatePermissions, userPermissions) {
|
|
1648
|
-
const template = templatePermissions || [];
|
|
1649
|
-
const user = userPermissions || [];
|
|
1650
|
-
return cleanupPermissions(template, user);
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
1761
|
function getPlatform() {
|
|
1654
1762
|
const p = platform();
|
|
1655
|
-
if (p === "win32")
|
|
1656
|
-
|
|
1763
|
+
if (p === "win32")
|
|
1764
|
+
return "windows";
|
|
1765
|
+
if (p === "darwin")
|
|
1766
|
+
return "macos";
|
|
1657
1767
|
return "linux";
|
|
1658
1768
|
}
|
|
1659
1769
|
function isTermux() {
|
|
@@ -1786,6 +1896,36 @@ function addCompletedOnboarding() {
|
|
|
1786
1896
|
}
|
|
1787
1897
|
}
|
|
1788
1898
|
|
|
1899
|
+
function cleanupPermissions(templatePermissions, userPermissions) {
|
|
1900
|
+
const templateSet = new Set(templatePermissions);
|
|
1901
|
+
const cleanedPermissions = userPermissions.filter((permission) => {
|
|
1902
|
+
if (["mcp__.*", "mcp__*", "mcp__(*)"].includes(permission)) {
|
|
1903
|
+
return false;
|
|
1904
|
+
}
|
|
1905
|
+
for (const templatePerm of templatePermissions) {
|
|
1906
|
+
if (permission === templatePerm) {
|
|
1907
|
+
continue;
|
|
1908
|
+
}
|
|
1909
|
+
if (permission.startsWith(templatePerm)) {
|
|
1910
|
+
return false;
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
return true;
|
|
1914
|
+
});
|
|
1915
|
+
const merged = [...templateSet];
|
|
1916
|
+
for (const permission of cleanedPermissions) {
|
|
1917
|
+
if (!templateSet.has(permission)) {
|
|
1918
|
+
merged.push(permission);
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
return merged;
|
|
1922
|
+
}
|
|
1923
|
+
function mergeAndCleanPermissions(templatePermissions, userPermissions) {
|
|
1924
|
+
const template = templatePermissions || [];
|
|
1925
|
+
const user = userPermissions || [];
|
|
1926
|
+
return cleanupPermissions(template, user);
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1789
1929
|
function ensureClaudeDir() {
|
|
1790
1930
|
ensureDir(CLAUDE_DIR);
|
|
1791
1931
|
}
|
|
@@ -1803,46 +1943,25 @@ function backupExistingConfig() {
|
|
|
1803
1943
|
copyDir(CLAUDE_DIR, backupDir, { filter });
|
|
1804
1944
|
return backupDir;
|
|
1805
1945
|
}
|
|
1806
|
-
function copyConfigFiles(
|
|
1946
|
+
function copyConfigFiles(onlyMd = false) {
|
|
1807
1947
|
const currentFilePath = fileURLToPath(import.meta.url);
|
|
1808
1948
|
const distDir = dirname(dirname(currentFilePath));
|
|
1809
1949
|
const rootDir = dirname(distDir);
|
|
1810
1950
|
const baseTemplateDir = join(rootDir, "templates");
|
|
1811
|
-
copyClaudeMemoryFiles(lang, rootDir);
|
|
1812
1951
|
if (!onlyMd) {
|
|
1813
|
-
const baseSettingsPath = join(baseTemplateDir, "settings.json");
|
|
1952
|
+
const baseSettingsPath = join(baseTemplateDir, "common", "settings.json");
|
|
1814
1953
|
const destSettingsPath = join(CLAUDE_DIR, "settings.json");
|
|
1815
1954
|
if (exists(baseSettingsPath)) {
|
|
1816
1955
|
mergeSettingsFile(baseSettingsPath, destSettingsPath);
|
|
1817
1956
|
}
|
|
1818
1957
|
}
|
|
1819
|
-
const claudeMdSource = join(baseTemplateDir, "CLAUDE.md");
|
|
1820
|
-
const claudeMdDest = join(CLAUDE_DIR, "CLAUDE.md");
|
|
1821
|
-
if (exists(claudeMdSource)) {
|
|
1822
|
-
copyFile(claudeMdSource, claudeMdDest);
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
function copyClaudeMemoryFiles(lang, rootDir) {
|
|
1826
|
-
const memorySourceDir = join(rootDir, "templates", lang, "memory");
|
|
1827
|
-
if (!exists(memorySourceDir)) {
|
|
1828
|
-
const i18n = getTranslation(lang);
|
|
1829
|
-
throw new Error(`${i18n.configuration.memoryDirNotFound || "Memory directory not found:"} ${memorySourceDir}`);
|
|
1830
|
-
}
|
|
1831
|
-
const files = readDir(memorySourceDir);
|
|
1832
|
-
files?.forEach((file) => {
|
|
1833
|
-
if (file.endsWith(".md")) {
|
|
1834
|
-
const sourcePath = join(memorySourceDir, file);
|
|
1835
|
-
const destPath = join(CLAUDE_DIR, file);
|
|
1836
|
-
copyFile(sourcePath, destPath);
|
|
1837
|
-
}
|
|
1838
|
-
});
|
|
1839
1958
|
}
|
|
1840
1959
|
function getDefaultSettings() {
|
|
1841
1960
|
try {
|
|
1842
1961
|
const currentFilePath = fileURLToPath(import.meta.url);
|
|
1843
1962
|
const distDir = dirname(dirname(currentFilePath));
|
|
1844
1963
|
const rootDir = dirname(distDir);
|
|
1845
|
-
const templateSettingsPath = join(rootDir, "templates", "settings.json");
|
|
1964
|
+
const templateSettingsPath = join(rootDir, "templates", "common", "settings.json");
|
|
1846
1965
|
return readJsonConfig(templateSettingsPath) || {};
|
|
1847
1966
|
} catch (error) {
|
|
1848
1967
|
const lang = readZcfConfig()?.preferredLang || "en";
|
|
@@ -1852,7 +1971,8 @@ function getDefaultSettings() {
|
|
|
1852
1971
|
}
|
|
1853
1972
|
}
|
|
1854
1973
|
function configureApi(apiConfig) {
|
|
1855
|
-
if (!apiConfig)
|
|
1974
|
+
if (!apiConfig)
|
|
1975
|
+
return null;
|
|
1856
1976
|
let settings = getDefaultSettings();
|
|
1857
1977
|
const existingSettings = readJsonConfig(SETTINGS_FILE);
|
|
1858
1978
|
if (existingSettings) {
|
|
@@ -1882,7 +2002,8 @@ function configureApi(apiConfig) {
|
|
|
1882
2002
|
return apiConfig;
|
|
1883
2003
|
}
|
|
1884
2004
|
function mergeConfigs(sourceFile, targetFile) {
|
|
1885
|
-
if (!exists(sourceFile))
|
|
2005
|
+
if (!exists(sourceFile))
|
|
2006
|
+
return;
|
|
1886
2007
|
const target = readJsonConfig(targetFile) || {};
|
|
1887
2008
|
const source = readJsonConfig(sourceFile) || {};
|
|
1888
2009
|
const merged = deepMerge(target, source);
|
|
@@ -1940,7 +2061,7 @@ function mergeSettingsFile(templatePath, targetPath) {
|
|
|
1940
2061
|
if (exists(targetPath)) {
|
|
1941
2062
|
const lang2 = readZcfConfig()?.preferredLang || "en";
|
|
1942
2063
|
const i18n2 = getTranslation(lang2);
|
|
1943
|
-
console.
|
|
2064
|
+
console.log(i18n2.configuration.preservingExistingSettings || "Preserving existing settings");
|
|
1944
2065
|
} else {
|
|
1945
2066
|
copyFile(templatePath, targetPath);
|
|
1946
2067
|
}
|
|
@@ -1981,7 +2102,7 @@ function getExistingApiConfig() {
|
|
|
1981
2102
|
};
|
|
1982
2103
|
}
|
|
1983
2104
|
function applyAiLanguageDirective(aiOutputLang) {
|
|
1984
|
-
const
|
|
2105
|
+
const claudeFile = join(CLAUDE_DIR, "CLAUDE.md");
|
|
1985
2106
|
let directive = "";
|
|
1986
2107
|
if (aiOutputLang === "custom") {
|
|
1987
2108
|
return;
|
|
@@ -1990,7 +2111,7 @@ function applyAiLanguageDirective(aiOutputLang) {
|
|
|
1990
2111
|
} else {
|
|
1991
2112
|
directive = `Always respond in ${aiOutputLang}`;
|
|
1992
2113
|
}
|
|
1993
|
-
writeFile(
|
|
2114
|
+
writeFile(claudeFile, directive);
|
|
1994
2115
|
}
|
|
1995
2116
|
|
|
1996
2117
|
const PROVIDER_PRESETS_URL = "https://pub-0dc3e1677e894f07bbea11b17a29e032.r2.dev/providers.json";
|
|
@@ -2038,7 +2159,7 @@ async function fetchProviderPresets() {
|
|
|
2038
2159
|
}
|
|
2039
2160
|
}
|
|
2040
2161
|
return presets;
|
|
2041
|
-
} catch
|
|
2162
|
+
} catch {
|
|
2042
2163
|
return getFallbackPresets();
|
|
2043
2164
|
}
|
|
2044
2165
|
}
|
|
@@ -2052,7 +2173,7 @@ function getFallbackPresets() {
|
|
|
2052
2173
|
models: ["qwen3-coder-plus"],
|
|
2053
2174
|
description: "Alibaba DashScope",
|
|
2054
2175
|
transformer: {
|
|
2055
|
-
use: [["maxtoken", { max_tokens: 65536 }]],
|
|
2176
|
+
"use": [["maxtoken", { max_tokens: 65536 }]],
|
|
2056
2177
|
"qwen3-coder-plus": {
|
|
2057
2178
|
use: ["enhancetool"]
|
|
2058
2179
|
}
|
|
@@ -2066,7 +2187,7 @@ function getFallbackPresets() {
|
|
|
2066
2187
|
models: ["deepseek-chat", "deepseek-reasoner"],
|
|
2067
2188
|
description: "DeepSeek AI models",
|
|
2068
2189
|
transformer: {
|
|
2069
|
-
use: ["deepseek"],
|
|
2190
|
+
"use": ["deepseek"],
|
|
2070
2191
|
"deepseek-chat": {
|
|
2071
2192
|
use: ["tooluse"]
|
|
2072
2193
|
}
|
|
@@ -2091,7 +2212,7 @@ function getFallbackPresets() {
|
|
|
2091
2212
|
models: ["Qwen/Qwen3-Coder-480B-A35B-Instruct", "Qwen/Qwen3-235B-A22B-Thinking-2507", "ZhipuAI/GLM-4.5"],
|
|
2092
2213
|
description: "ModelScope AI models",
|
|
2093
2214
|
transformer: {
|
|
2094
|
-
use: [["maxtoken", { max_tokens: 65536 }]],
|
|
2215
|
+
"use": [["maxtoken", { max_tokens: 65536 }]],
|
|
2095
2216
|
"Qwen/Qwen3-Coder-480B-A35B-Instruct": {
|
|
2096
2217
|
use: ["enhancetool"]
|
|
2097
2218
|
},
|
|
@@ -2156,7 +2277,7 @@ function backupCcrConfig(scriptLang) {
|
|
|
2156
2277
|
if (!existsSync(CCR_CONFIG_FILE)) {
|
|
2157
2278
|
return null;
|
|
2158
2279
|
}
|
|
2159
|
-
const timestamp = dayjs().format("YYYY-MM-DDTHH-mm-ss-SSS")
|
|
2280
|
+
const timestamp = `${dayjs().format("YYYY-MM-DDTHH-mm-ss-SSS")}Z`;
|
|
2160
2281
|
const backupFileName = `config.json.${timestamp}.bak`;
|
|
2161
2282
|
const backupPath = join$1(CCR_BACKUP_DIR, backupFileName);
|
|
2162
2283
|
console.log(ansis.cyan(`${i18n.ccr.backupCcrConfig}`));
|
|
@@ -2418,7 +2539,7 @@ function format(template, replacements) {
|
|
|
2418
2539
|
});
|
|
2419
2540
|
}
|
|
2420
2541
|
|
|
2421
|
-
const execAsync$3 = promisify
|
|
2542
|
+
const execAsync$3 = promisify(exec$1);
|
|
2422
2543
|
async function getInstalledVersion(command) {
|
|
2423
2544
|
try {
|
|
2424
2545
|
let stdout;
|
|
@@ -2483,7 +2604,7 @@ async function checkCometixLineVersion() {
|
|
|
2483
2604
|
};
|
|
2484
2605
|
}
|
|
2485
2606
|
|
|
2486
|
-
const execAsync$2 = promisify
|
|
2607
|
+
const execAsync$2 = promisify(exec$1);
|
|
2487
2608
|
async function updateCcr(scriptLang, force = false) {
|
|
2488
2609
|
const i18n = getTranslation(scriptLang);
|
|
2489
2610
|
const spinner = ora(i18n.updater.checkingVersion).start();
|
|
@@ -2675,7 +2796,7 @@ async function installCcr(scriptLang) {
|
|
|
2675
2796
|
try {
|
|
2676
2797
|
await execAsync$1("npm uninstall -g claude-code-router");
|
|
2677
2798
|
console.log(ansis.green(`\u2714 ${i18n.ccr.uninstalledIncorrectPackage}`));
|
|
2678
|
-
} catch
|
|
2799
|
+
} catch {
|
|
2679
2800
|
console.log(ansis.yellow(`\u26A0 ${i18n.ccr.failedToUninstallIncorrectPackage}`));
|
|
2680
2801
|
}
|
|
2681
2802
|
} catch {
|
|
@@ -2696,16 +2817,6 @@ async function installCcr(scriptLang) {
|
|
|
2696
2817
|
}
|
|
2697
2818
|
}
|
|
2698
2819
|
|
|
2699
|
-
const COMETIX_PACKAGE_NAME = "@cometix/ccline";
|
|
2700
|
-
const COMETIX_COMMAND_NAME = "ccline";
|
|
2701
|
-
const COMETIX_COMMANDS = {
|
|
2702
|
-
CHECK_INSTALL: `npm list -g ${COMETIX_PACKAGE_NAME}`,
|
|
2703
|
-
INSTALL: `npm install -g ${COMETIX_PACKAGE_NAME}`,
|
|
2704
|
-
UPDATE: `npm update -g ${COMETIX_PACKAGE_NAME}`,
|
|
2705
|
-
PRINT_CONFIG: `${COMETIX_COMMAND_NAME} --print`,
|
|
2706
|
-
TUI_CONFIG: `${COMETIX_COMMAND_NAME} -c`
|
|
2707
|
-
};
|
|
2708
|
-
|
|
2709
2820
|
function getPlatformStatusLineConfig() {
|
|
2710
2821
|
return {
|
|
2711
2822
|
type: "command",
|
|
@@ -2736,11 +2847,21 @@ function hasCCometixLineConfig() {
|
|
|
2736
2847
|
}
|
|
2737
2848
|
const settings = readJsonConfig(SETTINGS_FILE);
|
|
2738
2849
|
return !!settings?.statusLine?.command?.includes("ccline");
|
|
2739
|
-
} catch
|
|
2850
|
+
} catch {
|
|
2740
2851
|
return false;
|
|
2741
2852
|
}
|
|
2742
2853
|
}
|
|
2743
2854
|
|
|
2855
|
+
const COMETIX_PACKAGE_NAME = "@cometix/ccline";
|
|
2856
|
+
const COMETIX_COMMAND_NAME = "ccline";
|
|
2857
|
+
const COMETIX_COMMANDS = {
|
|
2858
|
+
CHECK_INSTALL: `npm list -g ${COMETIX_PACKAGE_NAME}`,
|
|
2859
|
+
INSTALL: `npm install -g ${COMETIX_PACKAGE_NAME}`,
|
|
2860
|
+
UPDATE: `npm update -g ${COMETIX_PACKAGE_NAME}`,
|
|
2861
|
+
PRINT_CONFIG: `${COMETIX_COMMAND_NAME} --print`,
|
|
2862
|
+
TUI_CONFIG: `${COMETIX_COMMAND_NAME} -c`
|
|
2863
|
+
};
|
|
2864
|
+
|
|
2744
2865
|
const execAsync = promisify(exec$1);
|
|
2745
2866
|
async function isCometixLineInstalled() {
|
|
2746
2867
|
try {
|
|
@@ -2760,14 +2881,14 @@ async function installCometixLine(scriptLang) {
|
|
|
2760
2881
|
await execAsync(COMETIX_COMMANDS.INSTALL);
|
|
2761
2882
|
console.log(ansis.green(`\u2714 ${i18n.cometix.installUpdateSuccess}`));
|
|
2762
2883
|
} catch (error) {
|
|
2763
|
-
console.
|
|
2884
|
+
console.log(ansis.yellow(`\u26A0 ${i18n.cometix.installUpdateFailed}: ${error}`));
|
|
2764
2885
|
}
|
|
2765
2886
|
if (!hasCCometixLineConfig()) {
|
|
2766
2887
|
try {
|
|
2767
2888
|
addCCometixLineConfig();
|
|
2768
2889
|
console.log(ansis.green(`\u2714 ${i18n.cometix.statusLineConfigured || "Claude Code statusLine configured"}`));
|
|
2769
2890
|
} catch (error) {
|
|
2770
|
-
console.
|
|
2891
|
+
console.log(ansis.yellow(`\u26A0 ${i18n.cometix.statusLineConfigFailed || "Failed to configure statusLine"}: ${error}`));
|
|
2771
2892
|
}
|
|
2772
2893
|
} else {
|
|
2773
2894
|
console.log(ansis.blue(`\u2139 ${i18n.cometix.statusLineAlreadyConfigured || "Claude Code statusLine already configured"}`));
|
|
@@ -2782,7 +2903,7 @@ async function installCometixLine(scriptLang) {
|
|
|
2782
2903
|
addCCometixLineConfig();
|
|
2783
2904
|
console.log(ansis.green(`\u2714 ${i18n.cometix.statusLineConfigured || "Claude Code statusLine configured"}`));
|
|
2784
2905
|
} catch (configError) {
|
|
2785
|
-
console.
|
|
2906
|
+
console.log(ansis.yellow(`\u26A0 ${i18n.cometix.statusLineConfigFailed || "Failed to configure statusLine"}: ${configError}`));
|
|
2786
2907
|
console.log(ansis.blue(`\u{1F4A1} ${i18n.cometix.statusLineManualConfig || "Please manually add statusLine configuration to Claude Code settings"}`));
|
|
2787
2908
|
}
|
|
2788
2909
|
} catch (error) {
|
|
@@ -2839,9 +2960,10 @@ async function configureApiCompletely(i18n, scriptLang, preselectedAuthType) {
|
|
|
2839
2960
|
name: "url",
|
|
2840
2961
|
message: i18n.api.enterApiUrl,
|
|
2841
2962
|
validate: (value) => {
|
|
2842
|
-
if (!value)
|
|
2963
|
+
if (!value)
|
|
2964
|
+
return i18n.api.urlRequired;
|
|
2843
2965
|
try {
|
|
2844
|
-
new URL(value);
|
|
2966
|
+
void new URL(value);
|
|
2845
2967
|
return true;
|
|
2846
2968
|
} catch {
|
|
2847
2969
|
return i18n.api.invalidUrl;
|
|
@@ -2902,9 +3024,10 @@ async function modifyApiConfigPartially(existingConfig, i18n, scriptLang) {
|
|
|
2902
3024
|
message: i18n.api.enterNewApiUrl.replace("{url}", currentConfig.url || i18n.common.none),
|
|
2903
3025
|
default: currentConfig.url,
|
|
2904
3026
|
validate: (value) => {
|
|
2905
|
-
if (!value)
|
|
3027
|
+
if (!value)
|
|
3028
|
+
return i18n.api.urlRequired;
|
|
2906
3029
|
try {
|
|
2907
|
-
new URL(value);
|
|
3030
|
+
void new URL(value);
|
|
2908
3031
|
return true;
|
|
2909
3032
|
} catch {
|
|
2910
3033
|
return i18n.api.invalidUrl;
|
|
@@ -2978,13 +3101,18 @@ async function updatePromptOnly(configLang, scriptLang, aiOutputLang) {
|
|
|
2978
3101
|
if (backupDir) {
|
|
2979
3102
|
console.log(ansis.gray(`\u2714 ${i18n.configuration.backupSuccess}: ${backupDir}`));
|
|
2980
3103
|
}
|
|
2981
|
-
copyConfigFiles(configLang, true);
|
|
2982
3104
|
if (aiOutputLang) {
|
|
2983
3105
|
applyAiLanguageDirective(aiOutputLang);
|
|
2984
3106
|
}
|
|
2985
|
-
await
|
|
3107
|
+
await configureOutputStyle(
|
|
3108
|
+
scriptLang,
|
|
3109
|
+
// Display language for UI
|
|
3110
|
+
configLang
|
|
3111
|
+
// Config language for templates
|
|
3112
|
+
);
|
|
2986
3113
|
console.log(ansis.green(`\u2714 ${i18n.configuration.configSuccess} ${CLAUDE_DIR}`));
|
|
2987
|
-
console.log(
|
|
3114
|
+
console.log(`
|
|
3115
|
+
${ansis.cyan(i18n.common.complete)}`);
|
|
2988
3116
|
}
|
|
2989
3117
|
|
|
2990
3118
|
function handleExitPromptError(error) {
|
|
@@ -3092,7 +3220,7 @@ async function selectAiOutputLanguage(scriptLang, defaultLang) {
|
|
|
3092
3220
|
console.log(ansis.yellow(i18n.common.cancelled));
|
|
3093
3221
|
process.exit(0);
|
|
3094
3222
|
}
|
|
3095
|
-
|
|
3223
|
+
const aiOutputLang = lang;
|
|
3096
3224
|
if (aiOutputLang === "custom") {
|
|
3097
3225
|
const { customLang } = await inquirer.prompt({
|
|
3098
3226
|
type: "input",
|
|
@@ -3282,7 +3410,7 @@ async function cleanupOldVersionFiles(scriptLang) {
|
|
|
3282
3410
|
try {
|
|
3283
3411
|
await rm(file, { force: true });
|
|
3284
3412
|
console.log(ansis.gray(` \u2714 ${i18n.workflow.removedOldFile || "Removed old file"}: ${file.replace(CLAUDE_DIR, "~/.claude")}`));
|
|
3285
|
-
} catch
|
|
3413
|
+
} catch {
|
|
3286
3414
|
console.error(ansis.yellow(` \u26A0 ${i18n.workflow.failedToRemoveFile || "Failed to remove"}: ${file.replace(CLAUDE_DIR, "~/.claude")}`));
|
|
3287
3415
|
}
|
|
3288
3416
|
}
|
|
@@ -3292,7 +3420,7 @@ async function cleanupOldVersionFiles(scriptLang) {
|
|
|
3292
3420
|
try {
|
|
3293
3421
|
await rm(file, { force: true });
|
|
3294
3422
|
console.log(ansis.gray(` \u2714 ${i18n.workflow.removedOldFile || "Removed old file"}: ${file.replace(CLAUDE_DIR, "~/.claude")}`));
|
|
3295
|
-
} catch
|
|
3423
|
+
} catch {
|
|
3296
3424
|
console.error(ansis.yellow(` \u26A0 ${i18n.workflow.failedToRemoveFile || "Failed to remove"}: ${file.replace(CLAUDE_DIR, "~/.claude")}`));
|
|
3297
3425
|
}
|
|
3298
3426
|
}
|
|
@@ -3323,8 +3451,20 @@ function validateSkipPromptOptions(options) {
|
|
|
3323
3451
|
if (!options.aiOutputLang) {
|
|
3324
3452
|
options.aiOutputLang = "en";
|
|
3325
3453
|
}
|
|
3326
|
-
if (
|
|
3327
|
-
options.
|
|
3454
|
+
if (typeof options.outputStyles === "string") {
|
|
3455
|
+
if (options.outputStyles === "skip") {
|
|
3456
|
+
options.outputStyles = false;
|
|
3457
|
+
} else if (options.outputStyles === "all") {
|
|
3458
|
+
options.outputStyles = ["engineer-professional", "nekomata-engineer", "laowang-engineer"];
|
|
3459
|
+
} else {
|
|
3460
|
+
options.outputStyles = options.outputStyles.split(",").map((s) => s.trim());
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3463
|
+
if (options.outputStyles === void 0) {
|
|
3464
|
+
options.outputStyles = ["engineer-professional", "nekomata-engineer", "laowang-engineer"];
|
|
3465
|
+
}
|
|
3466
|
+
if (!options.defaultOutputStyle) {
|
|
3467
|
+
options.defaultOutputStyle = "engineer-professional";
|
|
3328
3468
|
}
|
|
3329
3469
|
if (typeof options.installCometixLine === "string") {
|
|
3330
3470
|
options.installCometixLine = options.installCometixLine.toLowerCase() === "true";
|
|
@@ -3365,6 +3505,20 @@ function validateSkipPromptOptions(options) {
|
|
|
3365
3505
|
}
|
|
3366
3506
|
}
|
|
3367
3507
|
}
|
|
3508
|
+
if (Array.isArray(options.outputStyles)) {
|
|
3509
|
+
const validStyles = ["engineer-professional", "nekomata-engineer", "laowang-engineer", "default", "explanatory", "learning"];
|
|
3510
|
+
for (const style of options.outputStyles) {
|
|
3511
|
+
if (!validStyles.includes(style)) {
|
|
3512
|
+
throw new Error(`Invalid output style: ${style}. Available styles: ${validStyles.join(", ")}`);
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3515
|
+
}
|
|
3516
|
+
if (options.defaultOutputStyle) {
|
|
3517
|
+
const validStyles = ["engineer-professional", "nekomata-engineer", "laowang-engineer", "default", "explanatory", "learning"];
|
|
3518
|
+
if (!validStyles.includes(options.defaultOutputStyle)) {
|
|
3519
|
+
throw new Error(`Invalid default output style: ${options.defaultOutputStyle}. Available styles: ${validStyles.join(", ")}`);
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3368
3522
|
if (typeof options.workflows === "string") {
|
|
3369
3523
|
if (options.workflows === "skip") {
|
|
3370
3524
|
options.workflows = false;
|
|
@@ -3532,7 +3686,8 @@ async function init(options = {}) {
|
|
|
3532
3686
|
} else {
|
|
3533
3687
|
const existingApiConfig = getExistingApiConfig();
|
|
3534
3688
|
if (existingApiConfig) {
|
|
3535
|
-
console.log(
|
|
3689
|
+
console.log(`
|
|
3690
|
+
${ansis.blue(`\u2139 ${i18n.api.existingApiConfig}`)}`);
|
|
3536
3691
|
console.log(ansis.gray(` ${i18n.api.apiConfigUrl}: ${existingApiConfig.url || i18n.common.notConfigured}`));
|
|
3537
3692
|
console.log(
|
|
3538
3693
|
ansis.gray(
|
|
@@ -3642,7 +3797,7 @@ async function init(options = {}) {
|
|
|
3642
3797
|
}
|
|
3643
3798
|
}
|
|
3644
3799
|
if (action === "docs-only") {
|
|
3645
|
-
copyConfigFiles(
|
|
3800
|
+
copyConfigFiles(true);
|
|
3646
3801
|
if (options.skipPrompt) {
|
|
3647
3802
|
if (options.workflows !== false) {
|
|
3648
3803
|
await selectAndInstallWorkflows(configLang, scriptLang, options.workflows);
|
|
@@ -3651,7 +3806,7 @@ async function init(options = {}) {
|
|
|
3651
3806
|
await selectAndInstallWorkflows(configLang, scriptLang);
|
|
3652
3807
|
}
|
|
3653
3808
|
} else if (["backup", "merge", "new"].includes(action)) {
|
|
3654
|
-
copyConfigFiles(
|
|
3809
|
+
copyConfigFiles(false);
|
|
3655
3810
|
if (options.skipPrompt) {
|
|
3656
3811
|
if (options.workflows !== false) {
|
|
3657
3812
|
await selectAndInstallWorkflows(configLang, scriptLang, options.workflows);
|
|
@@ -3662,9 +3817,23 @@ async function init(options = {}) {
|
|
|
3662
3817
|
}
|
|
3663
3818
|
applyAiLanguageDirective(aiOutputLang);
|
|
3664
3819
|
if (options.skipPrompt) {
|
|
3665
|
-
|
|
3820
|
+
if (options.outputStyles !== false) {
|
|
3821
|
+
await configureOutputStyle(
|
|
3822
|
+
scriptLang,
|
|
3823
|
+
// Display language for UI
|
|
3824
|
+
configLang,
|
|
3825
|
+
// Config language for templates
|
|
3826
|
+
options.outputStyles,
|
|
3827
|
+
options.defaultOutputStyle
|
|
3828
|
+
);
|
|
3829
|
+
}
|
|
3666
3830
|
} else {
|
|
3667
|
-
await
|
|
3831
|
+
await configureOutputStyle(
|
|
3832
|
+
scriptLang,
|
|
3833
|
+
// Display language for UI
|
|
3834
|
+
configLang
|
|
3835
|
+
// Config language for templates
|
|
3836
|
+
);
|
|
3668
3837
|
}
|
|
3669
3838
|
if (apiConfig && action !== "docs-only") {
|
|
3670
3839
|
const configuredApi = configureApi(apiConfig);
|
|
@@ -3712,7 +3881,8 @@ async function init(options = {}) {
|
|
|
3712
3881
|
const newServers = {};
|
|
3713
3882
|
for (const serviceId of selectedServices) {
|
|
3714
3883
|
const service = MCP_SERVICES.find((s) => s.id === serviceId);
|
|
3715
|
-
if (!service)
|
|
3884
|
+
if (!service)
|
|
3885
|
+
continue;
|
|
3716
3886
|
let config = service.config;
|
|
3717
3887
|
if (service.requiresApiKey) {
|
|
3718
3888
|
if (options.skipPrompt) {
|
|
@@ -3778,7 +3948,8 @@ async function init(options = {}) {
|
|
|
3778
3948
|
aiOutputLang
|
|
3779
3949
|
});
|
|
3780
3950
|
console.log(ansis.green(`\u2714 ${i18n.configuration.configSuccess} ${CLAUDE_DIR}`));
|
|
3781
|
-
console.log(
|
|
3951
|
+
console.log(`
|
|
3952
|
+
${ansis.cyan(i18n.common.complete)}`);
|
|
3782
3953
|
} catch (error) {
|
|
3783
3954
|
if (!handleExitPromptError(error)) {
|
|
3784
3955
|
handleGeneralError(error, options.lang);
|
|
@@ -3788,7 +3959,7 @@ async function init(options = {}) {
|
|
|
3788
3959
|
|
|
3789
3960
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
3790
3961
|
function getTemplateSettings() {
|
|
3791
|
-
const templatePath = join(__dirname, "../../templates/settings.json");
|
|
3962
|
+
const templatePath = join(__dirname, "../../templates/common/settings.json");
|
|
3792
3963
|
const content = readFileSync(templatePath, "utf-8");
|
|
3793
3964
|
return JSON.parse(content);
|
|
3794
3965
|
}
|
|
@@ -3851,7 +4022,7 @@ async function openSettingsJson() {
|
|
|
3851
4022
|
}
|
|
3852
4023
|
try {
|
|
3853
4024
|
await exec(command, [SETTINGS_FILE]);
|
|
3854
|
-
} catch
|
|
4025
|
+
} catch {
|
|
3855
4026
|
try {
|
|
3856
4027
|
await exec("code", [SETTINGS_FILE]);
|
|
3857
4028
|
} catch {
|
|
@@ -3864,4 +4035,4 @@ async function openSettingsJson() {
|
|
|
3864
4035
|
}
|
|
3865
4036
|
}
|
|
3866
4037
|
|
|
3867
|
-
export {
|
|
4038
|
+
export { modifyApiConfigPartially as $, AI_OUTPUT_LANGUAGES as A, writeMcpConfig as B, CLAUDE_DIR as C, backupMcpConfig as D, mergeMcpServers as E, buildMcpServerConfig as F, fixWindowsMcpConfig as G, addCompletedOnboarding as H, I18N as I, readCcrConfig as J, isCcrInstalled as K, LEGACY_ZCF_CONFIG_FILE as L, MCP_SERVICES as M, installCcr as N, configureCcrFeature as O, handleExitPromptError as P, handleGeneralError as Q, getTranslation as R, SETTINGS_FILE as S, addNumbersToChoices as T, updateZcfConfig as U, readZcfConfig as V, configureOutputStyle as W, isWindows as X, selectMcpServices as Y, ZCF_CONFIG_FILE as Z, formatApiKeyDisplay as _, commandExists as a, setupCcrConfiguration as a0, validateApiKey as a1, readZcfConfigAsync as a2, COMETIX_COMMAND_NAME as a3, COMETIX_COMMANDS as a4, installCometixLine as a5, selectScriptLanguage as a6, checkAndUpdateTools as a7, displayBanner as a8, resolveAiOutputLanguage as a9, updatePromptOnly as aa, selectAndInstallWorkflows as ab, version as ac, displayBannerWithInfo as ad, prompts as ae, importRecommendedEnv as b, cleanupPermissions as c, importRecommendedPermissions as d, CLAUDE_MD_FILE as e, ClAUDE_CONFIG_FILE as f, getPlatform as g, SUPPORTED_LANGS as h, init as i, LANG_LABELS as j, ensureClaudeDir as k, backupExistingConfig as l, mergeAndCleanPermissions as m, copyConfigFiles as n, openSettingsJson as o, configureApi as p, mergeConfigs as q, mergeSettingsFile as r, getExistingModelConfig as s, getExistingApiConfig as t, updateDefaultModel as u, applyAiLanguageDirective as v, isClaudeCodeInstalled as w, installClaudeCode as x, getMcpConfigPath as y, readMcpConfig as z };
|