ccjk 13.6.4 → 13.6.7
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/dist/chunks/agents.mjs +1 -1
- package/dist/chunks/api-config-selector.mjs +6 -4
- package/dist/chunks/auto-updater.mjs +100 -2
- package/dist/chunks/banner.mjs +0 -16
- package/dist/chunks/ccjk-mcp.mjs +2 -2
- package/dist/chunks/ccr.mjs +6 -4
- package/dist/chunks/check-updates.mjs +28 -17
- package/dist/chunks/claude-code-config-manager.mjs +3 -1
- package/dist/chunks/claude-code-incremental-manager.mjs +46 -20
- package/dist/chunks/claude-config.mjs +52 -2
- package/dist/chunks/claude-wrapper.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +25 -83
- package/dist/chunks/codex-config-switch.mjs +3 -2
- package/dist/chunks/codex-provider-manager.mjs +1 -0
- package/dist/chunks/codex.mjs +3 -359
- package/dist/chunks/config-switch.mjs +23 -10
- package/dist/chunks/config.mjs +1 -1
- package/dist/chunks/config2.mjs +3 -3
- package/dist/chunks/constants.mjs +179 -3
- package/dist/chunks/doctor.mjs +1 -1
- package/dist/chunks/features.mjs +76 -11
- package/dist/chunks/index10.mjs +55 -36
- package/dist/chunks/init.mjs +120 -61
- package/dist/chunks/installer.mjs +80 -19
- package/dist/chunks/mcp-cli.mjs +17 -16
- package/dist/chunks/mcp.mjs +8 -7
- package/dist/chunks/memory-check.mjs +1 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/platform.mjs +5 -1
- package/dist/chunks/quick-setup.mjs +13 -11
- package/dist/chunks/research.mjs +1177 -0
- package/dist/chunks/sessions.mjs +1 -1
- package/dist/chunks/smart-defaults.mjs +42 -14
- package/dist/chunks/uninstall.mjs +2 -2
- package/dist/chunks/update.mjs +14 -13
- package/dist/chunks/version-checker.mjs +11 -1
- package/dist/cli.mjs +32 -0
- package/dist/i18n/locales/en/cli.json +0 -4
- package/dist/i18n/locales/en/menu.json +3 -3
- package/dist/i18n/locales/en/notification.json +2 -2
- package/dist/i18n/locales/zh-CN/cli.json +0 -4
- package/dist/i18n/locales/zh-CN/menu.json +3 -3
- package/dist/i18n/locales/zh-CN/notification.json +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +8 -174
- package/dist/shared/{ccjk.DvAP4XfP.mjs → ccjk.B4aXNclK.mjs} +2 -2
- package/dist/shared/ccjk.BI-hdI7P.mjs +30 -0
- package/dist/shared/{ccjk.DwSebGy0.mjs → ccjk.BOO14f66.mjs} +1 -1
- package/dist/shared/ccjk.BnsY5WxD.mjs +171 -0
- package/dist/shared/{ccjk.C4m4ypdk.mjs → ccjk.DHaUdzX3.mjs} +4 -3
- package/dist/shared/ccjk.DKXs7Fbm.mjs +361 -0
- package/dist/shared/{ccjk.BP5hsTZQ.mjs → ccjk.Dz0ssUQx.mjs} +1 -1
- package/dist/shared/ccjk.yYQMbHH3.mjs +115 -0
- package/package.json +70 -65
- package/templates/common/workflow/essential/en/feat.md +68 -291
- package/templates/common/workflow/sixStep/en/workflow.md +56 -330
- package/dist/shared/ccjk.CiKtBUW_.mjs +0 -54
package/dist/chunks/config.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { i as inquirer } from './index6.mjs';
|
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
import { CLAUDE_DIR, SETTINGS_FILE, CLAUDE_VSC_CONFIG_FILE, AI_OUTPUT_LANGUAGES } from './constants.mjs';
|
|
6
6
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
7
|
-
import {
|
|
7
|
+
import { d as setPrimaryApiKey, e as addCompletedOnboarding, g as deepMerge } from './claude-config.mjs';
|
|
8
8
|
import { exists, ensureDir, copyDir, writeFileAtomic, copyFile } from './fs-operations.mjs';
|
|
9
9
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
10
10
|
import { m as mergeAndCleanPermissions } from '../shared/ccjk.DScm_NnL.mjs';
|
package/dist/chunks/config2.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { d as dayjs } from '../shared/ccjk.RyizuzOI.mjs';
|
|
|
8
8
|
import { i as inquirer } from './index6.mjs';
|
|
9
9
|
import { SETTINGS_FILE } from './constants.mjs';
|
|
10
10
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
11
|
-
import {
|
|
11
|
+
import { d as setPrimaryApiKey, e as addCompletedOnboarding } from './claude-config.mjs';
|
|
12
12
|
import { b as backupExistingConfig } from './config.mjs';
|
|
13
13
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
14
14
|
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
@@ -415,7 +415,7 @@ async function setupCcrConfiguration() {
|
|
|
415
415
|
console.log(a.yellow(`${i18n.t("ccr:keepingExistingConfig")}`));
|
|
416
416
|
await configureCcrProxy(existingConfig);
|
|
417
417
|
try {
|
|
418
|
-
const { manageApiKeyApproval } = await import('./claude-config.mjs').then(function (n) { return n.
|
|
418
|
+
const { manageApiKeyApproval } = await import('./claude-config.mjs').then(function (n) { return n.l; });
|
|
419
419
|
const apiKey = existingConfig.APIKEY || "sk-ccjk-x-ccr";
|
|
420
420
|
manageApiKeyApproval(apiKey);
|
|
421
421
|
console.log(a.green(`\u2714 ${i18n.t("ccr:apiKeyApprovalSuccess")}`));
|
|
@@ -449,7 +449,7 @@ async function setupCcrConfiguration() {
|
|
|
449
449
|
console.error(a.red(i18n.t("errors:failedToSetOnboarding")), error);
|
|
450
450
|
}
|
|
451
451
|
try {
|
|
452
|
-
const { manageApiKeyApproval } = await import('./claude-config.mjs').then(function (n) { return n.
|
|
452
|
+
const { manageApiKeyApproval } = await import('./claude-config.mjs').then(function (n) { return n.l; });
|
|
453
453
|
const apiKey = config.APIKEY || "sk-ccjk-x-ccr";
|
|
454
454
|
manageApiKeyApproval(apiKey);
|
|
455
455
|
console.log(a.green(`\u2714 ${i18n.t("ccr:apiKeyApprovalSuccess")}`));
|
|
@@ -79,10 +79,12 @@ const LEGACY_ZCF_CONFIG_FILES = [
|
|
|
79
79
|
];
|
|
80
80
|
const ZCF_CONFIG_DIR = CCJK_CONFIG_DIR;
|
|
81
81
|
const ZCF_CONFIG_FILE = CCJK_CONFIG_FILE;
|
|
82
|
-
const CODE_TOOL_TYPES = ["claude-code", "codex", "aider", "continue", "cline", "cursor"];
|
|
83
|
-
const DEFAULT_CODE_TOOL_TYPE = "
|
|
82
|
+
const CODE_TOOL_TYPES = ["claude-code", "myclaude", "codex", "aider", "continue", "cline", "cursor"];
|
|
83
|
+
const DEFAULT_CODE_TOOL_TYPE = "myclaude";
|
|
84
|
+
const CLAUDE_FAMILY_CODE_TOOL_TYPES = ["claude-code", "myclaude"];
|
|
84
85
|
const CODE_TOOL_BANNERS = {
|
|
85
86
|
"claude-code": "for Claude Code",
|
|
87
|
+
"myclaude": "for myclaude",
|
|
86
88
|
"codex": "for Codex",
|
|
87
89
|
"aider": "for Aider",
|
|
88
90
|
"continue": "for Continue",
|
|
@@ -91,15 +93,189 @@ const CODE_TOOL_BANNERS = {
|
|
|
91
93
|
};
|
|
92
94
|
const CODE_TOOL_ALIASES = {
|
|
93
95
|
cc: "claude-code",
|
|
96
|
+
mc: "myclaude",
|
|
97
|
+
mycode: "myclaude",
|
|
94
98
|
cx: "codex",
|
|
95
99
|
ad: "aider",
|
|
96
100
|
ct: "continue",
|
|
97
101
|
cl: "cline",
|
|
98
102
|
cu: "cursor"
|
|
99
103
|
};
|
|
104
|
+
const CODE_TOOL_INFO = {
|
|
105
|
+
"claude-code": {
|
|
106
|
+
name: "Claude Code",
|
|
107
|
+
description: "Anthropic official CLI for Claude",
|
|
108
|
+
website: "https://claude.ai/code",
|
|
109
|
+
installCmd: "npm install -g @anthropic-ai/claude-code",
|
|
110
|
+
configFormat: "json",
|
|
111
|
+
category: "cli",
|
|
112
|
+
runtimeCommand: "claude",
|
|
113
|
+
configBackend: "claude-family",
|
|
114
|
+
nativeSlashCommands: [
|
|
115
|
+
"/help",
|
|
116
|
+
"/clear",
|
|
117
|
+
"/exit",
|
|
118
|
+
"/quit",
|
|
119
|
+
"/resume",
|
|
120
|
+
"/compact",
|
|
121
|
+
"/context",
|
|
122
|
+
"/status",
|
|
123
|
+
"/plan",
|
|
124
|
+
"/execute",
|
|
125
|
+
"/rewind",
|
|
126
|
+
"/mcp",
|
|
127
|
+
"/doctor",
|
|
128
|
+
"/settings",
|
|
129
|
+
"/config",
|
|
130
|
+
"/version",
|
|
131
|
+
"/agents",
|
|
132
|
+
"/skills",
|
|
133
|
+
"/commands",
|
|
134
|
+
"/tasks",
|
|
135
|
+
"/memory",
|
|
136
|
+
"/memories",
|
|
137
|
+
"/model",
|
|
138
|
+
"/cost",
|
|
139
|
+
"/permissions",
|
|
140
|
+
"/hooks",
|
|
141
|
+
"/init",
|
|
142
|
+
"/login",
|
|
143
|
+
"/logout",
|
|
144
|
+
"/bug",
|
|
145
|
+
"/terminal",
|
|
146
|
+
"/ide",
|
|
147
|
+
"/review",
|
|
148
|
+
"/pr",
|
|
149
|
+
"/vim",
|
|
150
|
+
"/listen",
|
|
151
|
+
"/add",
|
|
152
|
+
"/install",
|
|
153
|
+
"/allowed-tools",
|
|
154
|
+
"/think",
|
|
155
|
+
"/thinking"
|
|
156
|
+
],
|
|
157
|
+
managesProviderProfiles: false
|
|
158
|
+
},
|
|
159
|
+
"myclaude": {
|
|
160
|
+
name: "myclaude",
|
|
161
|
+
description: "Provider-first Claude-family coding CLI",
|
|
162
|
+
website: "https://github.com/mycode699/myclaude-code",
|
|
163
|
+
installCmd: "npm install -g myclaude-code && myclaude install --force",
|
|
164
|
+
configFormat: "json",
|
|
165
|
+
category: "cli",
|
|
166
|
+
runtimeCommand: "myclaude",
|
|
167
|
+
configBackend: "claude-family",
|
|
168
|
+
nativeSlashCommands: [
|
|
169
|
+
"/help",
|
|
170
|
+
"/clear",
|
|
171
|
+
"/exit",
|
|
172
|
+
"/quit",
|
|
173
|
+
"/resume",
|
|
174
|
+
"/compact",
|
|
175
|
+
"/context",
|
|
176
|
+
"/status",
|
|
177
|
+
"/plan",
|
|
178
|
+
"/execute",
|
|
179
|
+
"/rewind",
|
|
180
|
+
"/mcp",
|
|
181
|
+
"/doctor",
|
|
182
|
+
"/settings",
|
|
183
|
+
"/config",
|
|
184
|
+
"/version",
|
|
185
|
+
"/agents",
|
|
186
|
+
"/skills",
|
|
187
|
+
"/commands",
|
|
188
|
+
"/tasks",
|
|
189
|
+
"/memory",
|
|
190
|
+
"/memories",
|
|
191
|
+
"/model",
|
|
192
|
+
"/cost",
|
|
193
|
+
"/permissions",
|
|
194
|
+
"/hooks",
|
|
195
|
+
"/init",
|
|
196
|
+
"/login",
|
|
197
|
+
"/logout",
|
|
198
|
+
"/bug",
|
|
199
|
+
"/terminal",
|
|
200
|
+
"/ide",
|
|
201
|
+
"/review",
|
|
202
|
+
"/pr",
|
|
203
|
+
"/vim",
|
|
204
|
+
"/listen",
|
|
205
|
+
"/add",
|
|
206
|
+
"/install",
|
|
207
|
+
"/allowed-tools",
|
|
208
|
+
"/think",
|
|
209
|
+
"/thinking",
|
|
210
|
+
"/provider",
|
|
211
|
+
"/team",
|
|
212
|
+
"/mao"
|
|
213
|
+
],
|
|
214
|
+
managesProviderProfiles: true
|
|
215
|
+
},
|
|
216
|
+
"codex": {
|
|
217
|
+
name: "Codex",
|
|
218
|
+
description: "OpenAI Codex CLI",
|
|
219
|
+
website: "https://openai.com/codex",
|
|
220
|
+
installCmd: "npm install -g @openai/codex",
|
|
221
|
+
configFormat: "toml",
|
|
222
|
+
category: "cli",
|
|
223
|
+
runtimeCommand: "codex",
|
|
224
|
+
configBackend: "tool-specific"
|
|
225
|
+
},
|
|
226
|
+
"aider": {
|
|
227
|
+
name: "Aider",
|
|
228
|
+
description: "AI pair programming in terminal",
|
|
229
|
+
website: "https://aider.chat",
|
|
230
|
+
installCmd: "pip install aider-chat",
|
|
231
|
+
configFormat: "yaml",
|
|
232
|
+
category: "cli",
|
|
233
|
+
runtimeCommand: "aider",
|
|
234
|
+
configBackend: "tool-specific"
|
|
235
|
+
},
|
|
236
|
+
"continue": {
|
|
237
|
+
name: "Continue",
|
|
238
|
+
description: "Open-source AI code assistant",
|
|
239
|
+
website: "https://continue.dev",
|
|
240
|
+
installCmd: "pip install continuedev",
|
|
241
|
+
configFormat: "json",
|
|
242
|
+
category: "extension",
|
|
243
|
+
runtimeCommand: "continue",
|
|
244
|
+
configBackend: "tool-specific"
|
|
245
|
+
},
|
|
246
|
+
"cline": {
|
|
247
|
+
name: "Cline",
|
|
248
|
+
description: "Autonomous coding agent for VS Code",
|
|
249
|
+
website: "https://cline.bot",
|
|
250
|
+
installCmd: "code --install-extension saoudrizwan.claude-dev",
|
|
251
|
+
configFormat: "json",
|
|
252
|
+
category: "extension",
|
|
253
|
+
runtimeCommand: "cline",
|
|
254
|
+
configBackend: "tool-specific"
|
|
255
|
+
},
|
|
256
|
+
"cursor": {
|
|
257
|
+
name: "Cursor CLI",
|
|
258
|
+
description: "AI-first code editor CLI",
|
|
259
|
+
website: "https://cursor.com/cli",
|
|
260
|
+
installCmd: "curl https://cursor.com/install -fsSL | bash",
|
|
261
|
+
configFormat: "json",
|
|
262
|
+
category: "editor",
|
|
263
|
+
runtimeCommand: "cursor",
|
|
264
|
+
configBackend: "tool-specific"
|
|
265
|
+
}
|
|
266
|
+
};
|
|
100
267
|
function isCodeToolType(value) {
|
|
101
268
|
return CODE_TOOL_TYPES.includes(value);
|
|
102
269
|
}
|
|
270
|
+
function isClaudeFamilyCodeTool(value) {
|
|
271
|
+
return CLAUDE_FAMILY_CODE_TOOL_TYPES.includes(value);
|
|
272
|
+
}
|
|
273
|
+
function getCodeToolRuntimeCommand(codeTool) {
|
|
274
|
+
return CODE_TOOL_INFO[codeTool].runtimeCommand;
|
|
275
|
+
}
|
|
276
|
+
function getCodeToolNativeSlashCommands(codeTool) {
|
|
277
|
+
return CODE_TOOL_INFO[codeTool].nativeSlashCommands || [];
|
|
278
|
+
}
|
|
103
279
|
const API_DEFAULT_URL = "https://api.anthropic.com";
|
|
104
280
|
function resolveCodeToolType(value) {
|
|
105
281
|
if (isCodeToolType(value)) {
|
|
@@ -133,4 +309,4 @@ function getAiOutputLanguageLabel(lang) {
|
|
|
133
309
|
return lang;
|
|
134
310
|
}
|
|
135
311
|
|
|
136
|
-
export { AIDER_DIR, AI_OUTPUT_LANGUAGES, API_DEFAULT_URL, CCJK_CLOUD_API_URL, CCJK_CLOUD_PLUGINS_CACHE_DIR, CCJK_CLOUD_PLUGINS_DIR, CCJK_CLOUD_PLUGINS_INSTALLED_DIR, CCJK_CONFIG_DIR, CCJK_CONFIG_FILE, CCJK_PLUGINS_DIR, CCJK_SKILLS_DIR, CLAUDE_AGENTS_DIR, CLAUDE_DIR, CLAUDE_VSC_CONFIG_FILE, CLINE_DIR, CLOUD_ENDPOINTS, CODEX_AGENTS_FILE, CODEX_AUTH_FILE, CODEX_CONFIG_FILE, CODEX_DIR, CODEX_PROMPTS_DIR, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, CONTINUE_DIR, CURSOR_DIR, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_DIR, LEGACY_ZCF_CONFIG_FILE, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, getAiOutputLanguageLabel, getCloudApiUrl, getCloudBaseUrl, isCodeToolType, resolveCodeToolType };
|
|
312
|
+
export { AIDER_DIR, AI_OUTPUT_LANGUAGES, API_DEFAULT_URL, CCJK_CLOUD_API_URL, CCJK_CLOUD_PLUGINS_CACHE_DIR, CCJK_CLOUD_PLUGINS_DIR, CCJK_CLOUD_PLUGINS_INSTALLED_DIR, CCJK_CONFIG_DIR, CCJK_CONFIG_FILE, CCJK_PLUGINS_DIR, CCJK_SKILLS_DIR, CLAUDE_AGENTS_DIR, CLAUDE_DIR, CLAUDE_FAMILY_CODE_TOOL_TYPES, CLAUDE_VSC_CONFIG_FILE, CLINE_DIR, CLOUD_ENDPOINTS, CODEX_AGENTS_FILE, CODEX_AUTH_FILE, CODEX_CONFIG_FILE, CODEX_DIR, CODEX_PROMPTS_DIR, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_INFO, CODE_TOOL_TYPES, CONTINUE_DIR, CURSOR_DIR, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_DIR, LEGACY_ZCF_CONFIG_FILE, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, getAiOutputLanguageLabel, getCloudApiUrl, getCloudBaseUrl, getCodeToolNativeSlashCommands, getCodeToolRuntimeCommand, isClaudeFamilyCodeTool, isCodeToolType, resolveCodeToolType };
|
package/dist/chunks/doctor.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { getApiProviderPresets } from './api-providers.mjs';
|
|
|
6
6
|
import { SETTINGS_FILE, CLAUDE_DIR } from './constants.mjs';
|
|
7
7
|
import { i18n } from './index2.mjs';
|
|
8
8
|
import { g as getPermissionManager } from '../shared/ccjk.SPoXMvZD.mjs';
|
|
9
|
-
import {
|
|
9
|
+
import { h as commandExists } from './platform.mjs';
|
|
10
10
|
import { P as ProviderHealthMonitor } from '../shared/ccjk.J8YiPsOw.mjs';
|
|
11
11
|
import { platform, userInfo, homedir } from 'node:os';
|
|
12
12
|
import ora from './index8.mjs';
|
package/dist/chunks/features.mjs
CHANGED
|
@@ -3,11 +3,15 @@ import { homedir } from 'node:os';
|
|
|
3
3
|
import process__default from 'node:process';
|
|
4
4
|
import a from './index5.mjs';
|
|
5
5
|
import { i as inquirer } from './index6.mjs';
|
|
6
|
+
import { g as getMcpServices } from '../shared/ccjk.DKXs7Fbm.mjs';
|
|
6
7
|
import { SUPPORTED_LANGS, LANG_LABELS } from './constants.mjs';
|
|
7
8
|
import { ensureI18nInitialized, i18n, changeLanguage } from './index2.mjs';
|
|
8
9
|
import { updateZcfConfig, readZcfConfig } from './ccjk-config.mjs';
|
|
10
|
+
import { r as readMcpConfig, f as fixWindowsMcpConfig, w as writeMcpConfig, b as backupMcpConfig, a as buildMcpServerConfig, m as mergeMcpServers } from './claude-config.mjs';
|
|
9
11
|
import { g as getExistingModelConfig, a as getExistingCustomModelConfig, u as updateCustomModel, c as updateDefaultModel, d as getExistingApiConfig, p as promptApiConfigurationAction, e as configureApi } from './config.mjs';
|
|
10
|
-
import { m as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.
|
|
12
|
+
import { c as configureOutputStyle, m as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.Dz0ssUQx.mjs';
|
|
13
|
+
import { s as selectMcpServices } from '../shared/ccjk.BI-hdI7P.mjs';
|
|
14
|
+
import { i as isWindows } from './platform.mjs';
|
|
11
15
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
12
16
|
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
13
17
|
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
@@ -25,6 +29,7 @@ import 'node:path';
|
|
|
25
29
|
import 'node:crypto';
|
|
26
30
|
import 'buffer';
|
|
27
31
|
import 'string_decoder';
|
|
32
|
+
import 'node:child_process';
|
|
28
33
|
import 'node:url';
|
|
29
34
|
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
30
35
|
import './index3.mjs';
|
|
@@ -32,13 +37,10 @@ import './fs-operations.mjs';
|
|
|
32
37
|
import 'node:fs/promises';
|
|
33
38
|
import './json-config.mjs';
|
|
34
39
|
import '../shared/ccjk.RyizuzOI.mjs';
|
|
35
|
-
import '
|
|
36
|
-
import './platform.mjs';
|
|
40
|
+
import '../shared/ccjk.DScm_NnL.mjs';
|
|
37
41
|
import './main.mjs';
|
|
38
42
|
import 'module';
|
|
39
|
-
import 'node:child_process';
|
|
40
43
|
import 'node:stream';
|
|
41
|
-
import '../shared/ccjk.DScm_NnL.mjs';
|
|
42
44
|
import '../shared/ccjk.DeWpAShp.mjs';
|
|
43
45
|
|
|
44
46
|
const DEFAULT_MODEL_CHOICES = [
|
|
@@ -105,7 +107,7 @@ async function handleCustomApiMode() {
|
|
|
105
107
|
ensureI18nInitialized();
|
|
106
108
|
const zcfConfig = readZcfConfig();
|
|
107
109
|
const codeToolType = zcfConfig?.codeToolType || "claude-code";
|
|
108
|
-
if (codeToolType === "claude-code") {
|
|
110
|
+
if (codeToolType === "claude-code" || codeToolType === "myclaude") {
|
|
109
111
|
const { configureIncrementalManagement } = await import('./claude-code-incremental-manager.mjs');
|
|
110
112
|
await configureIncrementalManagement();
|
|
111
113
|
return;
|
|
@@ -191,6 +193,57 @@ async function handleCustomApiMode() {
|
|
|
191
193
|
console.log(a.gray(` Key: ${formatApiKeyDisplay(configuredApi.key)}`));
|
|
192
194
|
}
|
|
193
195
|
}
|
|
196
|
+
async function configureMcpFeature() {
|
|
197
|
+
ensureI18nInitialized();
|
|
198
|
+
if (isWindows()) {
|
|
199
|
+
const fixWindows = await promptBoolean({
|
|
200
|
+
message: i18n.t("configuration:fixWindowsMcp") || "Fix Windows MCP configuration?",
|
|
201
|
+
defaultValue: true
|
|
202
|
+
});
|
|
203
|
+
if (fixWindows) {
|
|
204
|
+
const existingConfig = readMcpConfig() || { mcpServers: {} };
|
|
205
|
+
const fixedConfig = fixWindowsMcpConfig(existingConfig);
|
|
206
|
+
writeMcpConfig(fixedConfig);
|
|
207
|
+
console.log(a.green(`\u2714 ${i18n.t("configuration:windowsMcpConfigFixed")}`));
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
const selectedServices = await selectMcpServices();
|
|
211
|
+
if (!selectedServices) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
if (selectedServices.length > 0) {
|
|
215
|
+
const mcpBackupPath = backupMcpConfig();
|
|
216
|
+
if (mcpBackupPath) {
|
|
217
|
+
console.log(a.gray(`\u2714 ${i18n.t("mcp:mcpBackupSuccess")}: ${mcpBackupPath}`));
|
|
218
|
+
}
|
|
219
|
+
const newServers = {};
|
|
220
|
+
for (const serviceId of selectedServices) {
|
|
221
|
+
const service = (await getMcpServices()).find((s) => s.id === serviceId);
|
|
222
|
+
if (!service)
|
|
223
|
+
continue;
|
|
224
|
+
let config = service.config;
|
|
225
|
+
if (service.requiresApiKey) {
|
|
226
|
+
const { apiKey } = await inquirer.prompt({
|
|
227
|
+
type: "input",
|
|
228
|
+
name: "apiKey",
|
|
229
|
+
message: service.apiKeyPrompt,
|
|
230
|
+
validate: async (value) => !!value || i18n.t("api:keyRequired")
|
|
231
|
+
});
|
|
232
|
+
if (apiKey) {
|
|
233
|
+
config = buildMcpServerConfig(service.config, apiKey, service.apiKeyPlaceholder, service.apiKeyEnvVar);
|
|
234
|
+
} else {
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
newServers[service.id] = config;
|
|
239
|
+
}
|
|
240
|
+
const existingConfig = readMcpConfig();
|
|
241
|
+
let mergedConfig = mergeMcpServers(existingConfig, newServers);
|
|
242
|
+
mergedConfig = fixWindowsMcpConfig(mergedConfig);
|
|
243
|
+
writeMcpConfig(mergedConfig);
|
|
244
|
+
console.log(a.green(`\u2714 ${i18n.t("mcp:mcpConfigSuccess")}`));
|
|
245
|
+
}
|
|
246
|
+
}
|
|
194
247
|
async function configureDefaultModelFeature() {
|
|
195
248
|
ensureI18nInitialized();
|
|
196
249
|
const existingModel = getExistingModelConfig();
|
|
@@ -293,7 +346,7 @@ async function changeScriptLanguageFeature(currentLang) {
|
|
|
293
346
|
}
|
|
294
347
|
async function configureCodexDefaultModelFeature() {
|
|
295
348
|
ensureI18nInitialized();
|
|
296
|
-
const { readCodexConfig } = await import('./codex.mjs').then(function (n) { return n.
|
|
349
|
+
const { readCodexConfig } = await import('./codex.mjs').then(function (n) { return n.q; });
|
|
297
350
|
const existingConfig = readCodexConfig();
|
|
298
351
|
const currentModel = existingConfig?.model;
|
|
299
352
|
if (currentModel) {
|
|
@@ -393,14 +446,14 @@ ${a.green(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existing
|
|
|
393
446
|
} else if (option === "systemPrompt") {
|
|
394
447
|
const zcfConfig = readZcfConfig();
|
|
395
448
|
const currentLang = zcfConfig?.aiOutputLang || "English";
|
|
396
|
-
const { runCodexSystemPromptSelection } = await import('./codex.mjs').then(function (n) { return n.
|
|
449
|
+
const { runCodexSystemPromptSelection } = await import('./codex.mjs').then(function (n) { return n.q; });
|
|
397
450
|
await runCodexSystemPromptSelection();
|
|
398
451
|
await ensureLanguageDirectiveInAgents(currentLang);
|
|
399
452
|
console.log(a.green(`\u2714 ${i18n.t("configuration:systemPromptConfigured")}`));
|
|
400
453
|
}
|
|
401
454
|
}
|
|
402
455
|
async function updateCodexModelProvider(modelProvider) {
|
|
403
|
-
const { readCodexConfig, writeCodexConfig, backupCodexConfig, getBackupMessage } = await import('./codex.mjs').then(function (n) { return n.
|
|
456
|
+
const { readCodexConfig, writeCodexConfig, backupCodexConfig, getBackupMessage } = await import('./codex.mjs').then(function (n) { return n.q; });
|
|
404
457
|
const backupPath = backupCodexConfig();
|
|
405
458
|
if (backupPath) {
|
|
406
459
|
console.log(a.gray(getBackupMessage(backupPath)));
|
|
@@ -430,7 +483,7 @@ const codexLanguageLabels = {
|
|
|
430
483
|
};
|
|
431
484
|
async function setCodexLanguageDirective(aiOutputLang, mode) {
|
|
432
485
|
const { readFile, writeFileAtomic, exists } = await import('./fs-operations.mjs');
|
|
433
|
-
const { backupCodexAgents, getBackupMessage } = await import('./codex.mjs').then(function (n) { return n.
|
|
486
|
+
const { backupCodexAgents, getBackupMessage } = await import('./codex.mjs').then(function (n) { return n.q; });
|
|
434
487
|
const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
|
|
435
488
|
if (!exists(CODEX_AGENTS_FILE)) {
|
|
436
489
|
console.log(a.yellow(i18n.t("codex:agentsFileNotFound")));
|
|
@@ -460,6 +513,8 @@ async function updateCodexLanguageDirective(aiOutputLang) {
|
|
|
460
513
|
return setCodexLanguageDirective(aiOutputLang, "update");
|
|
461
514
|
}
|
|
462
515
|
async function configureMemoryFeature() {
|
|
516
|
+
ensureI18nInitialized();
|
|
517
|
+
const isZh = i18n.language === "zh-CN";
|
|
463
518
|
const inquirer2 = (await import('./index6.mjs').then(function (n) { return n.c; })).default;
|
|
464
519
|
const ansis2 = (await import('./index5.mjs')).default;
|
|
465
520
|
const { execSync } = await import('node:child_process');
|
|
@@ -502,6 +557,8 @@ ${ansis2.bold(i18n.t("memory:currentStatus"))}`);
|
|
|
502
557
|
{ name: i18n.t("memory:editMemory"), value: "edit" },
|
|
503
558
|
{ name: i18n.t("memory:syncNow"), value: "sync" },
|
|
504
559
|
{ name: i18n.t("memory:configureRules"), value: "rules" },
|
|
560
|
+
{ name: isZh ? "\u{1F310} \u914D\u7F6E AI \u8F93\u51FA\u8BED\u8A00" : "\u{1F310} Configure AI output language", value: "language" },
|
|
561
|
+
{ name: isZh ? "\u{1F3A8} \u914D\u7F6E\u8F93\u51FA\u98CE\u683C" : "\u{1F3A8} Configure output style", value: "outputStyle" },
|
|
505
562
|
{ name: i18n.t("memory:back"), value: "back" }
|
|
506
563
|
]
|
|
507
564
|
}
|
|
@@ -573,7 +630,15 @@ ${ansis2.bold(i18n.t("memory:memoryContent"))}`);
|
|
|
573
630
|
console.log(i18n.t("memory:rulesDescription"));
|
|
574
631
|
break;
|
|
575
632
|
}
|
|
633
|
+
case "language": {
|
|
634
|
+
await changeScriptLanguageFeature(i18n.language);
|
|
635
|
+
break;
|
|
636
|
+
}
|
|
637
|
+
case "outputStyle": {
|
|
638
|
+
await configureOutputStyle();
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
576
641
|
}
|
|
577
642
|
}
|
|
578
643
|
|
|
579
|
-
export { CODEX_MODEL_CHOICES, DEFAULT_MODEL_CHOICES, changeScriptLanguageFeature, configureCodexAiMemoryFeature, configureCodexDefaultModelFeature, configureDefaultModelFeature, configureMemoryFeature, formatCodexModelLabel, handleCustomApiMode, promptCustomModels };
|
|
644
|
+
export { CODEX_MODEL_CHOICES, DEFAULT_MODEL_CHOICES, changeScriptLanguageFeature, configureCodexAiMemoryFeature, configureCodexDefaultModelFeature, configureDefaultModelFeature, configureMcpFeature, configureMemoryFeature, formatCodexModelLabel, handleCustomApiMode, promptCustomModels };
|
package/dist/chunks/index10.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { CLOUD_ENDPOINTS, CCJK_CONFIG_DIR, SUPPORTED_LANGS, LANG_LABELS, CODE_TO
|
|
|
4
4
|
import { ensureI18nInitialized, i18n, resolveSupportedLanguage, changeLanguage } from './index2.mjs';
|
|
5
5
|
import { displayBannerWithInfo } from './banner.mjs';
|
|
6
6
|
import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
|
|
7
|
-
import { c as runCodexUpdate,
|
|
8
|
-
import {
|
|
7
|
+
import { c as runCodexUpdate, i as runCodexUninstall, j as configureCodexAiMemoryFeature, k as configureCodexDefaultModelFeature, m as configureCodexMcp, n as configureCodexApi, o as configureCodexPresetFeature, p as runCodexWorkflowImportWithLanguageSelection, h as runCodexFullInit } from './codex.mjs';
|
|
8
|
+
import { S as STARTUP_CODE_TOOL_CHOICES, a as resolveStartupCodeType } from '../shared/ccjk.yYQMbHH3.mjs';
|
|
9
9
|
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.DGllfVCZ.mjs';
|
|
10
10
|
import { changeScriptLanguageFeature } from './features.mjs';
|
|
11
11
|
import { c as checkForUpdates, a as getInstalledPackages, s as searchPackages } from '../shared/ccjk.DbigonEQ.mjs';
|
|
@@ -26,7 +26,7 @@ import { configSwitchCommand } from './config-switch.mjs';
|
|
|
26
26
|
import process__default from 'node:process';
|
|
27
27
|
import { readFile, writeFileAtomic, ensureDir, exists, readJsonFile } from './fs-operations.mjs';
|
|
28
28
|
import { workspaceDiagnostics, doctor } from './doctor.mjs';
|
|
29
|
-
import { a as mcpList, c as mcpUninstall, m as mcpInstall, d as mcpTrending, b as mcpSearch } from '../shared/ccjk.
|
|
29
|
+
import { a as mcpList, c as mcpUninstall, m as mcpInstall, d as mcpTrending, b as mcpSearch } from '../shared/ccjk.B4aXNclK.mjs';
|
|
30
30
|
import { notificationCommand } from './notification.mjs';
|
|
31
31
|
import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
|
|
32
32
|
import { uninstall } from './uninstall.mjs';
|
|
@@ -3001,11 +3001,14 @@ async function saveLocalHooks(hooks, lastSyncedAt) {
|
|
|
3001
3001
|
}
|
|
3002
3002
|
|
|
3003
3003
|
const ONBOARDING_STATE_FILE = join(CCJK_CONFIG_DIR, "onboarding.json");
|
|
3004
|
-
const PRIMARY_ONBOARDING_TOOLS = ["claude-code", "codex"];
|
|
3005
3004
|
const LANGUAGE_SELECTION_MESSAGES = {
|
|
3006
3005
|
selectLanguage: "Select CCJK display language / \u9009\u62E9 CCJK \u663E\u793A\u8BED\u8A00"
|
|
3007
3006
|
};
|
|
3008
3007
|
const TOOL_LABELS = {
|
|
3008
|
+
"myclaude": {
|
|
3009
|
+
en: "myclaude",
|
|
3010
|
+
zh: "myclaude"
|
|
3011
|
+
},
|
|
3009
3012
|
"claude-code": {
|
|
3010
3013
|
en: "Claude Code",
|
|
3011
3014
|
zh: "Claude Code"
|
|
@@ -3019,13 +3022,13 @@ function isSupportedLang(value) {
|
|
|
3019
3022
|
return SUPPORTED_LANGS.includes(value);
|
|
3020
3023
|
}
|
|
3021
3024
|
function isPrimaryOnboardingTool(value) {
|
|
3022
|
-
return
|
|
3025
|
+
return STARTUP_CODE_TOOL_CHOICES.includes(value);
|
|
3023
3026
|
}
|
|
3024
3027
|
function resolveOnboardingCodeTool(value) {
|
|
3025
3028
|
if (isPrimaryOnboardingTool(value)) {
|
|
3026
3029
|
return value;
|
|
3027
3030
|
}
|
|
3028
|
-
return "
|
|
3031
|
+
return "myclaude";
|
|
3029
3032
|
}
|
|
3030
3033
|
function getToolLabel(tool, lang) {
|
|
3031
3034
|
return lang === "zh-CN" ? TOOL_LABELS[tool].zh : TOOL_LABELS[tool].en;
|
|
@@ -3082,7 +3085,11 @@ async function selectOnboardingCodeTool(lang, options = {}) {
|
|
|
3082
3085
|
message: isZh ? "\u9009\u62E9\u4EE3\u7801\u5DE5\u5177" : "Choose your code tool",
|
|
3083
3086
|
choices: addNumbersToChoices([
|
|
3084
3087
|
{
|
|
3085
|
-
name: `${getToolLabel("
|
|
3088
|
+
name: `${getToolLabel("myclaude", lang)} - ${isZh ? "Provider-first \u63A7\u5236\u4E2D\u5FC3\uFF08\u9ED8\u8BA4\u63A8\u8350\uFF09" : "Provider-first control center (recommended default)"}`,
|
|
3089
|
+
value: "myclaude"
|
|
3090
|
+
},
|
|
3091
|
+
{
|
|
3092
|
+
name: `${getToolLabel("claude-code", lang)} - ${isZh ? "Claude \u5BB6\u65CF\u7ECF\u5178\u63A7\u5236\u4E2D\u5FC3" : "Classic Claude-family control center"}`,
|
|
3086
3093
|
value: "claude-code"
|
|
3087
3094
|
},
|
|
3088
3095
|
{
|
|
@@ -3090,7 +3097,7 @@ async function selectOnboardingCodeTool(lang, options = {}) {
|
|
|
3090
3097
|
value: "codex"
|
|
3091
3098
|
}
|
|
3092
3099
|
]),
|
|
3093
|
-
default:
|
|
3100
|
+
default: STARTUP_CODE_TOOL_CHOICES.indexOf(defaultTool)
|
|
3094
3101
|
});
|
|
3095
3102
|
const selectedTool = resolveOnboardingCodeTool(tool);
|
|
3096
3103
|
updateZcfConfig({
|
|
@@ -3155,7 +3162,7 @@ async function runOnboardingWizard(options = {}) {
|
|
|
3155
3162
|
console.log("");
|
|
3156
3163
|
}
|
|
3157
3164
|
|
|
3158
|
-
const NON_CODEX_TOOLS = ["claude-code", "aider", "continue", "cline", "cursor"];
|
|
3165
|
+
const NON_CODEX_TOOLS = ["claude-code", "myclaude", "aider", "continue", "cline", "cursor"];
|
|
3159
3166
|
const quickActionsItems = [
|
|
3160
3167
|
{
|
|
3161
3168
|
id: "init",
|
|
@@ -3231,6 +3238,17 @@ const quickActionsItems = [
|
|
|
3231
3238
|
icon: "\u{1F4F1}",
|
|
3232
3239
|
shortcut: "5",
|
|
3233
3240
|
supportedTools: NON_CODEX_TOOLS
|
|
3241
|
+
},
|
|
3242
|
+
{
|
|
3243
|
+
id: "switch-code-tool",
|
|
3244
|
+
label: "menuOptions.switchCodeTool",
|
|
3245
|
+
description: "menuDescriptions.switchCodeTool",
|
|
3246
|
+
category: "quick",
|
|
3247
|
+
level: "basic",
|
|
3248
|
+
action: "command",
|
|
3249
|
+
icon: "\u{1F504}",
|
|
3250
|
+
shortcut: "s",
|
|
3251
|
+
supportedTools: NON_CODEX_TOOLS
|
|
3234
3252
|
}
|
|
3235
3253
|
];
|
|
3236
3254
|
const configItems = [
|
|
@@ -3461,17 +3479,6 @@ const systemItems = [
|
|
|
3461
3479
|
shortcut: "z",
|
|
3462
3480
|
supportedTools: NON_CODEX_TOOLS
|
|
3463
3481
|
},
|
|
3464
|
-
{
|
|
3465
|
-
id: "switch-code-tool",
|
|
3466
|
-
label: "menuOptions.switchCodeTool",
|
|
3467
|
-
description: "menuDescriptions.switchCodeTool",
|
|
3468
|
-
category: "system",
|
|
3469
|
-
level: "expert",
|
|
3470
|
-
action: "command",
|
|
3471
|
-
icon: "\u{1F504}",
|
|
3472
|
-
shortcut: "t",
|
|
3473
|
-
supportedTools: NON_CODEX_TOOLS
|
|
3474
|
-
},
|
|
3475
3482
|
{
|
|
3476
3483
|
id: "uninstall",
|
|
3477
3484
|
label: "menuOptions.uninstall",
|
|
@@ -4061,7 +4068,7 @@ function attachHandlers(items, codeTool) {
|
|
|
4061
4068
|
await runCodexFullInit();
|
|
4062
4069
|
return;
|
|
4063
4070
|
}
|
|
4064
|
-
await init({ skipBanner: true });
|
|
4071
|
+
await init({ skipBanner: true, codeType: codeTool });
|
|
4065
4072
|
}
|
|
4066
4073
|
};
|
|
4067
4074
|
case "workflow-import":
|
|
@@ -4119,7 +4126,7 @@ function attachHandlers(items, codeTool) {
|
|
|
4119
4126
|
await configureCodexMcp();
|
|
4120
4127
|
return;
|
|
4121
4128
|
}
|
|
4122
|
-
await (await import('./
|
|
4129
|
+
await (await import('./features.mjs')).configureMcpFeature();
|
|
4123
4130
|
}
|
|
4124
4131
|
};
|
|
4125
4132
|
case "model-config":
|
|
@@ -4150,7 +4157,7 @@ function attachHandlers(items, codeTool) {
|
|
|
4150
4157
|
return {
|
|
4151
4158
|
...item,
|
|
4152
4159
|
handler: async () => {
|
|
4153
|
-
await configSwitchCommand({ codeType: codeTool
|
|
4160
|
+
await configSwitchCommand({ codeType: codeTool });
|
|
4154
4161
|
}
|
|
4155
4162
|
};
|
|
4156
4163
|
case "context-config":
|
|
@@ -4298,6 +4305,14 @@ function flattenSections(itemsBySection) {
|
|
|
4298
4305
|
return itemsBySection.flatMap((section) => section.items);
|
|
4299
4306
|
}
|
|
4300
4307
|
function getProgressiveFooterCommands(codeTool) {
|
|
4308
|
+
if (codeTool === "myclaude") {
|
|
4309
|
+
return [
|
|
4310
|
+
{
|
|
4311
|
+
key: "s",
|
|
4312
|
+
label: i18n.t("menu:menuOptions.switchCodeTool")
|
|
4313
|
+
}
|
|
4314
|
+
];
|
|
4315
|
+
}
|
|
4301
4316
|
if (codeTool !== "codex") {
|
|
4302
4317
|
return [];
|
|
4303
4318
|
}
|
|
@@ -4318,9 +4333,9 @@ function getProgressiveFooterCommands(codeTool) {
|
|
|
4318
4333
|
];
|
|
4319
4334
|
}
|
|
4320
4335
|
function getMenuShellConfig(codeTool) {
|
|
4321
|
-
if (codeTool === "codex") {
|
|
4336
|
+
if (codeTool === "codex" || codeTool === "myclaude") {
|
|
4322
4337
|
return {
|
|
4323
|
-
allowMore:
|
|
4338
|
+
allowMore: codeTool !== "myclaude",
|
|
4324
4339
|
footerCommands: getProgressiveFooterCommands(codeTool),
|
|
4325
4340
|
menuTitle: getToolModeMenuTitle(codeTool),
|
|
4326
4341
|
showHero: true
|
|
@@ -4334,7 +4349,7 @@ function getMenuShellConfig(codeTool) {
|
|
|
4334
4349
|
};
|
|
4335
4350
|
}
|
|
4336
4351
|
async function showProgressiveMenu(codeTool) {
|
|
4337
|
-
if (codeTool !== "codex") {
|
|
4352
|
+
if (codeTool !== "codex" && codeTool !== "myclaude") {
|
|
4338
4353
|
const rawItems2 = getItemsForLevel(menuState.level, "claude-code");
|
|
4339
4354
|
const items2 = attachHandlers(rawItems2, "claude-code");
|
|
4340
4355
|
const sections2 = createAllSections(menuState.level, "claude-code");
|
|
@@ -4598,7 +4613,7 @@ async function showMoreFeaturesMenu() {
|
|
|
4598
4613
|
await (await import('./permissions.mjs')).listPermissions({});
|
|
4599
4614
|
break;
|
|
4600
4615
|
case "9":
|
|
4601
|
-
await configSwitchCommand({ codeType:
|
|
4616
|
+
await configSwitchCommand({ codeType: codeTool });
|
|
4602
4617
|
break;
|
|
4603
4618
|
case "10":
|
|
4604
4619
|
await showContextMenu();
|
|
@@ -5154,6 +5169,7 @@ async function showOutputStylesMenu() {
|
|
|
5154
5169
|
async function handleCodeToolSwitch(current) {
|
|
5155
5170
|
const CODE_TOOL_LABELS = {
|
|
5156
5171
|
"claude-code": "Claude Code",
|
|
5172
|
+
"myclaude": "myclaude",
|
|
5157
5173
|
"codex": "Codex",
|
|
5158
5174
|
"aider": "Aider",
|
|
5159
5175
|
"continue": "Continue",
|
|
@@ -5198,18 +5214,21 @@ async function showMainMenu(options = {}) {
|
|
|
5198
5214
|
if (await isFirstTimeUser()) {
|
|
5199
5215
|
await runOnboardingWizard({ preferredCodeTool: options.codeType });
|
|
5200
5216
|
}
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5217
|
+
try {
|
|
5218
|
+
const previousType = getCurrentCodeTool();
|
|
5219
|
+
const resolvedType = await resolveStartupCodeType({
|
|
5220
|
+
codeTypeParam: options.codeType,
|
|
5221
|
+
interactive: true
|
|
5222
|
+
});
|
|
5223
|
+
if (resolvedType !== previousType || options.codeType) {
|
|
5224
|
+
updateZcfConfig({ codeToolType: resolvedType });
|
|
5225
|
+
if (resolvedType !== previousType) {
|
|
5207
5226
|
console.log(a.green(`\u2714 Switched to ${resolvedType}`));
|
|
5208
5227
|
}
|
|
5209
|
-
} catch (err) {
|
|
5210
|
-
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
5211
|
-
console.error(a.yellow(errorMessage));
|
|
5212
5228
|
}
|
|
5229
|
+
} catch (err) {
|
|
5230
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
5231
|
+
console.error(a.yellow(errorMessage));
|
|
5213
5232
|
}
|
|
5214
5233
|
let exitMenu = false;
|
|
5215
5234
|
while (!exitMenu) {
|