ccjk 5.2.0 → 5.2.2
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/api.mjs +6 -6
- package/dist/chunks/auto-updater.mjs +80 -133
- package/dist/chunks/ccm.mjs +7 -7
- package/dist/chunks/ccr.mjs +7 -4
- package/dist/chunks/ccu.mjs +6 -6
- package/dist/chunks/check-updates.mjs +3 -3
- package/dist/chunks/claude-code-incremental-manager.mjs +38 -38
- package/dist/chunks/cloud-v5.mjs +1651 -0
- package/dist/chunks/codex.mjs +70 -70
- package/dist/chunks/commands.mjs +25 -25
- package/dist/chunks/commit.mjs +16 -16
- package/dist/chunks/config-consolidator.mjs +9 -9
- package/dist/chunks/config-switch.mjs +39 -39
- package/dist/chunks/config.mjs +5 -5
- package/dist/chunks/config2.mjs +85 -85
- package/dist/chunks/context.mjs +2 -2
- package/dist/chunks/doctor.mjs +31 -31
- package/dist/chunks/features.mjs +84 -83
- package/dist/chunks/help.mjs +116 -116
- package/dist/chunks/index4.mjs +46 -46
- package/dist/chunks/init.mjs +214 -191
- package/dist/chunks/interview.mjs +102 -102
- package/dist/chunks/manager.mjs +238 -0
- package/dist/chunks/marketplace.mjs +59 -59
- package/dist/chunks/mcp.mjs +82 -82
- package/dist/chunks/menu.mjs +441 -379
- package/dist/chunks/notification.mjs +112 -112
- package/dist/chunks/onboarding.mjs +7 -7
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/permission-manager.mjs +8 -8
- package/dist/chunks/plugin.mjs +100 -100
- package/dist/chunks/prompts.mjs +15 -15
- package/dist/chunks/providers.mjs +65 -65
- package/dist/chunks/session.mjs +83 -83
- package/dist/chunks/skills-sync.mjs +72 -72
- package/dist/chunks/skills.mjs +88 -88
- package/dist/chunks/team.mjs +6 -6
- package/dist/chunks/uninstall.mjs +35 -35
- package/dist/chunks/update.mjs +6 -6
- package/dist/chunks/upgrade-manager.mjs +4 -4
- package/dist/chunks/workflows2.mjs +13 -13
- package/dist/cli.mjs +21 -0
- package/dist/i18n/locales/en/menu.json +16 -1
- package/dist/i18n/locales/en/skills.json +29 -0
- package/dist/i18n/locales/zh-CN/menu.json +16 -1
- package/dist/i18n/locales/zh-CN/skills.json +29 -0
- package/dist/index.mjs +4 -4
- package/dist/shared/{ccjk.f40us0yY.mjs → ccjk.BiJujy5w.mjs} +4 -4
- package/dist/shared/{ccjk.CQzwtnZ1.mjs → ccjk.C_3BYaWc.mjs} +50 -50
- package/dist/shared/{ccjk.Zwx-YR_P.mjs → ccjk.DjD9Rzxq.mjs} +32 -32
- package/dist/shared/{ccjk.DtWIPt8E.mjs → ccjk.XgW1H2t3.mjs} +68 -68
- package/dist/shared/{ccjk.BlPCiSHj.mjs → ccjk.tI4PJA0c.mjs} +30 -30
- package/package.json +3 -3
package/dist/chunks/menu.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import process__default from 'node:process';
|
|
3
|
-
import
|
|
3
|
+
import ansis__default from 'ansis';
|
|
4
4
|
import inquirer from 'inquirer';
|
|
5
5
|
import { join } from 'pathe';
|
|
6
6
|
import { CODE_TOOL_BANNERS, CLAUDE_DIR, isCodeToolType, DEFAULT_CODE_TOOL_TYPE } from './constants.mjs';
|
|
7
7
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
8
|
-
import { a as displayBannerWithInfo } from '../shared/ccjk.
|
|
8
|
+
import { a as displayBannerWithInfo } from '../shared/ccjk.DjD9Rzxq.mjs';
|
|
9
9
|
import { updateZcfConfig, readZcfConfig } from './ccjk-config.mjs';
|
|
10
10
|
import { d as runCodexUpdate, h as runCodexUninstall, i as configureCodexMcp, j as configureCodexApi, k as runCodexWorkflowImportWithLanguageSelection, m as runCodexFullInit } from './codex.mjs';
|
|
11
11
|
import { r as resolveCodeType } from '../shared/ccjk.CUdzQluX.mjs';
|
|
12
|
-
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.
|
|
12
|
+
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.BiJujy5w.mjs';
|
|
13
13
|
import { changeScriptLanguageFeature, configureCodexAiMemoryFeature, configureCodexDefaultModelFeature, configureEnvPermissionFeature, configureAiMemoryFeature, configureDefaultModelFeature, configureMcpFeature, configureApiFeature } from './features.mjs';
|
|
14
14
|
import { c as checkForUpdates, a as getInstalledPackages, s as searchPackages } from '../shared/ccjk.CGMs4Om4.mjs';
|
|
15
15
|
import { p as promptBoolean, a as addNumbersToChoices } from '../shared/ccjk.DhBeLRzf.mjs';
|
|
@@ -21,11 +21,12 @@ import { C as COMETIX_COMMAND_NAME, b as COMETIX_COMMANDS, c as installCometixLi
|
|
|
21
21
|
import { homedir } from 'node:os';
|
|
22
22
|
import { runCcrStop, runCcrStart, runCcrRestart, runCcrStatus, runCcrUi } from './commands.mjs';
|
|
23
23
|
import { checkUpdates } from './check-updates.mjs';
|
|
24
|
+
import { cloudV5Command, sessionCommand, memoryCommand, mcpGatewayCommand, orchestrateCommand } from './cloud-v5.mjs';
|
|
24
25
|
import { configSwitchCommand } from './config-switch.mjs';
|
|
25
26
|
import { d as detectProjectContext, g as getProjectTypeLabel, b as getApplicableRules, c as getContextFiles, e as getContextFileTypeLabel, r as readContextFile, m as mergeContextContent, f as generateContextContent, w as writeContextFile, h as getRecommendedRules, j as formatFileSize } from '../shared/ccjk.BjUZt6kx.mjs';
|
|
26
27
|
import { doctor, workspaceDiagnostics } from './doctor.mjs';
|
|
27
28
|
import { ensureDir, writeFileAtomic, exists, readJsonFile } from './fs-operations.mjs';
|
|
28
|
-
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.C_3BYaWc.mjs';
|
|
29
30
|
import { notificationCommand } from './notification.mjs';
|
|
30
31
|
import { uninstall } from './uninstall.mjs';
|
|
31
32
|
import { update } from './update.mjs';
|
|
@@ -34,14 +35,14 @@ const execAsync = promisify(exec);
|
|
|
34
35
|
async function runCometixPrintConfig() {
|
|
35
36
|
ensureI18nInitialized();
|
|
36
37
|
try {
|
|
37
|
-
console.log(
|
|
38
|
+
console.log(ansis__default.green(`${i18n.t("cometix:printingConfig")}`));
|
|
38
39
|
const { stdout } = await execAsync(COMETIX_COMMANDS.PRINT_CONFIG);
|
|
39
40
|
console.log(stdout);
|
|
40
41
|
} catch (error) {
|
|
41
42
|
if (error.message.includes(`command not found: ${COMETIX_COMMAND_NAME}`)) {
|
|
42
|
-
console.error(
|
|
43
|
+
console.error(ansis__default.red(`\u2717 ${i18n.t("cometix:commandNotFound")}`));
|
|
43
44
|
} else {
|
|
44
|
-
console.error(
|
|
45
|
+
console.error(ansis__default.red(`\u2717 ${i18n.t("cometix:printConfigFailed")}: ${error}`));
|
|
45
46
|
}
|
|
46
47
|
throw error;
|
|
47
48
|
}
|
|
@@ -49,7 +50,7 @@ async function runCometixPrintConfig() {
|
|
|
49
50
|
async function runCometixTuiConfig() {
|
|
50
51
|
ensureI18nInitialized();
|
|
51
52
|
return new Promise((resolve, reject) => {
|
|
52
|
-
console.log(
|
|
53
|
+
console.log(ansis__default.green(`${i18n.t("cometix:enteringTuiConfig")}`));
|
|
53
54
|
const child = spawn(COMETIX_COMMAND_NAME, ["-c"], {
|
|
54
55
|
stdio: "inherit",
|
|
55
56
|
// This allows the TUI to interact directly with the terminal
|
|
@@ -57,19 +58,19 @@ async function runCometixTuiConfig() {
|
|
|
57
58
|
});
|
|
58
59
|
child.on("close", (code) => {
|
|
59
60
|
if (code === 0) {
|
|
60
|
-
console.log(
|
|
61
|
+
console.log(ansis__default.green(`\u2713 ${i18n.t("cometix:tuiConfigSuccess")}`));
|
|
61
62
|
resolve();
|
|
62
63
|
} else {
|
|
63
64
|
const error = new Error(`${COMETIX_COMMAND_NAME} -c exited with code ${code}`);
|
|
64
|
-
console.error(
|
|
65
|
+
console.error(ansis__default.red(`\u2717 ${i18n.t("cometix:tuiConfigFailed")}: ${error.message}`));
|
|
65
66
|
reject(error);
|
|
66
67
|
}
|
|
67
68
|
});
|
|
68
69
|
child.on("error", (error) => {
|
|
69
70
|
if (error.message.includes(`command not found`) || error.message.includes("ENOENT")) {
|
|
70
|
-
console.error(
|
|
71
|
+
console.error(ansis__default.red(`\u2717 ${i18n.t("cometix:commandNotFound")}`));
|
|
71
72
|
} else {
|
|
72
|
-
console.error(
|
|
73
|
+
console.error(ansis__default.red(`\u2717 ${i18n.t("cometix:tuiConfigFailed")}: ${error.message}`));
|
|
73
74
|
}
|
|
74
75
|
reject(error);
|
|
75
76
|
});
|
|
@@ -80,14 +81,14 @@ async function showCometixMenu() {
|
|
|
80
81
|
try {
|
|
81
82
|
ensureI18nInitialized();
|
|
82
83
|
console.log(`
|
|
83
|
-
${
|
|
84
|
-
console.log(
|
|
85
|
-
console.log(`${
|
|
84
|
+
${ansis__default.green("\u2550".repeat(50))}`);
|
|
85
|
+
console.log(ansis__default.bold.cyan(` ${i18n.t("cometix:cometixMenuTitle")}`));
|
|
86
|
+
console.log(`${ansis__default.green("\u2550".repeat(50))}
|
|
86
87
|
`);
|
|
87
|
-
console.log(` ${
|
|
88
|
-
console.log(` ${
|
|
89
|
-
console.log(` ${
|
|
90
|
-
console.log(` ${
|
|
88
|
+
console.log(` ${ansis__default.green("1.")} ${i18n.t("cometix:cometixMenuOptions.installOrUpdate")} ${ansis__default.gray(`- ${i18n.t("cometix:cometixMenuDescriptions.installOrUpdate")}`)}`);
|
|
89
|
+
console.log(` ${ansis__default.green("2.")} ${i18n.t("cometix:cometixMenuOptions.printConfig")} ${ansis__default.gray(`- ${i18n.t("cometix:cometixMenuDescriptions.printConfig")}`)}`);
|
|
90
|
+
console.log(` ${ansis__default.green("3.")} ${i18n.t("cometix:cometixMenuOptions.customConfig")} ${ansis__default.gray(`- ${i18n.t("cometix:cometixMenuDescriptions.customConfig")}`)}`);
|
|
91
|
+
console.log(` ${ansis__default.yellow("0.")} ${i18n.t("cometix:cometixMenuOptions.back")}`);
|
|
91
92
|
console.log("");
|
|
92
93
|
const { choice } = await inquirer.prompt({
|
|
93
94
|
type: "input",
|
|
@@ -113,7 +114,7 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
113
114
|
}
|
|
114
115
|
if (choice !== "0") {
|
|
115
116
|
console.log(`
|
|
116
|
-
${
|
|
117
|
+
${ansis__default.dim("\u2500".repeat(50))}
|
|
117
118
|
`);
|
|
118
119
|
const continueInCometix = await promptBoolean({
|
|
119
120
|
message: i18n.t("common:returnToMenu"),
|
|
@@ -144,17 +145,17 @@ async function showCcrMenu() {
|
|
|
144
145
|
try {
|
|
145
146
|
ensureI18nInitialized();
|
|
146
147
|
console.log(`
|
|
147
|
-
${
|
|
148
|
-
console.log(
|
|
149
|
-
console.log(`${
|
|
148
|
+
${ansis__default.green("\u2550".repeat(50))}`);
|
|
149
|
+
console.log(ansis__default.bold.cyan(` ${i18n.t("ccr:ccrMenuTitle")}`));
|
|
150
|
+
console.log(`${ansis__default.green("\u2550".repeat(50))}
|
|
150
151
|
`);
|
|
151
|
-
console.log(` ${
|
|
152
|
-
console.log(` ${
|
|
153
|
-
console.log(` ${
|
|
154
|
-
console.log(` ${
|
|
155
|
-
console.log(` ${
|
|
156
|
-
console.log(` ${
|
|
157
|
-
console.log(` ${
|
|
152
|
+
console.log(` ${ansis__default.green("1.")} ${i18n.t("ccr:ccrMenuOptions.initCcr")} ${ansis__default.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.initCcr")}`)}`);
|
|
153
|
+
console.log(` ${ansis__default.green("2.")} ${i18n.t("ccr:ccrMenuOptions.startUi")} ${ansis__default.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.startUi")}`)}`);
|
|
154
|
+
console.log(` ${ansis__default.green("3.")} ${i18n.t("ccr:ccrMenuOptions.checkStatus")} ${ansis__default.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.checkStatus")}`)}`);
|
|
155
|
+
console.log(` ${ansis__default.green("4.")} ${i18n.t("ccr:ccrMenuOptions.restart")} ${ansis__default.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.restart")}`)}`);
|
|
156
|
+
console.log(` ${ansis__default.green("5.")} ${i18n.t("ccr:ccrMenuOptions.start")} ${ansis__default.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.start")}`)}`);
|
|
157
|
+
console.log(` ${ansis__default.green("6.")} ${i18n.t("ccr:ccrMenuOptions.stop")} ${ansis__default.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.stop")}`)}`);
|
|
158
|
+
console.log(` ${ansis__default.yellow("0.")} ${i18n.t("ccr:ccrMenuOptions.back")}`);
|
|
158
159
|
console.log("");
|
|
159
160
|
const { choice } = await inquirer.prompt({
|
|
160
161
|
type: "input",
|
|
@@ -171,18 +172,18 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
171
172
|
if (!ccrStatus.hasCorrectPackage) {
|
|
172
173
|
await installCcr();
|
|
173
174
|
} else {
|
|
174
|
-
console.log(
|
|
175
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
|
|
175
176
|
}
|
|
176
177
|
await configureCcrFeature();
|
|
177
|
-
console.log(
|
|
178
|
+
console.log(ansis__default.green(`
|
|
178
179
|
\u2714 ${i18n.t("ccr:ccrSetupComplete")}`));
|
|
179
180
|
break;
|
|
180
181
|
}
|
|
181
182
|
case "2":
|
|
182
183
|
if (!isCcrConfigured()) {
|
|
183
|
-
console.log(
|
|
184
|
+
console.log(ansis__default.yellow(`
|
|
184
185
|
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
185
|
-
console.log(
|
|
186
|
+
console.log(ansis__default.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
186
187
|
`));
|
|
187
188
|
} else {
|
|
188
189
|
const config = readCcrConfig();
|
|
@@ -191,9 +192,9 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
191
192
|
break;
|
|
192
193
|
case "3":
|
|
193
194
|
if (!isCcrConfigured()) {
|
|
194
|
-
console.log(
|
|
195
|
+
console.log(ansis__default.yellow(`
|
|
195
196
|
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
196
|
-
console.log(
|
|
197
|
+
console.log(ansis__default.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
197
198
|
`));
|
|
198
199
|
} else {
|
|
199
200
|
await runCcrStatus();
|
|
@@ -201,9 +202,9 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
201
202
|
break;
|
|
202
203
|
case "4":
|
|
203
204
|
if (!isCcrConfigured()) {
|
|
204
|
-
console.log(
|
|
205
|
+
console.log(ansis__default.yellow(`
|
|
205
206
|
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
206
|
-
console.log(
|
|
207
|
+
console.log(ansis__default.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
207
208
|
`));
|
|
208
209
|
} else {
|
|
209
210
|
await runCcrRestart();
|
|
@@ -211,9 +212,9 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
211
212
|
break;
|
|
212
213
|
case "5":
|
|
213
214
|
if (!isCcrConfigured()) {
|
|
214
|
-
console.log(
|
|
215
|
+
console.log(ansis__default.yellow(`
|
|
215
216
|
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
216
|
-
console.log(
|
|
217
|
+
console.log(ansis__default.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
217
218
|
`));
|
|
218
219
|
} else {
|
|
219
220
|
await runCcrStart();
|
|
@@ -221,9 +222,9 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
221
222
|
break;
|
|
222
223
|
case "6":
|
|
223
224
|
if (!isCcrConfigured()) {
|
|
224
|
-
console.log(
|
|
225
|
+
console.log(ansis__default.yellow(`
|
|
225
226
|
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
226
|
-
console.log(
|
|
227
|
+
console.log(ansis__default.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
227
228
|
`));
|
|
228
229
|
} else {
|
|
229
230
|
await runCcrStop();
|
|
@@ -234,7 +235,7 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
234
235
|
}
|
|
235
236
|
if (choice !== "0") {
|
|
236
237
|
console.log(`
|
|
237
|
-
${
|
|
238
|
+
${ansis__default.dim("\u2500".repeat(50))}
|
|
238
239
|
`);
|
|
239
240
|
const continueInCcr = await promptBoolean({
|
|
240
241
|
message: i18n.t("common:returnToMenu"),
|
|
@@ -256,8 +257,8 @@ ${ansis.dim("\u2500".repeat(50))}
|
|
|
256
257
|
async function runCcusageFeature() {
|
|
257
258
|
ensureI18nInitialized();
|
|
258
259
|
console.log("");
|
|
259
|
-
console.log(
|
|
260
|
-
console.log(
|
|
260
|
+
console.log(ansis__default.green(i18n.t("menu:menuOptions.ccusage")));
|
|
261
|
+
console.log(ansis__default.gray(`${i18n.t("tools:ccusageDescription")}`));
|
|
261
262
|
console.log("");
|
|
262
263
|
const choices = [
|
|
263
264
|
{ name: i18n.t("tools:ccusageModes.daily"), value: "daily" },
|
|
@@ -313,7 +314,7 @@ async function runCcusageFeature() {
|
|
|
313
314
|
await inquirer.prompt({
|
|
314
315
|
type: "input",
|
|
315
316
|
name: "continue",
|
|
316
|
-
message:
|
|
317
|
+
message: ansis__default.gray(i18n.t("tools:pressEnterToContinue"))
|
|
317
318
|
});
|
|
318
319
|
}
|
|
319
320
|
async function runCcrMenuFeature() {
|
|
@@ -326,7 +327,7 @@ async function runCometixMenuFeature() {
|
|
|
326
327
|
async function showContextMenu() {
|
|
327
328
|
const lang = i18n.language;
|
|
328
329
|
const isZh = lang === "zh-CN";
|
|
329
|
-
console.log(
|
|
330
|
+
console.log(ansis__default.green.bold(`
|
|
330
331
|
\u{1F4CB} ${isZh ? "\u4E0A\u4E0B\u6587\u7BA1\u7406" : "Context Management"}
|
|
331
332
|
`));
|
|
332
333
|
const context = detectProjectContext();
|
|
@@ -382,16 +383,16 @@ async function showContextMenu() {
|
|
|
382
383
|
}
|
|
383
384
|
function displayProjectInfo(context, lang) {
|
|
384
385
|
const isZh = lang === "zh-CN";
|
|
385
|
-
console.log(
|
|
386
|
-
console.log(
|
|
386
|
+
console.log(ansis__default.dim("\u2500".repeat(50)));
|
|
387
|
+
console.log(ansis__default.bold(isZh ? "\u68C0\u6D4B\u5230\u7684\u9879\u76EE\u4FE1\u606F\uFF1A" : "Detected Project Info:"));
|
|
387
388
|
const typeLabel = getProjectTypeLabel(context.type, lang);
|
|
388
|
-
console.log(` ${isZh ? "\u7C7B\u578B" : "Type"}: ${
|
|
389
|
-
console.log(` ${isZh ? "\u8BED\u8A00" : "Language"}: ${
|
|
389
|
+
console.log(` ${isZh ? "\u7C7B\u578B" : "Type"}: ${ansis__default.green(typeLabel)}`);
|
|
390
|
+
console.log(` ${isZh ? "\u8BED\u8A00" : "Language"}: ${ansis__default.green(context.language)}`);
|
|
390
391
|
if (context.framework) {
|
|
391
|
-
console.log(` ${isZh ? "\u6846\u67B6" : "Framework"}: ${
|
|
392
|
+
console.log(` ${isZh ? "\u6846\u67B6" : "Framework"}: ${ansis__default.green(context.framework)}`);
|
|
392
393
|
}
|
|
393
394
|
if (context.packageManager) {
|
|
394
|
-
console.log(` ${isZh ? "\u5305\u7BA1\u7406\u5668" : "Package Manager"}: ${
|
|
395
|
+
console.log(` ${isZh ? "\u5305\u7BA1\u7406\u5668" : "Package Manager"}: ${ansis__default.green(context.packageManager)}`);
|
|
395
396
|
}
|
|
396
397
|
const features = [];
|
|
397
398
|
if (context.hasTests)
|
|
@@ -403,29 +404,29 @@ function displayProjectInfo(context, lang) {
|
|
|
403
404
|
if (context.monorepo)
|
|
404
405
|
features.push("Monorepo");
|
|
405
406
|
if (features.length > 0) {
|
|
406
|
-
console.log(` ${isZh ? "\u7279\u6027" : "Features"}: ${
|
|
407
|
+
console.log(` ${isZh ? "\u7279\u6027" : "Features"}: ${ansis__default.green(features.join(", "))}`);
|
|
407
408
|
}
|
|
408
|
-
console.log(
|
|
409
|
+
console.log(ansis__default.dim("\u2500".repeat(50)));
|
|
409
410
|
console.log("");
|
|
410
411
|
}
|
|
411
412
|
function displayContextFile(file, lang) {
|
|
412
413
|
const isZh = lang === "zh-CN";
|
|
413
414
|
const typeLabel = getContextFileTypeLabel(file.type, lang);
|
|
414
|
-
const statusIcon = file.exists ?
|
|
415
|
-
console.log(` ${statusIcon} ${
|
|
416
|
-
console.log(` ${
|
|
415
|
+
const statusIcon = file.exists ? ansis__default.green("\u2713") : ansis__default.dim("\u25CB");
|
|
416
|
+
console.log(` ${statusIcon} ${ansis__default.bold(typeLabel)}`);
|
|
417
|
+
console.log(` ${ansis__default.dim(file.path)}`);
|
|
417
418
|
if (file.exists && file.size !== void 0) {
|
|
418
419
|
const sizeStr = formatFileSize(file.size);
|
|
419
420
|
const dateStr = file.lastModified ? file.lastModified.toLocaleDateString() : isZh ? "\u672A\u77E5" : "Unknown";
|
|
420
|
-
console.log(` ${
|
|
421
|
+
console.log(` ${ansis__default.dim(`${sizeStr} | ${isZh ? "\u4FEE\u6539\u4E8E" : "Modified"}: ${dateStr}`)}`);
|
|
421
422
|
} else if (!file.exists) {
|
|
422
|
-
console.log(` ${
|
|
423
|
+
console.log(` ${ansis__default.dim(isZh ? "(\u4E0D\u5B58\u5728)" : "(not exists)")}`);
|
|
423
424
|
}
|
|
424
425
|
}
|
|
425
426
|
async function viewContextFiles(lang) {
|
|
426
427
|
const isZh = lang === "zh-CN";
|
|
427
428
|
const files = getContextFiles();
|
|
428
|
-
console.log(
|
|
429
|
+
console.log(ansis__default.green.bold(`
|
|
429
430
|
\u{1F4C1} ${isZh ? "\u4E0A\u4E0B\u6587\u6587\u4EF6" : "Context Files"}
|
|
430
431
|
`));
|
|
431
432
|
for (const file of files) {
|
|
@@ -454,20 +455,20 @@ async function viewContextFiles(lang) {
|
|
|
454
455
|
if (viewFile !== "skip") {
|
|
455
456
|
const content = readContextFile(viewFile);
|
|
456
457
|
if (content) {
|
|
457
|
-
console.log(
|
|
458
|
+
console.log(ansis__default.dim(`
|
|
458
459
|
${"\u2500".repeat(50)}`));
|
|
459
460
|
console.log(content);
|
|
460
|
-
console.log(
|
|
461
|
+
console.log(ansis__default.dim(`${"\u2500".repeat(50)}
|
|
461
462
|
`));
|
|
462
463
|
} else {
|
|
463
|
-
console.log(
|
|
464
|
+
console.log(ansis__default.yellow(isZh ? "\u65E0\u6CD5\u8BFB\u53D6\u6587\u4EF6\u5185\u5BB9" : "Unable to read file content"));
|
|
464
465
|
}
|
|
465
466
|
}
|
|
466
467
|
}
|
|
467
468
|
}
|
|
468
469
|
async function generateContextRules(context, lang) {
|
|
469
470
|
const isZh = lang === "zh-CN";
|
|
470
|
-
console.log(
|
|
471
|
+
console.log(ansis__default.green.bold(`
|
|
471
472
|
\u2728 ${isZh ? "\u81EA\u52A8\u751F\u6210\u89C4\u5219" : "Auto-generate Rules"}
|
|
472
473
|
`));
|
|
473
474
|
const recommendedIds = getRecommendedRules(context);
|
|
@@ -478,14 +479,14 @@ async function generateContextRules(context, lang) {
|
|
|
478
479
|
name: "selectedRules",
|
|
479
480
|
message: isZh ? "\u9009\u62E9\u8981\u5E94\u7528\u7684\u89C4\u5219\uFF08\u63A8\u8350\u89C4\u5219\u5DF2\u9884\u9009\uFF09" : "Select rules to apply (recommended rules pre-selected)",
|
|
480
481
|
choices: applicableRules.map((rule) => ({
|
|
481
|
-
name: `${recommendedIds.includes(rule.id) ?
|
|
482
|
+
name: `${recommendedIds.includes(rule.id) ? ansis__default.green("\u2605") : " "} ${isZh ? rule.nameZh : rule.name} - ${ansis__default.dim(isZh ? rule.descriptionZh : rule.description)}`,
|
|
482
483
|
value: rule.id,
|
|
483
484
|
checked: recommendedIds.includes(rule.id)
|
|
484
485
|
}))
|
|
485
486
|
}
|
|
486
487
|
]);
|
|
487
488
|
if (selectedRules.length === 0) {
|
|
488
|
-
console.log(
|
|
489
|
+
console.log(ansis__default.yellow(isZh ? "\u672A\u9009\u62E9\u4EFB\u4F55\u89C4\u5219" : "No rules selected"));
|
|
489
490
|
return;
|
|
490
491
|
}
|
|
491
492
|
const { location } = await inquirer.prompt([
|
|
@@ -513,7 +514,7 @@ async function generateContextRules(context, lang) {
|
|
|
513
514
|
const files = getContextFiles();
|
|
514
515
|
const targetFile = files.find((f) => f.type === location);
|
|
515
516
|
if (!targetFile) {
|
|
516
|
-
console.log(
|
|
517
|
+
console.log(ansis__default.red(isZh ? "\u65E0\u6CD5\u786E\u5B9A\u76EE\u6807\u8DEF\u5F84" : "Unable to determine target path"));
|
|
517
518
|
return;
|
|
518
519
|
}
|
|
519
520
|
if (targetFile.exists) {
|
|
@@ -547,10 +548,10 @@ async function generateContextRules(context, lang) {
|
|
|
547
548
|
const mergedContent = mergeContextContent(existingContent, selectedRules, lang);
|
|
548
549
|
const success2 = await writeContextFile(targetFile.path, mergedContent);
|
|
549
550
|
if (success2) {
|
|
550
|
-
console.log(
|
|
551
|
+
console.log(ansis__default.green(`
|
|
551
552
|
\u2705 ${isZh ? "\u89C4\u5219\u5DF2\u5408\u5E76\u5230" : "Rules merged to"}: ${targetFile.path}`));
|
|
552
553
|
} else {
|
|
553
|
-
console.log(
|
|
554
|
+
console.log(ansis__default.red(`
|
|
554
555
|
\u274C ${isZh ? "\u5199\u5165\u5931\u8D25" : "Write failed"}`));
|
|
555
556
|
}
|
|
556
557
|
return;
|
|
@@ -560,16 +561,16 @@ async function generateContextRules(context, lang) {
|
|
|
560
561
|
const content = generateContextContent(context, selectedRules, lang);
|
|
561
562
|
const success = await writeContextFile(targetFile.path, content);
|
|
562
563
|
if (success) {
|
|
563
|
-
console.log(
|
|
564
|
+
console.log(ansis__default.green(`
|
|
564
565
|
\u2705 ${isZh ? "\u5DF2\u751F\u6210" : "Generated"}: ${targetFile.path}`));
|
|
565
566
|
} else {
|
|
566
|
-
console.log(
|
|
567
|
+
console.log(ansis__default.red(`
|
|
567
568
|
\u274C ${isZh ? "\u5199\u5165\u5931\u8D25" : "Write failed"}`));
|
|
568
569
|
}
|
|
569
570
|
}
|
|
570
571
|
async function addRulesToContext(context, lang) {
|
|
571
572
|
const isZh = lang === "zh-CN";
|
|
572
|
-
console.log(
|
|
573
|
+
console.log(ansis__default.green.bold(`
|
|
573
574
|
\u{1F4DD} ${isZh ? "\u6DFB\u52A0\u89C4\u5219" : "Add Rules"}
|
|
574
575
|
`));
|
|
575
576
|
const applicableRules = getApplicableRules(context.type);
|
|
@@ -579,13 +580,13 @@ async function addRulesToContext(context, lang) {
|
|
|
579
580
|
name: "selectedRules",
|
|
580
581
|
message: isZh ? "\u9009\u62E9\u8981\u6DFB\u52A0\u7684\u89C4\u5219" : "Select rules to add",
|
|
581
582
|
choices: applicableRules.map((rule) => ({
|
|
582
|
-
name: `${isZh ? rule.nameZh : rule.name} - ${
|
|
583
|
+
name: `${isZh ? rule.nameZh : rule.name} - ${ansis__default.dim(isZh ? rule.descriptionZh : rule.description)}`,
|
|
583
584
|
value: rule.id
|
|
584
585
|
}))
|
|
585
586
|
}
|
|
586
587
|
]);
|
|
587
588
|
if (selectedRules.length === 0) {
|
|
588
|
-
console.log(
|
|
589
|
+
console.log(ansis__default.yellow(isZh ? "\u672A\u9009\u62E9\u4EFB\u4F55\u89C4\u5219" : "No rules selected"));
|
|
589
590
|
return;
|
|
590
591
|
}
|
|
591
592
|
const files = getContextFiles();
|
|
@@ -642,7 +643,7 @@ async function addRulesToContext(context, lang) {
|
|
|
642
643
|
targetPath = files.find((f) => f.type === location)?.path || "";
|
|
643
644
|
}
|
|
644
645
|
if (!targetPath) {
|
|
645
|
-
console.log(
|
|
646
|
+
console.log(ansis__default.red(isZh ? "\u65E0\u6CD5\u786E\u5B9A\u76EE\u6807\u8DEF\u5F84" : "Unable to determine target path"));
|
|
646
647
|
return;
|
|
647
648
|
}
|
|
648
649
|
const existingContent = readContextFile(targetPath);
|
|
@@ -654,16 +655,16 @@ async function addRulesToContext(context, lang) {
|
|
|
654
655
|
}
|
|
655
656
|
const success = await writeContextFile(targetPath, finalContent);
|
|
656
657
|
if (success) {
|
|
657
|
-
console.log(
|
|
658
|
+
console.log(ansis__default.green(`
|
|
658
659
|
\u2705 ${isZh ? "\u89C4\u5219\u5DF2\u6DFB\u52A0\u5230" : "Rules added to"}: ${targetPath}`));
|
|
659
660
|
} else {
|
|
660
|
-
console.log(
|
|
661
|
+
console.log(ansis__default.red(`
|
|
661
662
|
\u274C ${isZh ? "\u5199\u5165\u5931\u8D25" : "Write failed"}`));
|
|
662
663
|
}
|
|
663
664
|
}
|
|
664
665
|
async function browseRules(context, lang) {
|
|
665
666
|
const isZh = lang === "zh-CN";
|
|
666
|
-
console.log(
|
|
667
|
+
console.log(ansis__default.green.bold(`
|
|
667
668
|
\u{1F4D6} ${isZh ? "\u53EF\u7528\u89C4\u5219" : "Available Rules"}
|
|
668
669
|
`));
|
|
669
670
|
const applicableRules = getApplicableRules(context.type);
|
|
@@ -683,13 +684,13 @@ async function browseRules(context, lang) {
|
|
|
683
684
|
};
|
|
684
685
|
for (const [category, rules] of Object.entries(categories)) {
|
|
685
686
|
const label = isZh ? categoryLabels[category]?.zh : categoryLabels[category]?.en;
|
|
686
|
-
console.log(
|
|
687
|
+
console.log(ansis__default.bold(`
|
|
687
688
|
${label || category}:`));
|
|
688
689
|
for (const rule of rules) {
|
|
689
690
|
const name = isZh ? rule.nameZh : rule.name;
|
|
690
691
|
const desc = isZh ? rule.descriptionZh : rule.description;
|
|
691
|
-
console.log(` ${
|
|
692
|
-
console.log(` ${
|
|
692
|
+
console.log(` ${ansis__default.green("\u2022")} ${ansis__default.bold(name)}`);
|
|
693
|
+
console.log(` ${ansis__default.dim(desc)}`);
|
|
693
694
|
}
|
|
694
695
|
}
|
|
695
696
|
console.log("");
|
|
@@ -713,13 +714,13 @@ ${label || category}:`));
|
|
|
713
714
|
if (viewRule !== "skip") {
|
|
714
715
|
const rule = applicableRules.find((r) => r.id === viewRule);
|
|
715
716
|
if (rule) {
|
|
716
|
-
console.log(
|
|
717
|
+
console.log(ansis__default.dim(`
|
|
717
718
|
${"\u2500".repeat(50)}`));
|
|
718
|
-
console.log(
|
|
719
|
-
console.log(
|
|
719
|
+
console.log(ansis__default.bold(isZh ? rule.nameZh : rule.name));
|
|
720
|
+
console.log(ansis__default.dim(isZh ? rule.descriptionZh : rule.description));
|
|
720
721
|
console.log("");
|
|
721
722
|
console.log(isZh ? rule.contentZh : rule.content);
|
|
722
|
-
console.log(
|
|
723
|
+
console.log(ansis__default.dim(`${"\u2500".repeat(50)}
|
|
723
724
|
`));
|
|
724
725
|
}
|
|
725
726
|
}
|
|
@@ -2001,14 +2002,14 @@ async function hooksSync(options = {}) {
|
|
|
2001
2002
|
break;
|
|
2002
2003
|
case "enable":
|
|
2003
2004
|
if (!options.hookId) {
|
|
2004
|
-
console.log(
|
|
2005
|
+
console.log(ansis__default.red(i18n.t("menu:hooksSync.errors.hookIdRequired")));
|
|
2005
2006
|
return;
|
|
2006
2007
|
}
|
|
2007
2008
|
await toggleHook(options.hookId, true);
|
|
2008
2009
|
break;
|
|
2009
2010
|
case "disable":
|
|
2010
2011
|
if (!options.hookId) {
|
|
2011
|
-
console.log(
|
|
2012
|
+
console.log(ansis__default.red(i18n.t("menu:hooksSync.errors.hookIdRequired")));
|
|
2012
2013
|
return;
|
|
2013
2014
|
}
|
|
2014
2015
|
await toggleHook(options.hookId, false);
|
|
@@ -2036,7 +2037,7 @@ async function hooksSync(options = {}) {
|
|
|
2036
2037
|
}
|
|
2037
2038
|
async function showHooksMenu(lang) {
|
|
2038
2039
|
while (true) {
|
|
2039
|
-
console.log(
|
|
2040
|
+
console.log(ansis__default.green.bold(`
|
|
2040
2041
|
${i18n.t("menu:hooksSync.title")}
|
|
2041
2042
|
`));
|
|
2042
2043
|
const { action } = await inquirer.prompt([{
|
|
@@ -2050,7 +2051,7 @@ ${i18n.t("menu:hooksSync.title")}
|
|
|
2050
2051
|
{ name: `\u2601\uFE0F ${i18n.t("menu:mcpMarket.upload") || "Upload"}`, value: "upload" },
|
|
2051
2052
|
{ name: `\u{1F4E5} ${i18n.t("menu:mcpMarket.download") || "Download"}`, value: "download" },
|
|
2052
2053
|
new inquirer.Separator(),
|
|
2053
|
-
{ name:
|
|
2054
|
+
{ name: ansis__default.gray(`\u21A9\uFE0F ${i18n.t("common:back")}`), value: "back" }
|
|
2054
2055
|
]
|
|
2055
2056
|
}]);
|
|
2056
2057
|
if (!action || action === "back") {
|
|
@@ -2076,11 +2077,11 @@ ${i18n.t("menu:hooksSync.title")}
|
|
|
2076
2077
|
}
|
|
2077
2078
|
}
|
|
2078
2079
|
async function syncHooks() {
|
|
2079
|
-
console.log(
|
|
2080
|
+
console.log(ansis__default.green(`
|
|
2080
2081
|
\u23F3 ${i18n.t("menu:hooksSync.syncNowDesc")}...`));
|
|
2081
2082
|
try {
|
|
2082
2083
|
const localHooks = await loadLocalHooks();
|
|
2083
|
-
console.log(
|
|
2084
|
+
console.log(ansis__default.dim(` ${i18n.t("hooksSync:labels.localHooks")}: ${localHooks.length}`));
|
|
2084
2085
|
const client = new CloudHooksSyncClient({
|
|
2085
2086
|
enableLogging: false
|
|
2086
2087
|
});
|
|
@@ -2089,52 +2090,52 @@ async function syncHooks() {
|
|
|
2089
2090
|
overwrite: false
|
|
2090
2091
|
});
|
|
2091
2092
|
if (result.success && result.data) {
|
|
2092
|
-
console.log(
|
|
2093
|
+
console.log(ansis__default.green(`
|
|
2093
2094
|
\u2705 ${i18n.t("hooksSync:actions.syncCompleted")}`));
|
|
2094
|
-
console.log(
|
|
2095
|
-
console.log(
|
|
2096
|
-
console.log(
|
|
2095
|
+
console.log(ansis__default.dim(` ${i18n.t("hooksSync:labels.uploaded")}: ${result.data.uploaded}`));
|
|
2096
|
+
console.log(ansis__default.dim(` ${i18n.t("hooksSync:labels.downloaded")}: ${result.data.downloaded}`));
|
|
2097
|
+
console.log(ansis__default.dim(` ${i18n.t("hooksSync:labels.skipped")}: ${result.data.skipped}`));
|
|
2097
2098
|
if (result.data.failed > 0) {
|
|
2098
|
-
console.log(
|
|
2099
|
+
console.log(ansis__default.yellow(` ${i18n.t("hooksSync:labels.failed")}: ${result.data.failed}`));
|
|
2099
2100
|
}
|
|
2100
2101
|
await saveLocalHooks(localHooks, result.data.timestamp);
|
|
2101
2102
|
} else {
|
|
2102
|
-
console.log(
|
|
2103
|
+
console.log(ansis__default.red(`
|
|
2103
2104
|
\u274C ${i18n.t("hooksSync:actions.syncError", { error: result.error || "Unknown error" })}`));
|
|
2104
2105
|
}
|
|
2105
2106
|
} catch (error) {
|
|
2106
|
-
console.log(
|
|
2107
|
+
console.log(ansis__default.red(`
|
|
2107
2108
|
\u274C ${i18n.t("hooksSync:actions.syncError", { error: error instanceof Error ? error.message : String(error) })}`));
|
|
2108
2109
|
}
|
|
2109
2110
|
}
|
|
2110
2111
|
async function uploadHooks() {
|
|
2111
|
-
console.log(
|
|
2112
|
+
console.log(ansis__default.green(`
|
|
2112
2113
|
\u23F3 ${i18n.t("hooksSync:actions.uploading")}`));
|
|
2113
2114
|
try {
|
|
2114
2115
|
const localHooks = await loadLocalHooks();
|
|
2115
2116
|
if (localHooks.length === 0) {
|
|
2116
|
-
console.log(
|
|
2117
|
+
console.log(ansis__default.yellow(`
|
|
2117
2118
|
\u26A0\uFE0F ${i18n.t("hooksSync:errors.noHooksFound")}`));
|
|
2118
2119
|
return;
|
|
2119
2120
|
}
|
|
2120
|
-
console.log(
|
|
2121
|
+
console.log(ansis__default.dim(` ${i18n.t("hooksSync:labels.found")} ${localHooks.length} ${i18n.t("hooksSync:labels.localHooks").toLowerCase()}`));
|
|
2121
2122
|
const client = new CloudHooksSyncClient();
|
|
2122
2123
|
const result = await client.uploadHooks(localHooks);
|
|
2123
2124
|
if (result.success && result.data) {
|
|
2124
|
-
console.log(
|
|
2125
|
+
console.log(ansis__default.green(`
|
|
2125
2126
|
\u2705 ${i18n.t("hooksSync:actions.uploadCompleted")}`));
|
|
2126
|
-
console.log(
|
|
2127
|
+
console.log(ansis__default.dim(` ${i18n.t("hooksSync:labels.uploaded")}: ${result.data.uploaded}`));
|
|
2127
2128
|
} else {
|
|
2128
|
-
console.log(
|
|
2129
|
+
console.log(ansis__default.red(`
|
|
2129
2130
|
\u274C ${i18n.t("hooksSync:actions.uploadError", { error: result.error || "Unknown error" })}`));
|
|
2130
2131
|
}
|
|
2131
2132
|
} catch (error) {
|
|
2132
|
-
console.log(
|
|
2133
|
+
console.log(ansis__default.red(`
|
|
2133
2134
|
\u274C ${i18n.t("hooksSync:actions.uploadError", { error: error instanceof Error ? error.message : String(error) })}`));
|
|
2134
2135
|
}
|
|
2135
2136
|
}
|
|
2136
2137
|
async function downloadHooks(options = {}) {
|
|
2137
|
-
console.log(
|
|
2138
|
+
console.log(ansis__default.green(`
|
|
2138
2139
|
\u23F3 ${i18n.t("hooksSync:actions.downloading")}`));
|
|
2139
2140
|
try {
|
|
2140
2141
|
const client = new CloudHooksSyncClient();
|
|
@@ -2143,30 +2144,30 @@ async function downloadHooks(options = {}) {
|
|
|
2143
2144
|
category: options.category
|
|
2144
2145
|
});
|
|
2145
2146
|
if (result.success && result.data) {
|
|
2146
|
-
console.log(
|
|
2147
|
+
console.log(ansis__default.green(`
|
|
2147
2148
|
\u2705 ${i18n.t("hooksSync:actions.downloadCompleted")}`));
|
|
2148
|
-
console.log(
|
|
2149
|
+
console.log(ansis__default.dim(` ${i18n.t("hooksSync:labels.downloaded")}: ${result.data.length}`));
|
|
2149
2150
|
await saveLocalHooks(result.data);
|
|
2150
2151
|
result.data.forEach((hook) => {
|
|
2151
|
-
console.log(` ${
|
|
2152
|
+
console.log(` ${ansis__default.green("\u2022")} ${hook.name} ${ansis__default.dim(`(${hook.id})`)}`);
|
|
2152
2153
|
});
|
|
2153
2154
|
} else {
|
|
2154
|
-
console.log(
|
|
2155
|
+
console.log(ansis__default.red(`
|
|
2155
2156
|
\u274C ${i18n.t("hooksSync:actions.downloadError", { error: result.error || "Unknown error" })}`));
|
|
2156
2157
|
}
|
|
2157
2158
|
} catch (error) {
|
|
2158
|
-
console.log(
|
|
2159
|
+
console.log(ansis__default.red(`
|
|
2159
2160
|
\u274C ${i18n.t("hooksSync:actions.downloadError", { error: error instanceof Error ? error.message : String(error) })}`));
|
|
2160
2161
|
}
|
|
2161
2162
|
}
|
|
2162
2163
|
async function listHooks(options = {}) {
|
|
2163
|
-
console.log(
|
|
2164
|
+
console.log(ansis__default.green.bold(`
|
|
2164
2165
|
\u{1F4CB} ${i18n.t("hooksSync:labels.localHooks")}
|
|
2165
2166
|
`));
|
|
2166
2167
|
try {
|
|
2167
2168
|
const hooks = await loadLocalHooks();
|
|
2168
2169
|
if (hooks.length === 0) {
|
|
2169
|
-
console.log(
|
|
2170
|
+
console.log(ansis__default.yellow(` ${i18n.t("hooksSync:errors.noHooksFound")}`));
|
|
2170
2171
|
return;
|
|
2171
2172
|
}
|
|
2172
2173
|
const filteredHooks = options.category ? hooks.filter((h) => h.metadata.category === options.category) : hooks;
|
|
@@ -2179,19 +2180,19 @@ async function listHooks(options = {}) {
|
|
|
2179
2180
|
byCategory.get(category).push(hook);
|
|
2180
2181
|
}
|
|
2181
2182
|
for (const [category, categoryHooks] of byCategory) {
|
|
2182
|
-
console.log(
|
|
2183
|
+
console.log(ansis__default.bold(`
|
|
2183
2184
|
${category}:`));
|
|
2184
2185
|
for (const hook of categoryHooks) {
|
|
2185
|
-
const status = hook.enabled ?
|
|
2186
|
-
const privacy = hook.privacy === "public" ?
|
|
2187
|
-
console.log(` ${status} ${privacy} ${hook.name} ${
|
|
2188
|
-
console.log(` ${
|
|
2186
|
+
const status = hook.enabled ? ansis__default.green("\u2713") : ansis__default.red("\u2717");
|
|
2187
|
+
const privacy = hook.privacy === "public" ? ansis__default.green("\u{1F310}") : ansis__default.dim("\u{1F512}");
|
|
2188
|
+
console.log(` ${status} ${privacy} ${hook.name} ${ansis__default.dim(`(${hook.id})`)}`);
|
|
2189
|
+
console.log(` ${ansis__default.dim(hook.metadata.description)}`);
|
|
2189
2190
|
}
|
|
2190
2191
|
}
|
|
2191
|
-
console.log(
|
|
2192
|
+
console.log(ansis__default.dim(`
|
|
2192
2193
|
${i18n.t("hooksSync:labels.total")}: ${filteredHooks.length}`));
|
|
2193
2194
|
} catch (error) {
|
|
2194
|
-
console.log(
|
|
2195
|
+
console.log(ansis__default.red(`
|
|
2195
2196
|
\u274C ${i18n.t("common:error")}: ${error instanceof Error ? error.message : String(error)}`));
|
|
2196
2197
|
}
|
|
2197
2198
|
}
|
|
@@ -2200,7 +2201,7 @@ async function toggleHook(hookId, enabled) {
|
|
|
2200
2201
|
const hooks = await loadLocalHooks();
|
|
2201
2202
|
const hook = hooks.find((h) => h.id === hookId);
|
|
2202
2203
|
if (!hook) {
|
|
2203
|
-
console.log(
|
|
2204
|
+
console.log(ansis__default.red(`
|
|
2204
2205
|
\u274C ${i18n.t("hooksSync:errors.hookNotFound", { id: hookId })}`));
|
|
2205
2206
|
return;
|
|
2206
2207
|
}
|
|
@@ -2216,16 +2217,16 @@ async function toggleHook(hookId, enabled) {
|
|
|
2216
2217
|
registry.disable(hookId);
|
|
2217
2218
|
}
|
|
2218
2219
|
}
|
|
2219
|
-
const status = enabled ?
|
|
2220
|
+
const status = enabled ? ansis__default.green(i18n.t("hooksSync:labels.enabled")) : ansis__default.red(i18n.t("hooksSync:labels.disabled"));
|
|
2220
2221
|
console.log(`
|
|
2221
2222
|
\u2705 ${i18n.t("hooksSync:actions.hookToggled", { status, name: hook.name })}`);
|
|
2222
2223
|
} catch (error) {
|
|
2223
|
-
console.log(
|
|
2224
|
+
console.log(ansis__default.red(`
|
|
2224
2225
|
\u274C ${i18n.t("common:error")}: ${error instanceof Error ? error.message : String(error)}`));
|
|
2225
2226
|
}
|
|
2226
2227
|
}
|
|
2227
2228
|
async function browseTemplates(lang, options = {}) {
|
|
2228
|
-
console.log(
|
|
2229
|
+
console.log(ansis__default.green.bold(`
|
|
2229
2230
|
\u{1F4DA} ${i18n.t("menu:hooksSync.browseTemplates")}
|
|
2230
2231
|
`));
|
|
2231
2232
|
try {
|
|
@@ -2233,14 +2234,14 @@ async function browseTemplates(lang, options = {}) {
|
|
|
2233
2234
|
const categories = hookTemplatesData.categories;
|
|
2234
2235
|
const filteredTemplates = options.category ? templates.filter((t) => t.category === options.category) : templates;
|
|
2235
2236
|
if (filteredTemplates.length === 0) {
|
|
2236
|
-
console.log(
|
|
2237
|
+
console.log(ansis__default.yellow(` ${i18n.t("hooksSync:errors.noTemplatesFound")}`));
|
|
2237
2238
|
return;
|
|
2238
2239
|
}
|
|
2239
|
-
console.log(
|
|
2240
|
+
console.log(ansis__default.bold(`${i18n.t("hooksSync:labels.categories")}:`));
|
|
2240
2241
|
for (const cat of categories) {
|
|
2241
2242
|
const count = templates.filter((t) => t.category === cat.id).length;
|
|
2242
2243
|
const catName = cat.name[lang] || cat.name.en;
|
|
2243
|
-
console.log(` ${cat.icon} ${catName} ${
|
|
2244
|
+
console.log(` ${cat.icon} ${catName} ${ansis__default.dim(`(${count})`)}`);
|
|
2244
2245
|
}
|
|
2245
2246
|
const { templateId } = await inquirer.prompt([{
|
|
2246
2247
|
type: "list",
|
|
@@ -2258,12 +2259,12 @@ async function browseTemplates(lang, options = {}) {
|
|
|
2258
2259
|
if (!template) {
|
|
2259
2260
|
return;
|
|
2260
2261
|
}
|
|
2261
|
-
console.log(
|
|
2262
|
+
console.log(ansis__default.bold(`
|
|
2262
2263
|
${template.name}`));
|
|
2263
|
-
console.log(
|
|
2264
|
-
console.log(
|
|
2264
|
+
console.log(ansis__default.dim(template.description));
|
|
2265
|
+
console.log(ansis__default.bold(`
|
|
2265
2266
|
${i18n.t("hooksSync:labels.category")}: `) + template.category);
|
|
2266
|
-
console.log(
|
|
2267
|
+
console.log(ansis__default.bold(`${i18n.t("hooksSync:labels.variables")}: `) + template.variables.join(", "));
|
|
2267
2268
|
const { confirm } = await inquirer.prompt([{
|
|
2268
2269
|
type: "confirm",
|
|
2269
2270
|
name: "confirm",
|
|
@@ -2275,7 +2276,7 @@ ${i18n.t("hooksSync:labels.category")}: `) + template.category);
|
|
|
2275
2276
|
}
|
|
2276
2277
|
await installTemplate(template);
|
|
2277
2278
|
} catch (error) {
|
|
2278
|
-
console.log(
|
|
2279
|
+
console.log(ansis__default.red(`
|
|
2279
2280
|
\u274C ${i18n.t("common:error")}: ${error instanceof Error ? error.message : String(error)}`));
|
|
2280
2281
|
}
|
|
2281
2282
|
}
|
|
@@ -2299,10 +2300,10 @@ async function installTemplate(template) {
|
|
|
2299
2300
|
const registry = getGlobalRegistry();
|
|
2300
2301
|
const localHook = convertFromCloudHook(cloudHook);
|
|
2301
2302
|
registry.register(localHook);
|
|
2302
|
-
console.log(
|
|
2303
|
+
console.log(ansis__default.green(`
|
|
2303
2304
|
\u2705 ${i18n.t("hooksSync:actions.templateInstalled", { name: template.name })}`));
|
|
2304
2305
|
} catch (error) {
|
|
2305
|
-
console.log(
|
|
2306
|
+
console.log(ansis__default.red(`
|
|
2306
2307
|
\u274C ${i18n.t("hooksSync:actions.installError", { error: error instanceof Error ? error.message : String(error) })}`));
|
|
2307
2308
|
}
|
|
2308
2309
|
}
|
|
@@ -2351,7 +2352,7 @@ function getCurrentCodeTool() {
|
|
|
2351
2352
|
}
|
|
2352
2353
|
function printSeparator() {
|
|
2353
2354
|
console.log(`
|
|
2354
|
-
${
|
|
2355
|
+
${ansis__default.dim("\u2500".repeat(50))}
|
|
2355
2356
|
`);
|
|
2356
2357
|
}
|
|
2357
2358
|
function getCodeToolLabel(codeTool) {
|
|
@@ -2371,7 +2372,7 @@ async function promptCodeToolSelection(current) {
|
|
|
2371
2372
|
choices
|
|
2372
2373
|
});
|
|
2373
2374
|
if (!tool) {
|
|
2374
|
-
console.log(
|
|
2375
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
2375
2376
|
return null;
|
|
2376
2377
|
}
|
|
2377
2378
|
return tool;
|
|
@@ -2382,28 +2383,28 @@ async function handleCodeToolSwitch(current) {
|
|
|
2382
2383
|
return false;
|
|
2383
2384
|
}
|
|
2384
2385
|
updateZcfConfig({ codeToolType: newTool });
|
|
2385
|
-
console.log(
|
|
2386
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("menu:codeToolSwitched", { tool: getCodeToolLabel(newTool) })}`));
|
|
2386
2387
|
return true;
|
|
2387
2388
|
}
|
|
2388
2389
|
async function showSuperpowersMenu() {
|
|
2389
|
-
console.log(
|
|
2390
|
+
console.log(ansis__default.green(i18n.t("menu:superpowers.title")));
|
|
2390
2391
|
console.log(" -------- Superpowers --------");
|
|
2391
2392
|
console.log(
|
|
2392
|
-
` ${
|
|
2393
|
+
` ${ansis__default.green("1.")} ${i18n.t("menu:superpowers.install")} ${ansis__default.gray(`- ${i18n.t("menu:superpowers.installDesc")}`)}`
|
|
2393
2394
|
);
|
|
2394
2395
|
console.log(
|
|
2395
|
-
` ${
|
|
2396
|
+
` ${ansis__default.green("2.")} ${i18n.t("menu:superpowers.uninstall")} ${ansis__default.gray(`- ${i18n.t("menu:superpowers.uninstallDesc")}`)}`
|
|
2396
2397
|
);
|
|
2397
2398
|
console.log(
|
|
2398
|
-
` ${
|
|
2399
|
+
` ${ansis__default.green("3.")} ${i18n.t("menu:superpowers.update")} ${ansis__default.gray(`- ${i18n.t("menu:superpowers.updateDesc")}`)}`
|
|
2399
2400
|
);
|
|
2400
2401
|
console.log(
|
|
2401
|
-
` ${
|
|
2402
|
+
` ${ansis__default.green("4.")} ${i18n.t("menu:superpowers.status")} ${ansis__default.gray(`- ${i18n.t("menu:superpowers.statusDesc")}`)}`
|
|
2402
2403
|
);
|
|
2403
2404
|
console.log(
|
|
2404
|
-
` ${
|
|
2405
|
+
` ${ansis__default.green("5.")} ${i18n.t("menu:superpowers.skills")} ${ansis__default.gray(`- ${i18n.t("menu:superpowers.skillsDesc")}`)}`
|
|
2405
2406
|
);
|
|
2406
|
-
console.log(` ${
|
|
2407
|
+
console.log(` ${ansis__default.green("0.")} ${i18n.t("common:back")}`);
|
|
2407
2408
|
console.log("");
|
|
2408
2409
|
const { choice } = await inquirer.prompt({
|
|
2409
2410
|
type: "input",
|
|
@@ -2421,7 +2422,7 @@ async function showSuperpowersMenu() {
|
|
|
2421
2422
|
case "1": {
|
|
2422
2423
|
const status = await checkSuperpowersInstalled();
|
|
2423
2424
|
if (status.installed) {
|
|
2424
|
-
console.log(
|
|
2425
|
+
console.log(ansis__default.yellow(i18n.t("superpowers:alreadyInstalled")));
|
|
2425
2426
|
break;
|
|
2426
2427
|
}
|
|
2427
2428
|
const { method } = await inquirer.prompt({
|
|
@@ -2443,7 +2444,7 @@ async function showSuperpowersMenu() {
|
|
|
2443
2444
|
case "2": {
|
|
2444
2445
|
const status = await checkSuperpowersInstalled();
|
|
2445
2446
|
if (!status.installed) {
|
|
2446
|
-
console.log(
|
|
2447
|
+
console.log(ansis__default.yellow(i18n.t("superpowers:status.notInstalled")));
|
|
2447
2448
|
break;
|
|
2448
2449
|
}
|
|
2449
2450
|
await uninstallSuperpowers();
|
|
@@ -2452,7 +2453,7 @@ async function showSuperpowersMenu() {
|
|
|
2452
2453
|
case "3": {
|
|
2453
2454
|
const status = await checkSuperpowersInstalled();
|
|
2454
2455
|
if (!status.installed) {
|
|
2455
|
-
console.log(
|
|
2456
|
+
console.log(ansis__default.yellow(i18n.t("superpowers:status.notInstalled")));
|
|
2456
2457
|
break;
|
|
2457
2458
|
}
|
|
2458
2459
|
await updateSuperpowers();
|
|
@@ -2461,25 +2462,25 @@ async function showSuperpowersMenu() {
|
|
|
2461
2462
|
case "4": {
|
|
2462
2463
|
const status = await checkSuperpowersInstalled();
|
|
2463
2464
|
if (status.installed) {
|
|
2464
|
-
console.log(
|
|
2465
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("superpowers:status.installed")}`));
|
|
2465
2466
|
} else {
|
|
2466
|
-
console.log(
|
|
2467
|
+
console.log(ansis__default.yellow(i18n.t("superpowers:status.notInstalled")));
|
|
2467
2468
|
}
|
|
2468
2469
|
break;
|
|
2469
2470
|
}
|
|
2470
2471
|
case "5": {
|
|
2471
2472
|
const status = await checkSuperpowersInstalled();
|
|
2472
2473
|
if (!status.installed) {
|
|
2473
|
-
console.log(
|
|
2474
|
+
console.log(ansis__default.yellow(i18n.t("superpowers:status.notInstalled")));
|
|
2474
2475
|
break;
|
|
2475
2476
|
}
|
|
2476
2477
|
const skills = await getSuperpowersSkills();
|
|
2477
2478
|
if (skills.length === 0) {
|
|
2478
|
-
console.log(
|
|
2479
|
+
console.log(ansis__default.yellow(i18n.t("superpowers:skills.noSkills")));
|
|
2479
2480
|
} else {
|
|
2480
|
-
console.log(
|
|
2481
|
+
console.log(ansis__default.green(i18n.t("superpowers:skills.available")));
|
|
2481
2482
|
skills.forEach((skill) => {
|
|
2482
|
-
console.log(` ${
|
|
2483
|
+
console.log(` ${ansis__default.green("\u2022")} ${skill}`);
|
|
2483
2484
|
});
|
|
2484
2485
|
}
|
|
2485
2486
|
break;
|
|
@@ -2494,35 +2495,35 @@ async function showSuperpowersMenu() {
|
|
|
2494
2495
|
async function showCCMMenu() {
|
|
2495
2496
|
const { isCCMSupported, isCCMInstalled, installCCM, getCCMSupportMessage } = await import('./index.mjs');
|
|
2496
2497
|
if (!isCCMSupported()) {
|
|
2497
|
-
console.log(
|
|
2498
|
+
console.log(ansis__default.yellow(`
|
|
2498
2499
|
${getCCMSupportMessage()}`));
|
|
2499
2500
|
return;
|
|
2500
2501
|
}
|
|
2501
|
-
console.log(
|
|
2502
|
+
console.log(ansis__default.green(i18n.t("ccm.menu.title")));
|
|
2502
2503
|
console.log(" -------- Claude Code Monitor --------");
|
|
2503
2504
|
console.log(
|
|
2504
|
-
` ${
|
|
2505
|
+
` ${ansis__default.green("1.")} ${i18n.t("ccm.actions.launch")} ${ansis__default.gray(`- ${i18n.t("ccm.menu.description")}`)}`
|
|
2505
2506
|
);
|
|
2506
2507
|
console.log(
|
|
2507
|
-
` ${
|
|
2508
|
+
` ${ansis__default.green("2.")} ${i18n.t("ccm.actions.setup")} ${ansis__default.gray(`- Configure hooks`)}`
|
|
2508
2509
|
);
|
|
2509
2510
|
console.log(
|
|
2510
|
-
` ${
|
|
2511
|
+
` ${ansis__default.green("3.")} ${i18n.t("ccm.actions.status")} ${ansis__default.gray(`- View active sessions`)}`
|
|
2511
2512
|
);
|
|
2512
2513
|
console.log(
|
|
2513
|
-
` ${
|
|
2514
|
+
` ${ansis__default.green("4.")} ${i18n.t("ccm.actions.clear")} ${ansis__default.gray(`- Clear all sessions`)}`
|
|
2514
2515
|
);
|
|
2515
2516
|
const isInstalled = await isCCMInstalled();
|
|
2516
2517
|
if (!isInstalled) {
|
|
2517
2518
|
console.log(
|
|
2518
|
-
` ${
|
|
2519
|
+
` ${ansis__default.green("5.")} ${ansis__default.yellow(i18n.t("common:install"))} ${ansis__default.gray(`- Install CCM`)}`
|
|
2519
2520
|
);
|
|
2520
2521
|
} else {
|
|
2521
2522
|
console.log(
|
|
2522
|
-
` ${
|
|
2523
|
+
` ${ansis__default.green("5.")} ${i18n.t("ccm.actions.uninstall")} ${ansis__default.gray(`- Uninstall CCM`)}`
|
|
2523
2524
|
);
|
|
2524
2525
|
}
|
|
2525
|
-
console.log(` ${
|
|
2526
|
+
console.log(` ${ansis__default.green("0.")} ${i18n.t("common:back")}`);
|
|
2526
2527
|
console.log("");
|
|
2527
2528
|
const validChoices = ["1", "2", "3", "4", "5", "0"];
|
|
2528
2529
|
const { choice } = await inquirer.prompt({
|
|
@@ -2541,7 +2542,7 @@ ${getCCMSupportMessage()}`));
|
|
|
2541
2542
|
switch (choice) {
|
|
2542
2543
|
case "1": {
|
|
2543
2544
|
if (!isInstalled) {
|
|
2544
|
-
console.log(
|
|
2545
|
+
console.log(ansis__default.yellow(i18n.t("ccm.installPrompt")));
|
|
2545
2546
|
const shouldInstall = await promptBoolean({
|
|
2546
2547
|
message: i18n.t("common:install"),
|
|
2547
2548
|
defaultValue: true
|
|
@@ -2557,7 +2558,7 @@ ${getCCMSupportMessage()}`));
|
|
|
2557
2558
|
}
|
|
2558
2559
|
case "2": {
|
|
2559
2560
|
if (!isInstalled) {
|
|
2560
|
-
console.log(
|
|
2561
|
+
console.log(ansis__default.yellow(i18n.t("ccm.installPrompt")));
|
|
2561
2562
|
break;
|
|
2562
2563
|
}
|
|
2563
2564
|
await setupCCMHooks();
|
|
@@ -2565,7 +2566,7 @@ ${getCCMSupportMessage()}`));
|
|
|
2565
2566
|
}
|
|
2566
2567
|
case "3": {
|
|
2567
2568
|
if (!isInstalled) {
|
|
2568
|
-
console.log(
|
|
2569
|
+
console.log(ansis__default.yellow(i18n.t("ccm.installPrompt")));
|
|
2569
2570
|
break;
|
|
2570
2571
|
}
|
|
2571
2572
|
await showCCMStatus();
|
|
@@ -2573,7 +2574,7 @@ ${getCCMSupportMessage()}`));
|
|
|
2573
2574
|
}
|
|
2574
2575
|
case "4": {
|
|
2575
2576
|
if (!isInstalled) {
|
|
2576
|
-
console.log(
|
|
2577
|
+
console.log(ansis__default.yellow(i18n.t("ccm.installPrompt")));
|
|
2577
2578
|
break;
|
|
2578
2579
|
}
|
|
2579
2580
|
await clearCCMSessions();
|
|
@@ -2596,27 +2597,27 @@ ${getCCMSupportMessage()}`));
|
|
|
2596
2597
|
}
|
|
2597
2598
|
} catch (error) {
|
|
2598
2599
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
2599
|
-
console.error(
|
|
2600
|
+
console.error(ansis__default.red(`Error: ${errorMessage}`));
|
|
2600
2601
|
}
|
|
2601
2602
|
printSeparator();
|
|
2602
2603
|
}
|
|
2603
2604
|
async function showHooksSyncMenu() {
|
|
2604
2605
|
i18n.language;
|
|
2605
|
-
console.log(
|
|
2606
|
+
console.log(ansis__default.green(i18n.t("menu:hooksSync.title")));
|
|
2606
2607
|
console.log(" -------- Hooks Cloud Sync --------");
|
|
2607
2608
|
console.log(
|
|
2608
|
-
` ${
|
|
2609
|
+
` ${ansis__default.green("1.")} ${i18n.t("menu:hooksSync.viewStatus")} ${ansis__default.gray(`- ${i18n.t("menu:hooksSync.viewStatusDesc")}`)}`
|
|
2609
2610
|
);
|
|
2610
2611
|
console.log(
|
|
2611
|
-
` ${
|
|
2612
|
+
` ${ansis__default.green("2.")} ${i18n.t("menu:hooksSync.syncNow")} ${ansis__default.gray(`- ${i18n.t("menu:hooksSync.syncNowDesc")}`)}`
|
|
2612
2613
|
);
|
|
2613
2614
|
console.log(
|
|
2614
|
-
` ${
|
|
2615
|
+
` ${ansis__default.green("3.")} ${i18n.t("menu:hooksSync.configure")} ${ansis__default.gray(`- ${i18n.t("menu:hooksSync.configureDesc")}`)}`
|
|
2615
2616
|
);
|
|
2616
2617
|
console.log(
|
|
2617
|
-
` ${
|
|
2618
|
+
` ${ansis__default.green("4.")} ${i18n.t("menu:hooksSync.browseTemplates")} ${ansis__default.gray(`- ${i18n.t("menu:hooksSync.browseTemplatesDesc")}`)}`
|
|
2618
2619
|
);
|
|
2619
|
-
console.log(` ${
|
|
2620
|
+
console.log(` ${ansis__default.green("0.")} ${i18n.t("common:back")}`);
|
|
2620
2621
|
console.log("");
|
|
2621
2622
|
const { choice } = await inquirer.prompt({
|
|
2622
2623
|
type: "input",
|
|
@@ -2646,25 +2647,80 @@ async function showHooksSyncMenu() {
|
|
|
2646
2647
|
}
|
|
2647
2648
|
printSeparator();
|
|
2648
2649
|
}
|
|
2650
|
+
async function showCloudV51Menu() {
|
|
2651
|
+
let stayInMenu = true;
|
|
2652
|
+
while (stayInMenu) {
|
|
2653
|
+
displayBannerWithInfo("CCJK Cloud v5.1.0-2026");
|
|
2654
|
+
console.log(ansis__default.green.bold(i18n.t("menu:cloudV51.title")));
|
|
2655
|
+
console.log(ansis__default.dim(` ${i18n.t("menu:cloudV51.desc")}`));
|
|
2656
|
+
console.log("");
|
|
2657
|
+
console.log(` ${ansis__default.white("1.")} ${ansis__default.white(i18n.t("menu:cloudV51.orchestrator"))} ${ansis__default.dim(`- ${i18n.t("menu:cloudV51.orchestratorDesc")}`)}`);
|
|
2658
|
+
console.log(` ${ansis__default.white("2.")} ${ansis__default.white(i18n.t("menu:cloudV51.mcpGateway"))} ${ansis__default.dim(`- ${i18n.t("menu:cloudV51.mcpGatewayDesc")}`)}`);
|
|
2659
|
+
console.log(` ${ansis__default.white("3.")} ${ansis__default.white(i18n.t("menu:cloudV51.memorySystem"))} ${ansis__default.dim(`- ${i18n.t("menu:cloudV51.memorySystemDesc")}`)}`);
|
|
2660
|
+
console.log(` ${ansis__default.white("4.")} ${ansis__default.white(i18n.t("menu:cloudV51.sessionTeleport"))} ${ansis__default.dim(`- ${i18n.t("menu:cloudV51.sessionTeleportDesc")}`)}`);
|
|
2661
|
+
console.log(` ${ansis__default.white("5.")} ${ansis__default.white(i18n.t("menu:cloudV51.skillsHotReload"))} ${ansis__default.dim(`- ${i18n.t("menu:cloudV51.skillsHotReloadDesc")}`)}`);
|
|
2662
|
+
console.log(` ${ansis__default.white("6.")} ${ansis__default.white(i18n.t("menu:cloudV51.lifecycleHooks"))} ${ansis__default.dim(`- ${i18n.t("menu:cloudV51.lifecycleHooksDesc")}`)}`);
|
|
2663
|
+
console.log("");
|
|
2664
|
+
console.log(` ${ansis__default.green("0.")} ${ansis__default.green(i18n.t("common:back"))}`);
|
|
2665
|
+
console.log("");
|
|
2666
|
+
const validChoices = ["0", "1", "2", "3", "4", "5", "6"];
|
|
2667
|
+
const { choice } = await inquirer.prompt({
|
|
2668
|
+
type: "input",
|
|
2669
|
+
name: "choice",
|
|
2670
|
+
message: i18n.t("common:enterChoice"),
|
|
2671
|
+
validate: (value) => {
|
|
2672
|
+
return validChoices.includes(value) || i18n.t("common:invalidChoice");
|
|
2673
|
+
}
|
|
2674
|
+
});
|
|
2675
|
+
if (!choice || choice === "0") {
|
|
2676
|
+
stayInMenu = false;
|
|
2677
|
+
continue;
|
|
2678
|
+
}
|
|
2679
|
+
printSeparator();
|
|
2680
|
+
switch (choice) {
|
|
2681
|
+
case "1":
|
|
2682
|
+
await orchestrateCommand({ task: "" });
|
|
2683
|
+
break;
|
|
2684
|
+
case "2":
|
|
2685
|
+
await mcpGatewayCommand({});
|
|
2686
|
+
break;
|
|
2687
|
+
case "3":
|
|
2688
|
+
await memoryCommand({});
|
|
2689
|
+
break;
|
|
2690
|
+
case "4":
|
|
2691
|
+
await sessionCommand({});
|
|
2692
|
+
break;
|
|
2693
|
+
case "5":
|
|
2694
|
+
await cloudV5Command("skills");
|
|
2695
|
+
break;
|
|
2696
|
+
case "6":
|
|
2697
|
+
await cloudV5Command("hooks");
|
|
2698
|
+
break;
|
|
2699
|
+
}
|
|
2700
|
+
if (stayInMenu) {
|
|
2701
|
+
printSeparator();
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2649
2705
|
async function showMcpMarketMenu() {
|
|
2650
|
-
console.log(
|
|
2706
|
+
console.log(ansis__default.green(i18n.t("menu:mcpMarket.title")));
|
|
2651
2707
|
console.log(" -------- MCP Market --------");
|
|
2652
2708
|
console.log(
|
|
2653
|
-
` ${
|
|
2709
|
+
` ${ansis__default.green("1.")} ${i18n.t("menu:mcpMarket.search")} ${ansis__default.gray(`- ${i18n.t("menu:mcpMarket.searchDesc")}`)}`
|
|
2654
2710
|
);
|
|
2655
2711
|
console.log(
|
|
2656
|
-
` ${
|
|
2712
|
+
` ${ansis__default.green("2.")} ${i18n.t("menu:mcpMarket.trending")} ${ansis__default.gray(`- ${i18n.t("menu:mcpMarket.trendingDesc")}`)}`
|
|
2657
2713
|
);
|
|
2658
2714
|
console.log(
|
|
2659
|
-
` ${
|
|
2715
|
+
` ${ansis__default.green("3.")} ${i18n.t("menu:mcpMarket.install")} ${ansis__default.gray(`- ${i18n.t("menu:mcpMarket.installDesc")}`)}`
|
|
2660
2716
|
);
|
|
2661
2717
|
console.log(
|
|
2662
|
-
` ${
|
|
2718
|
+
` ${ansis__default.green("4.")} ${i18n.t("menu:mcpMarket.uninstall")} ${ansis__default.gray(`- ${i18n.t("menu:mcpMarket.uninstallDesc")}`)}`
|
|
2663
2719
|
);
|
|
2664
2720
|
console.log(
|
|
2665
|
-
` ${
|
|
2721
|
+
` ${ansis__default.green("5.")} ${i18n.t("menu:mcpMarket.list")} ${ansis__default.gray(`- ${i18n.t("menu:mcpMarket.listDesc")}`)}`
|
|
2666
2722
|
);
|
|
2667
|
-
console.log(` ${
|
|
2723
|
+
console.log(` ${ansis__default.green("0.")} ${i18n.t("common:back")}`);
|
|
2668
2724
|
console.log("");
|
|
2669
2725
|
const { choice } = await inquirer.prompt({
|
|
2670
2726
|
type: "input",
|
|
@@ -2724,21 +2780,21 @@ async function showMcpMarketMenu() {
|
|
|
2724
2780
|
printSeparator();
|
|
2725
2781
|
}
|
|
2726
2782
|
async function showMarketplaceMenu() {
|
|
2727
|
-
console.log(
|
|
2783
|
+
console.log(ansis__default.green(i18n.t("marketplace:menu.title")));
|
|
2728
2784
|
console.log(" -------- Marketplace --------");
|
|
2729
2785
|
console.log(
|
|
2730
|
-
` ${
|
|
2786
|
+
` ${ansis__default.green("1.")} ${i18n.t("marketplace:menu.search")} ${ansis__default.gray(`- ${i18n.t("marketplace:commands.search")}`)}`
|
|
2731
2787
|
);
|
|
2732
2788
|
console.log(
|
|
2733
|
-
` ${
|
|
2789
|
+
` ${ansis__default.green("2.")} ${i18n.t("marketplace:menu.browse")} ${ansis__default.gray(`- Browse by category`)}`
|
|
2734
2790
|
);
|
|
2735
2791
|
console.log(
|
|
2736
|
-
` ${
|
|
2792
|
+
` ${ansis__default.green("3.")} ${i18n.t("marketplace:menu.installed")} ${ansis__default.gray(`- ${i18n.t("marketplace:commands.list")}`)}`
|
|
2737
2793
|
);
|
|
2738
2794
|
console.log(
|
|
2739
|
-
` ${
|
|
2795
|
+
` ${ansis__default.green("4.")} ${i18n.t("marketplace:menu.updates")} ${ansis__default.gray(`- ${i18n.t("marketplace:commands.update")}`)}`
|
|
2740
2796
|
);
|
|
2741
|
-
console.log(` ${
|
|
2797
|
+
console.log(` ${ansis__default.green("0.")} ${i18n.t("marketplace:menu.back")}`);
|
|
2742
2798
|
console.log("");
|
|
2743
2799
|
const { choice } = await inquirer.prompt({
|
|
2744
2800
|
type: "input",
|
|
@@ -2750,7 +2806,7 @@ async function showMarketplaceMenu() {
|
|
|
2750
2806
|
}
|
|
2751
2807
|
});
|
|
2752
2808
|
if (!choice) {
|
|
2753
|
-
console.log(
|
|
2809
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
2754
2810
|
return;
|
|
2755
2811
|
}
|
|
2756
2812
|
switch (choice) {
|
|
@@ -2765,42 +2821,42 @@ async function showMarketplaceMenu() {
|
|
|
2765
2821
|
try {
|
|
2766
2822
|
const result = await searchPackages({ query, limit: 10 });
|
|
2767
2823
|
if (result.packages.length === 0) {
|
|
2768
|
-
console.log(
|
|
2824
|
+
console.log(ansis__default.yellow(i18n.t("marketplace:noResults")));
|
|
2769
2825
|
} else {
|
|
2770
|
-
console.log(
|
|
2826
|
+
console.log(ansis__default.green(i18n.t("marketplace:searchResults", { count: result.total })));
|
|
2771
2827
|
console.log("");
|
|
2772
2828
|
for (const pkg of result.packages) {
|
|
2773
|
-
console.log(` ${
|
|
2829
|
+
console.log(` ${ansis__default.green(pkg.id)} ${ansis__default.gray(`v${pkg.version}`)}`);
|
|
2774
2830
|
const description = pkg.description.en || Object.values(pkg.description)[0] || "";
|
|
2775
|
-
console.log(` ${
|
|
2831
|
+
console.log(` ${ansis__default.dim(description)}`);
|
|
2776
2832
|
}
|
|
2777
2833
|
}
|
|
2778
2834
|
} catch {
|
|
2779
|
-
console.error(
|
|
2835
|
+
console.error(ansis__default.red(i18n.t("marketplace:searchFailed")));
|
|
2780
2836
|
}
|
|
2781
2837
|
}
|
|
2782
2838
|
break;
|
|
2783
2839
|
}
|
|
2784
2840
|
case "2": {
|
|
2785
|
-
console.log(
|
|
2786
|
-
console.log(
|
|
2841
|
+
console.log(ansis__default.green(i18n.t("marketplace:categories.plugin")));
|
|
2842
|
+
console.log(ansis__default.dim("Category browsing coming soon..."));
|
|
2787
2843
|
break;
|
|
2788
2844
|
}
|
|
2789
2845
|
case "3": {
|
|
2790
2846
|
try {
|
|
2791
2847
|
const installed = await getInstalledPackages();
|
|
2792
2848
|
if (installed.length === 0) {
|
|
2793
|
-
console.log(
|
|
2849
|
+
console.log(ansis__default.yellow(i18n.t("marketplace:noInstalled")));
|
|
2794
2850
|
} else {
|
|
2795
|
-
console.log(
|
|
2851
|
+
console.log(ansis__default.green(i18n.t("marketplace:installedPackages", { count: installed.length })));
|
|
2796
2852
|
console.log("");
|
|
2797
2853
|
for (const pkg of installed) {
|
|
2798
|
-
const status = pkg.enabled ?
|
|
2799
|
-
console.log(` ${status} ${
|
|
2854
|
+
const status = pkg.enabled ? ansis__default.green("\u25CF") : ansis__default.gray("\u25CB");
|
|
2855
|
+
console.log(` ${status} ${ansis__default.green(pkg.package.id)} ${ansis__default.gray(`v${pkg.package.version}`)}`);
|
|
2800
2856
|
}
|
|
2801
2857
|
}
|
|
2802
2858
|
} catch {
|
|
2803
|
-
console.error(
|
|
2859
|
+
console.error(ansis__default.red(i18n.t("marketplace:listFailed")));
|
|
2804
2860
|
}
|
|
2805
2861
|
break;
|
|
2806
2862
|
}
|
|
@@ -2809,16 +2865,16 @@ async function showMarketplaceMenu() {
|
|
|
2809
2865
|
try {
|
|
2810
2866
|
const updates = await checkForUpdates();
|
|
2811
2867
|
if (updates.length === 0) {
|
|
2812
|
-
console.log(
|
|
2868
|
+
console.log(ansis__default.green(i18n.t("marketplace:noUpdates")));
|
|
2813
2869
|
} else {
|
|
2814
|
-
console.log(
|
|
2870
|
+
console.log(ansis__default.green(i18n.t("marketplace:updatesAvailable", { count: updates.length })));
|
|
2815
2871
|
console.log("");
|
|
2816
2872
|
for (const update2 of updates) {
|
|
2817
|
-
console.log(` ${
|
|
2873
|
+
console.log(` ${ansis__default.green(update2.id)}: ${update2.currentVersion} \u2192 ${ansis__default.green(update2.latestVersion)}`);
|
|
2818
2874
|
}
|
|
2819
2875
|
}
|
|
2820
2876
|
} catch {
|
|
2821
|
-
console.error(
|
|
2877
|
+
console.error(ansis__default.red(i18n.t("marketplace:updateCheckFailed")));
|
|
2822
2878
|
}
|
|
2823
2879
|
break;
|
|
2824
2880
|
}
|
|
@@ -2833,7 +2889,7 @@ async function showMarketplaceMenu() {
|
|
|
2833
2889
|
async function showQuickActionsMenu() {
|
|
2834
2890
|
const lang = i18n.language;
|
|
2835
2891
|
const isZh = lang === "zh-CN";
|
|
2836
|
-
console.log(
|
|
2892
|
+
console.log(ansis__default.green(isZh ? "\u{1F680} \u5FEB\u6377\u64CD\u4F5C" : "\u{1F680} Quick Actions"));
|
|
2837
2893
|
console.log("");
|
|
2838
2894
|
console.log(generateQuickActionsPanel(lang));
|
|
2839
2895
|
console.log("");
|
|
@@ -2862,10 +2918,10 @@ async function showQuickActionsMenu() {
|
|
|
2862
2918
|
if (action) {
|
|
2863
2919
|
const actionName = isZh ? action.nameZh : action.name;
|
|
2864
2920
|
console.log("");
|
|
2865
|
-
console.log(
|
|
2866
|
-
console.log(
|
|
2921
|
+
console.log(ansis__default.green(`\u2714 ${isZh ? "\u6267\u884C" : "Executing"}: ${action.icon} ${actionName}`));
|
|
2922
|
+
console.log(ansis__default.gray(`${isZh ? "\u547D\u4EE4" : "Command"}: ${action.command}`));
|
|
2867
2923
|
console.log("");
|
|
2868
|
-
console.log(
|
|
2924
|
+
console.log(ansis__default.green(isZh ? `\u{1F4A1} \u63D0\u793A: \u5728 Claude Code \u4E2D\u8F93\u5165 "${action.command}" \u6216\u76F4\u63A5\u8F93\u5165 "${choice}" \u6765\u6267\u884C\u6B64\u64CD\u4F5C` : `\u{1F4A1} Tip: In Claude Code, type "${action.command}" or just "${choice}" to execute this action`));
|
|
2869
2925
|
}
|
|
2870
2926
|
printSeparator();
|
|
2871
2927
|
}
|
|
@@ -2873,16 +2929,16 @@ async function showSmartGuideMenu() {
|
|
|
2873
2929
|
const lang = i18n.language;
|
|
2874
2930
|
const isZh = lang === "zh-CN";
|
|
2875
2931
|
const installed = await isSmartGuideInstalled();
|
|
2876
|
-
console.log(
|
|
2932
|
+
console.log(ansis__default.green(isZh ? "\u{1F3AF} \u667A\u80FD\u52A9\u624B" : "\u{1F3AF} Smart Assistant"));
|
|
2877
2933
|
console.log("");
|
|
2878
2934
|
console.log(isZh ? "\u667A\u80FD\u52A9\u624B\u8BA9\u4F60\u5728 Claude Code \u4E2D\u901A\u8FC7\u8F93\u5165\u6570\u5B57\u5FEB\u901F\u6267\u884C\u64CD\u4F5C" : "Smart Assistant lets you execute actions by typing numbers in Claude Code");
|
|
2879
2935
|
console.log("");
|
|
2880
|
-
console.log(` ${isZh ? "\u72B6\u6001" : "Status"}: ${installed ?
|
|
2936
|
+
console.log(` ${isZh ? "\u72B6\u6001" : "Status"}: ${installed ? ansis__default.green(isZh ? "\u5DF2\u542F\u7528" : "Enabled") : ansis__default.yellow(isZh ? "\u672A\u542F\u7528" : "Disabled")}`);
|
|
2881
2937
|
console.log("");
|
|
2882
|
-
console.log(` ${
|
|
2883
|
-
console.log(` ${
|
|
2884
|
-
console.log(` ${
|
|
2885
|
-
console.log(` ${
|
|
2938
|
+
console.log(` ${ansis__default.green("1.")} ${installed ? isZh ? "\u66F4\u65B0\u667A\u80FD\u52A9\u624B" : "Update Smart Assistant" : isZh ? "\u542F\u7528\u667A\u80FD\u52A9\u624B" : "Enable Smart Assistant"}`);
|
|
2939
|
+
console.log(` ${ansis__default.green("2.")} ${isZh ? "\u7981\u7528\u667A\u80FD\u52A9\u624B" : "Disable Smart Assistant"}`);
|
|
2940
|
+
console.log(` ${ansis__default.green("3.")} ${isZh ? "\u67E5\u770B\u6280\u80FD\u901F\u67E5\u5361" : "View Skills Reference Card"}`);
|
|
2941
|
+
console.log(` ${ansis__default.green("0.")} ${i18n.t("common:back")}`);
|
|
2886
2942
|
console.log("");
|
|
2887
2943
|
const { choice } = await inquirer.prompt({
|
|
2888
2944
|
type: "input",
|
|
@@ -2900,22 +2956,22 @@ async function showSmartGuideMenu() {
|
|
|
2900
2956
|
case "1": {
|
|
2901
2957
|
const success = await injectSmartGuide(lang);
|
|
2902
2958
|
if (success) {
|
|
2903
|
-
console.log(
|
|
2959
|
+
console.log(ansis__default.green(`\u2714 ${isZh ? "\u667A\u80FD\u52A9\u624B\u5DF2\u542F\u7528" : "Smart Assistant enabled"}`));
|
|
2904
2960
|
} else {
|
|
2905
|
-
console.log(
|
|
2961
|
+
console.log(ansis__default.red(isZh ? "\u542F\u7528\u5931\u8D25" : "Failed to enable"));
|
|
2906
2962
|
}
|
|
2907
2963
|
break;
|
|
2908
2964
|
}
|
|
2909
2965
|
case "2": {
|
|
2910
2966
|
if (!installed) {
|
|
2911
|
-
console.log(
|
|
2967
|
+
console.log(ansis__default.yellow(isZh ? "\u667A\u80FD\u52A9\u624B\u672A\u542F\u7528" : "Smart Assistant is not enabled"));
|
|
2912
2968
|
break;
|
|
2913
2969
|
}
|
|
2914
2970
|
const success = await removeSmartGuide();
|
|
2915
2971
|
if (success) {
|
|
2916
|
-
console.log(
|
|
2972
|
+
console.log(ansis__default.green(`\u2714 ${isZh ? "\u667A\u80FD\u52A9\u624B\u5DF2\u7981\u7528" : "Smart Assistant disabled"}`));
|
|
2917
2973
|
} else {
|
|
2918
|
-
console.log(
|
|
2974
|
+
console.log(ansis__default.red(isZh ? "\u7981\u7528\u5931\u8D25" : "Failed to disable"));
|
|
2919
2975
|
}
|
|
2920
2976
|
break;
|
|
2921
2977
|
}
|
|
@@ -2930,14 +2986,14 @@ async function showSmartGuideMenu() {
|
|
|
2930
2986
|
async function showWorkflowsAndSkillsMenu() {
|
|
2931
2987
|
const lang = i18n.language;
|
|
2932
2988
|
const isZh = lang === "zh-CN";
|
|
2933
|
-
console.log(
|
|
2989
|
+
console.log(ansis__default.green(i18n.t("menu:ccjkFeatures.workflowsTitle")));
|
|
2934
2990
|
console.log(" -------- Workflows & Skills --------");
|
|
2935
|
-
console.log(` ${
|
|
2936
|
-
console.log(` ${
|
|
2937
|
-
console.log(` ${
|
|
2938
|
-
console.log(` ${
|
|
2939
|
-
console.log(` ${
|
|
2940
|
-
console.log(` ${
|
|
2991
|
+
console.log(` ${ansis__default.green("1.")} ${i18n.t("menu:ccjkFeatures.viewInstalledWorkflows")}`);
|
|
2992
|
+
console.log(` ${ansis__default.green("2.")} ${i18n.t("menu:ccjkFeatures.viewInstalledSkills")}`);
|
|
2993
|
+
console.log(` ${ansis__default.green("3.")} ${i18n.t("menu:ccjkFeatures.installNewWorkflow")}`);
|
|
2994
|
+
console.log(` ${ansis__default.green("4.")} ${isZh ? "\u{1F680} \u5FEB\u6377\u64CD\u4F5C\u9762\u677F" : "\u{1F680} Quick Actions Panel"}`);
|
|
2995
|
+
console.log(` ${ansis__default.green("5.")} ${isZh ? "\u{1F3AF} \u667A\u80FD\u52A9\u624B\u8BBE\u7F6E" : "\u{1F3AF} Smart Assistant Settings"}`);
|
|
2996
|
+
console.log(` ${ansis__default.green("0.")} ${i18n.t("common:back")}`);
|
|
2941
2997
|
console.log("");
|
|
2942
2998
|
const { choice } = await inquirer.prompt({
|
|
2943
2999
|
type: "input",
|
|
@@ -2949,29 +3005,29 @@ async function showWorkflowsAndSkillsMenu() {
|
|
|
2949
3005
|
}
|
|
2950
3006
|
});
|
|
2951
3007
|
if (!choice) {
|
|
2952
|
-
console.log(
|
|
3008
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
2953
3009
|
return;
|
|
2954
3010
|
}
|
|
2955
3011
|
switch (choice) {
|
|
2956
3012
|
case "1": {
|
|
2957
|
-
console.log(
|
|
2958
|
-
console.log(
|
|
3013
|
+
console.log(ansis__default.green(i18n.t("menu:ccjkFeatures.availableStyles")));
|
|
3014
|
+
console.log(ansis__default.dim("Feature coming soon - will show installed workflows"));
|
|
2959
3015
|
break;
|
|
2960
3016
|
}
|
|
2961
3017
|
case "2": {
|
|
2962
3018
|
const status = await checkSuperpowersInstalled();
|
|
2963
3019
|
if (!status.installed) {
|
|
2964
|
-
console.log(
|
|
3020
|
+
console.log(ansis__default.yellow(i18n.t("superpowers:status.notInstalled")));
|
|
2965
3021
|
break;
|
|
2966
3022
|
}
|
|
2967
3023
|
const skills = await getSuperpowersSkills();
|
|
2968
3024
|
if (skills.length === 0) {
|
|
2969
|
-
console.log(
|
|
3025
|
+
console.log(ansis__default.yellow(i18n.t("menu:ccjkFeatures.noSkillsInstalled")));
|
|
2970
3026
|
} else {
|
|
2971
|
-
console.log(
|
|
3027
|
+
console.log(ansis__default.green(i18n.t("menu:ccjkFeatures.skillCount", { count: skills.length })));
|
|
2972
3028
|
console.log("");
|
|
2973
3029
|
skills.forEach((skill) => {
|
|
2974
|
-
console.log(` ${
|
|
3030
|
+
console.log(` ${ansis__default.green("\u2022")} ${skill}`);
|
|
2975
3031
|
});
|
|
2976
3032
|
}
|
|
2977
3033
|
break;
|
|
@@ -2998,177 +3054,180 @@ async function showWorkflowsAndSkillsMenu() {
|
|
|
2998
3054
|
printSeparator();
|
|
2999
3055
|
}
|
|
3000
3056
|
async function showOutputStylesMenu() {
|
|
3001
|
-
console.log(
|
|
3057
|
+
console.log(ansis__default.green(i18n.t("menu:ccjkFeatures.outputStylesTitle")));
|
|
3002
3058
|
console.log("");
|
|
3003
|
-
console.log(
|
|
3004
|
-
console.log(` ${
|
|
3005
|
-
console.log(` ${
|
|
3006
|
-
console.log(` ${
|
|
3007
|
-
console.log(` ${
|
|
3008
|
-
console.log(` ${
|
|
3009
|
-
console.log(` ${
|
|
3010
|
-
console.log(` ${
|
|
3059
|
+
console.log(ansis__default.green(i18n.t("menu:ccjkFeatures.availableStyles")));
|
|
3060
|
+
console.log(` ${ansis__default.green("\u2022")} speed-coder`);
|
|
3061
|
+
console.log(` ${ansis__default.green("\u2022")} senior-architect`);
|
|
3062
|
+
console.log(` ${ansis__default.green("\u2022")} pair-programmer`);
|
|
3063
|
+
console.log(` ${ansis__default.green("\u2022")} expert-concise`);
|
|
3064
|
+
console.log(` ${ansis__default.green("\u2022")} teaching-mode`);
|
|
3065
|
+
console.log(` ${ansis__default.green("\u2022")} casual-friendly`);
|
|
3066
|
+
console.log(` ${ansis__default.green("\u2022")} technical-precise`);
|
|
3011
3067
|
console.log("");
|
|
3012
|
-
console.log(
|
|
3068
|
+
console.log(ansis__default.dim('Tip: Output styles are configured during initialization or via "Configure Claude global memory"'));
|
|
3013
3069
|
printSeparator();
|
|
3014
3070
|
}
|
|
3015
3071
|
async function showConfigSwitchMenu() {
|
|
3016
|
-
console.log(
|
|
3072
|
+
console.log(ansis__default.green(i18n.t("menu:ccjkFeatures.configSwitchTitle")));
|
|
3017
3073
|
console.log("");
|
|
3018
3074
|
await configSwitchCommand({ codeType: "claude-code" });
|
|
3019
3075
|
}
|
|
3020
3076
|
function printCcjkFeaturesSection() {
|
|
3021
3077
|
console.log(` -------- ${i18n.t("menu:menuSections.smartFeatures")} --------`);
|
|
3022
3078
|
console.log(
|
|
3023
|
-
` ${
|
|
3079
|
+
` ${ansis__default.green("A.")} ${i18n.t("menu:menuOptions.quickActions")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.quickActions")}`)}`
|
|
3024
3080
|
);
|
|
3025
3081
|
console.log(
|
|
3026
|
-
` ${
|
|
3082
|
+
` ${ansis__default.green("G.")} ${i18n.t("menu:menuOptions.smartGuide")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.smartGuide")}`)}`
|
|
3027
3083
|
);
|
|
3028
3084
|
console.log(
|
|
3029
|
-
` ${
|
|
3085
|
+
` ${ansis__default.green("D.")} ${i18n.t("menu:menuOptions.doctor")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.doctor")}`)}`
|
|
3030
3086
|
);
|
|
3031
3087
|
console.log("");
|
|
3032
3088
|
console.log(` -------- ${i18n.t("menu:menuSections.ccjkFeatures")} --------`);
|
|
3033
3089
|
console.log(
|
|
3034
|
-
` ${
|
|
3090
|
+
` ${ansis__default.green("W.")} ${i18n.t("menu:menuOptions.workflowsAndSkills")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.workflowsAndSkills")}`)}`
|
|
3035
3091
|
);
|
|
3036
3092
|
console.log(
|
|
3037
|
-
` ${
|
|
3093
|
+
` ${ansis__default.green("O.")} ${i18n.t("menu:menuOptions.outputStyles")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.outputStyles")}`)}`
|
|
3038
3094
|
);
|
|
3039
3095
|
console.log(
|
|
3040
|
-
` ${
|
|
3096
|
+
` ${ansis__default.green("C.")} ${i18n.t("menu:menuOptions.configSwitch")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.configSwitch")}`)}`
|
|
3041
3097
|
);
|
|
3042
3098
|
console.log("");
|
|
3043
3099
|
}
|
|
3044
3100
|
function printRecommendedPluginsSection() {
|
|
3045
3101
|
console.log(` -------- ${i18n.t("menu:menuSections.recommendedPlugins")} --------`);
|
|
3046
3102
|
console.log(
|
|
3047
|
-
` ${
|
|
3103
|
+
` ${ansis__default.green("R.")} ${i18n.t("menu:menuOptions.ccrManagement")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.ccrManagement")}`)}`
|
|
3048
3104
|
);
|
|
3049
3105
|
console.log(
|
|
3050
|
-
` ${
|
|
3106
|
+
` ${ansis__default.green("U.")} ${i18n.t("menu:menuOptions.ccusage")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.ccusage")}`)}`
|
|
3051
3107
|
);
|
|
3052
3108
|
console.log(
|
|
3053
|
-
` ${
|
|
3109
|
+
` ${ansis__default.green("L.")} ${i18n.t("menu:menuOptions.cometixLine")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.cometixLine")}`)}`
|
|
3054
3110
|
);
|
|
3055
3111
|
console.log(
|
|
3056
|
-
` ${
|
|
3112
|
+
` ${ansis__default.green("P.")} ${i18n.t("menu:menuOptions.superpowers")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.superpowers")}`)}`
|
|
3057
3113
|
);
|
|
3058
3114
|
console.log(
|
|
3059
|
-
` ${
|
|
3115
|
+
` ${ansis__default.green("M.")} ${i18n.t("menu:menuOptions.marketplace")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.marketplace")}`)}`
|
|
3060
3116
|
);
|
|
3061
3117
|
console.log("");
|
|
3062
3118
|
}
|
|
3063
3119
|
function printCloudServicesSection() {
|
|
3064
3120
|
console.log(` -------- ${i18n.t("menu:menuSections.cloudServices")} --------`);
|
|
3065
3121
|
console.log(
|
|
3066
|
-
` ${
|
|
3122
|
+
` ${ansis__default.green("N.")} ${i18n.t("menu:menuOptions.cloudNotification")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.cloudNotification")}`)}`
|
|
3067
3123
|
);
|
|
3068
3124
|
console.log(
|
|
3069
|
-
` ${
|
|
3125
|
+
` ${ansis__default.green("K.")} ${i18n.t("menu:menuOptions.mcpMarket")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.mcpMarket")}`)}`
|
|
3070
3126
|
);
|
|
3071
3127
|
console.log(
|
|
3072
|
-
` ${
|
|
3128
|
+
` ${ansis__default.green("H.")} ${i18n.t("menu:menuOptions.hooksSync")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.hooksSync")}`)}`
|
|
3073
3129
|
);
|
|
3074
3130
|
console.log("");
|
|
3075
3131
|
}
|
|
3076
3132
|
function printZcfSection(options) {
|
|
3077
3133
|
console.log(" ------------ CCJK ------------");
|
|
3078
3134
|
console.log(
|
|
3079
|
-
` ${
|
|
3135
|
+
` ${ansis__default.green("0.")} ${i18n.t("menu:menuOptions.changeLanguage")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.changeLanguage")}`)}`
|
|
3080
3136
|
);
|
|
3081
3137
|
console.log(
|
|
3082
|
-
` ${
|
|
3138
|
+
` ${ansis__default.green("S.")} ${i18n.t("menu:menuOptions.switchCodeTool")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.switchCodeTool")}`)}`
|
|
3083
3139
|
);
|
|
3084
3140
|
console.log(
|
|
3085
|
-
` ${
|
|
3141
|
+
` ${ansis__default.green("-.")} ${options.uninstallOption} ${ansis__default.gray(`- ${options.uninstallDescription}`)}`
|
|
3086
3142
|
);
|
|
3087
3143
|
console.log(
|
|
3088
|
-
` ${
|
|
3144
|
+
` ${ansis__default.green("+.")} ${options.updateOption} ${ansis__default.gray(`- ${options.updateDescription}`)}`
|
|
3089
3145
|
);
|
|
3090
|
-
console.log(` ${
|
|
3146
|
+
console.log(` ${ansis__default.red("Q.")} ${ansis__default.red(i18n.t("menu:menuOptions.exit"))}`);
|
|
3091
3147
|
console.log("");
|
|
3092
3148
|
}
|
|
3093
3149
|
async function oneClickCheckup() {
|
|
3094
|
-
console.log(
|
|
3150
|
+
console.log(ansis__default.green(i18n.t("menu:oneClick.running")));
|
|
3095
3151
|
console.log("");
|
|
3096
3152
|
await doctor();
|
|
3097
3153
|
await workspaceDiagnostics();
|
|
3098
3154
|
console.log("");
|
|
3099
|
-
console.log(
|
|
3155
|
+
console.log(ansis__default.green(i18n.t("menu:oneClick.fixComplete")));
|
|
3100
3156
|
}
|
|
3101
3157
|
async function oneClickUpdate() {
|
|
3102
|
-
console.log(
|
|
3158
|
+
console.log(ansis__default.green(i18n.t("menu:oneClick.running")));
|
|
3103
3159
|
console.log("");
|
|
3104
3160
|
await checkUpdates();
|
|
3105
3161
|
console.log("");
|
|
3106
|
-
console.log(
|
|
3162
|
+
console.log(ansis__default.green(i18n.t("menu:oneClick.updateComplete")));
|
|
3107
3163
|
}
|
|
3108
3164
|
async function showMoreFeaturesMenu() {
|
|
3109
3165
|
let stayInMenu = true;
|
|
3110
3166
|
while (stayInMenu) {
|
|
3111
3167
|
const codeTool = getCurrentCodeTool();
|
|
3112
3168
|
displayBannerWithInfo(CODE_TOOL_BANNERS[codeTool] || "CCJK");
|
|
3113
|
-
console.log(
|
|
3169
|
+
console.log(ansis__default.green.bold(i18n.t("menu:moreMenu.title")));
|
|
3114
3170
|
console.log("");
|
|
3115
|
-
console.log(` ${
|
|
3171
|
+
console.log(` ${ansis__default.green.bold(i18n.t("menu:moreMenu.extensions"))}`);
|
|
3116
3172
|
console.log(
|
|
3117
|
-
` ${
|
|
3173
|
+
` ${ansis__default.white("1.")} ${ansis__default.white(i18n.t("menu:pluginsMenu.ccr"))} ${ansis__default.dim(`- ${i18n.t("menu:pluginsMenu.ccrDesc")}`)}`
|
|
3118
3174
|
);
|
|
3119
3175
|
console.log(
|
|
3120
|
-
` ${
|
|
3176
|
+
` ${ansis__default.white("2.")} ${ansis__default.white(i18n.t("menu:pluginsMenu.ccusage"))} ${ansis__default.dim(`- ${i18n.t("menu:pluginsMenu.ccusageDesc")}`)}`
|
|
3121
3177
|
);
|
|
3122
3178
|
console.log(
|
|
3123
|
-
` ${
|
|
3179
|
+
` ${ansis__default.white("3.")} ${ansis__default.white(i18n.t("menu:pluginsMenu.cometix"))} ${ansis__default.dim(`- ${i18n.t("menu:pluginsMenu.cometixDesc")}`)}`
|
|
3124
3180
|
);
|
|
3125
3181
|
console.log(
|
|
3126
|
-
` ${
|
|
3182
|
+
` ${ansis__default.white("4.")} ${ansis__default.white(i18n.t("menu:pluginsMenu.ccm"))} ${ansis__default.dim(`- ${i18n.t("menu:pluginsMenu.ccmDesc")}`)}`
|
|
3127
3183
|
);
|
|
3128
3184
|
console.log(
|
|
3129
|
-
` ${
|
|
3185
|
+
` ${ansis__default.white("5.")} ${ansis__default.white(i18n.t("menu:pluginsMenu.superpowers"))} ${ansis__default.dim(`- ${i18n.t("menu:pluginsMenu.superpowersDesc")}`)}`
|
|
3130
3186
|
);
|
|
3131
3187
|
console.log(
|
|
3132
|
-
` ${
|
|
3188
|
+
` ${ansis__default.white("6.")} ${ansis__default.white(i18n.t("menu:categorizedMenu.mcpMarket"))} ${ansis__default.dim(`- ${i18n.t("menu:categorizedMenu.mcpMarketDesc")}`)}`
|
|
3133
3189
|
);
|
|
3134
3190
|
console.log(
|
|
3135
|
-
` ${
|
|
3191
|
+
` ${ansis__default.white("7.")} ${ansis__default.white(i18n.t("menu:categorizedMenu.marketplace"))} ${ansis__default.dim(`- ${i18n.t("menu:categorizedMenu.marketplaceDesc")}`)}`
|
|
3192
|
+
);
|
|
3193
|
+
console.log(
|
|
3194
|
+
` ${ansis__default.white("8.")} ${ansis__default.white(i18n.t("menu:cloudV51.title"))} ${ansis__default.dim(`- ${i18n.t("menu:cloudV51.desc")}`)}`
|
|
3136
3195
|
);
|
|
3137
3196
|
console.log("");
|
|
3138
|
-
console.log(` ${
|
|
3197
|
+
console.log(` ${ansis__default.green.bold(i18n.t("menu:moreMenu.config"))}`);
|
|
3139
3198
|
console.log(
|
|
3140
|
-
` ${
|
|
3199
|
+
` ${ansis__default.white("9.")} ${ansis__default.white(i18n.t("menu:configCenter.memory"))} ${ansis__default.dim(`- ${i18n.t("menu:configCenter.memoryDesc")}`)}`
|
|
3141
3200
|
);
|
|
3142
3201
|
console.log(
|
|
3143
|
-
` ${
|
|
3202
|
+
` ${ansis__default.white("10.")} ${ansis__default.white(i18n.t("menu:configCenter.permission"))} ${ansis__default.dim(`- ${i18n.t("menu:configCenter.permissionDesc")}`)}`
|
|
3144
3203
|
);
|
|
3145
3204
|
console.log(
|
|
3146
|
-
` ${
|
|
3205
|
+
` ${ansis__default.white("11.")} ${ansis__default.white(i18n.t("menu:configCenter.configSwitch"))} ${ansis__default.dim(`- ${i18n.t("menu:configCenter.configSwitchDesc")}`)}`
|
|
3147
3206
|
);
|
|
3148
3207
|
console.log(
|
|
3149
|
-
` ${
|
|
3208
|
+
` ${ansis__default.white("12.")} ${ansis__default.white(i18n.t("menu:configCenter.context"))} ${ansis__default.dim(`- ${i18n.t("menu:configCenter.contextDesc")}`)}`
|
|
3150
3209
|
);
|
|
3151
3210
|
console.log("");
|
|
3152
|
-
console.log(` ${
|
|
3211
|
+
console.log(` ${ansis__default.green.bold(i18n.t("menu:moreMenu.system"))}`);
|
|
3153
3212
|
console.log(
|
|
3154
|
-
` ${
|
|
3213
|
+
` ${ansis__default.white("13.")} ${ansis__default.white(i18n.t("menu:menuOptions.changeLanguage").split(" / ")[0])} ${ansis__default.dim(`- ${i18n.t("menu:menuDescriptions.changeLanguage")}`)}`
|
|
3155
3214
|
);
|
|
3156
3215
|
console.log(
|
|
3157
|
-
` ${
|
|
3216
|
+
` ${ansis__default.white("14.")} ${ansis__default.white(i18n.t("menu:menuOptions.switchCodeTool"))} ${ansis__default.dim(`- ${i18n.t("menu:menuDescriptions.switchCodeTool")}`)}`
|
|
3158
3217
|
);
|
|
3159
3218
|
console.log(
|
|
3160
|
-
` ${
|
|
3219
|
+
` ${ansis__default.white("15.")} ${ansis__default.white(i18n.t("menu:categorizedMenu.diagnostics"))} ${ansis__default.dim(`- ${i18n.t("menu:categorizedMenu.diagnosticsDesc")}`)}`
|
|
3161
3220
|
);
|
|
3162
3221
|
console.log(
|
|
3163
|
-
` ${
|
|
3222
|
+
` ${ansis__default.white("16.")} ${ansis__default.white(i18n.t("menu:categorizedMenu.workspace"))} ${ansis__default.dim(`- ${i18n.t("menu:categorizedMenu.workspaceDesc")}`)}`
|
|
3164
3223
|
);
|
|
3165
3224
|
console.log(
|
|
3166
|
-
` ${
|
|
3225
|
+
` ${ansis__default.white("17.")} ${ansis__default.white(i18n.t("menu:menuOptions.uninstall"))} ${ansis__default.dim(`- ${i18n.t("menu:menuDescriptions.uninstall")}`)}`
|
|
3167
3226
|
);
|
|
3168
3227
|
console.log("");
|
|
3169
|
-
console.log(` ${
|
|
3228
|
+
console.log(` ${ansis__default.green("0.")} ${ansis__default.green(i18n.t("common:back"))}`);
|
|
3170
3229
|
console.log("");
|
|
3171
|
-
const validChoices = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"];
|
|
3230
|
+
const validChoices = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17"];
|
|
3172
3231
|
const { choice } = await inquirer.prompt({
|
|
3173
3232
|
type: "input",
|
|
3174
3233
|
name: "choice",
|
|
@@ -3205,35 +3264,38 @@ async function showMoreFeaturesMenu() {
|
|
|
3205
3264
|
case "7":
|
|
3206
3265
|
await showMarketplaceMenu();
|
|
3207
3266
|
break;
|
|
3208
|
-
// Config
|
|
3209
3267
|
case "8":
|
|
3210
|
-
await
|
|
3268
|
+
await showCloudV51Menu();
|
|
3211
3269
|
break;
|
|
3270
|
+
// Config
|
|
3212
3271
|
case "9":
|
|
3213
|
-
await
|
|
3272
|
+
await configureAiMemoryFeature();
|
|
3214
3273
|
break;
|
|
3215
3274
|
case "10":
|
|
3216
|
-
await
|
|
3275
|
+
await configureEnvPermissionFeature();
|
|
3217
3276
|
break;
|
|
3218
3277
|
case "11":
|
|
3278
|
+
await showConfigSwitchMenu();
|
|
3279
|
+
break;
|
|
3280
|
+
case "12":
|
|
3219
3281
|
await showContextMenu();
|
|
3220
3282
|
break;
|
|
3221
3283
|
// System
|
|
3222
|
-
case "
|
|
3284
|
+
case "13": {
|
|
3223
3285
|
const currentLang = i18n.language;
|
|
3224
3286
|
await changeScriptLanguageFeature(currentLang);
|
|
3225
3287
|
break;
|
|
3226
3288
|
}
|
|
3227
|
-
case "
|
|
3289
|
+
case "14":
|
|
3228
3290
|
await handleCodeToolSwitch("claude-code");
|
|
3229
3291
|
break;
|
|
3230
|
-
case "
|
|
3292
|
+
case "15":
|
|
3231
3293
|
await doctor();
|
|
3232
3294
|
break;
|
|
3233
|
-
case "
|
|
3295
|
+
case "16":
|
|
3234
3296
|
await workspaceDiagnostics();
|
|
3235
3297
|
break;
|
|
3236
|
-
case "
|
|
3298
|
+
case "17":
|
|
3237
3299
|
await uninstall();
|
|
3238
3300
|
break;
|
|
3239
3301
|
}
|
|
@@ -3243,40 +3305,40 @@ async function showMoreFeaturesMenu() {
|
|
|
3243
3305
|
}
|
|
3244
3306
|
}
|
|
3245
3307
|
async function showCategorizedMenu() {
|
|
3246
|
-
console.log(
|
|
3308
|
+
console.log(ansis__default.green.bold(i18n.t("menu:oneClick.title")));
|
|
3247
3309
|
console.log("");
|
|
3248
|
-
console.log(` ${
|
|
3310
|
+
console.log(` ${ansis__default.green.bold(i18n.t("menu:menuSections.quickStart"))}`);
|
|
3249
3311
|
console.log(
|
|
3250
|
-
` ${
|
|
3312
|
+
` ${ansis__default.white("1.")} ${ansis__default.white(i18n.t("menu:oneClick.setup"))} ${ansis__default.dim(`- ${i18n.t("menu:oneClick.setupDesc")}`)}`
|
|
3251
3313
|
);
|
|
3252
3314
|
console.log(
|
|
3253
|
-
` ${
|
|
3315
|
+
` ${ansis__default.white("2.")} ${ansis__default.white(i18n.t("menu:oneClick.fix"))} ${ansis__default.dim(`- ${i18n.t("menu:oneClick.fixDesc")}`)}`
|
|
3254
3316
|
);
|
|
3255
3317
|
console.log(
|
|
3256
|
-
` ${
|
|
3318
|
+
` ${ansis__default.white("3.")} ${ansis__default.white(i18n.t("menu:oneClick.update"))} ${ansis__default.dim(`- ${i18n.t("menu:oneClick.updateDesc")}`)}`
|
|
3257
3319
|
);
|
|
3258
3320
|
console.log(
|
|
3259
|
-
` ${
|
|
3321
|
+
` ${ansis__default.white("4.")} ${ansis__default.white(i18n.t("menu:oneClick.notify"))} ${ansis__default.dim(`- ${i18n.t("menu:oneClick.notifyDesc")}`)}`
|
|
3260
3322
|
);
|
|
3261
3323
|
console.log("");
|
|
3262
|
-
console.log(` ${
|
|
3324
|
+
console.log(` ${ansis__default.green.bold(i18n.t("menu:menuSections.configCenter"))}`);
|
|
3263
3325
|
console.log(
|
|
3264
|
-
` ${
|
|
3326
|
+
` ${ansis__default.white("5.")} ${ansis__default.white(i18n.t("menu:configCenter.api"))} ${ansis__default.dim(`- ${i18n.t("menu:configCenter.apiDesc")}`)}`
|
|
3265
3327
|
);
|
|
3266
3328
|
console.log(
|
|
3267
|
-
` ${
|
|
3329
|
+
` ${ansis__default.white("6.")} ${ansis__default.white(i18n.t("menu:configCenter.mcp"))} ${ansis__default.dim(`- ${i18n.t("menu:configCenter.mcpDesc")}`)}`
|
|
3268
3330
|
);
|
|
3269
3331
|
console.log(
|
|
3270
|
-
` ${
|
|
3332
|
+
` ${ansis__default.white("7.")} ${ansis__default.white(i18n.t("menu:configCenter.model"))} ${ansis__default.dim(`- ${i18n.t("menu:configCenter.modelDesc")}`)}`
|
|
3271
3333
|
);
|
|
3272
3334
|
console.log("");
|
|
3273
|
-
console.log(` ${
|
|
3335
|
+
console.log(` ${ansis__default.dim("\u2500".repeat(50))}`);
|
|
3274
3336
|
console.log(
|
|
3275
|
-
` ${
|
|
3337
|
+
` ${ansis__default.white("8.")} ${ansis__default.white(i18n.t("menu:oneClick.more"))} \u2192 ${ansis__default.dim(i18n.t("menu:oneClick.moreDesc"))}`
|
|
3276
3338
|
);
|
|
3277
3339
|
console.log("");
|
|
3278
3340
|
console.log(
|
|
3279
|
-
` ${
|
|
3341
|
+
` ${ansis__default.green("0.")} ${ansis__default.green(i18n.t("menu:menuOptions.changeLanguage").split(" / ")[0])} ${ansis__default.red("Q.")} ${ansis__default.red(i18n.t("menu:menuOptions.exit"))}`
|
|
3280
3342
|
);
|
|
3281
3343
|
console.log("");
|
|
3282
3344
|
const { choice } = await inquirer.prompt({
|
|
@@ -3289,7 +3351,7 @@ async function showCategorizedMenu() {
|
|
|
3289
3351
|
}
|
|
3290
3352
|
});
|
|
3291
3353
|
if (!choice) {
|
|
3292
|
-
console.log(
|
|
3354
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
3293
3355
|
return "exit";
|
|
3294
3356
|
}
|
|
3295
3357
|
const normalized = choice.toLowerCase();
|
|
@@ -3335,7 +3397,7 @@ async function showCategorizedMenu() {
|
|
|
3335
3397
|
}
|
|
3336
3398
|
// Exit
|
|
3337
3399
|
case "q":
|
|
3338
|
-
console.log(
|
|
3400
|
+
console.log(ansis__default.green(i18n.t("common:goodbye")));
|
|
3339
3401
|
return "exit";
|
|
3340
3402
|
default:
|
|
3341
3403
|
return void 0;
|
|
@@ -3346,34 +3408,34 @@ async function showCategorizedMenu() {
|
|
|
3346
3408
|
defaultValue: true
|
|
3347
3409
|
});
|
|
3348
3410
|
if (!shouldContinue) {
|
|
3349
|
-
console.log(
|
|
3411
|
+
console.log(ansis__default.green(i18n.t("common:goodbye")));
|
|
3350
3412
|
return "exit";
|
|
3351
3413
|
}
|
|
3352
3414
|
return void 0;
|
|
3353
3415
|
}
|
|
3354
3416
|
async function showClaudeCodeMenu() {
|
|
3355
|
-
console.log(
|
|
3417
|
+
console.log(ansis__default.green(i18n.t("menu:selectFunction")));
|
|
3356
3418
|
console.log(" -------- Claude Code --------");
|
|
3357
3419
|
console.log(
|
|
3358
|
-
` ${
|
|
3420
|
+
` ${ansis__default.green("1.")} ${i18n.t("menu:menuOptions.fullInit")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.fullInit")}`)}`
|
|
3359
3421
|
);
|
|
3360
3422
|
console.log(
|
|
3361
|
-
` ${
|
|
3423
|
+
` ${ansis__default.green("2.")} ${i18n.t("menu:menuOptions.importWorkflow")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.importWorkflow")}`)}`
|
|
3362
3424
|
);
|
|
3363
3425
|
console.log(
|
|
3364
|
-
` ${
|
|
3426
|
+
` ${ansis__default.green("3.")} ${i18n.t("menu:menuOptions.configureApiOrCcr")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.configureApiOrCcr")}`)}`
|
|
3365
3427
|
);
|
|
3366
3428
|
console.log(
|
|
3367
|
-
` ${
|
|
3429
|
+
` ${ansis__default.green("4.")} ${i18n.t("menu:menuOptions.configureMcp")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.configureMcp")}`)}`
|
|
3368
3430
|
);
|
|
3369
3431
|
console.log(
|
|
3370
|
-
` ${
|
|
3432
|
+
` ${ansis__default.green("5.")} ${i18n.t("menu:menuOptions.configureModel")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.configureModel")}`)}`
|
|
3371
3433
|
);
|
|
3372
3434
|
console.log(
|
|
3373
|
-
` ${
|
|
3435
|
+
` ${ansis__default.green("6.")} ${i18n.t("menu:menuOptions.configureAiMemory")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.configureAiMemory")}`)}`
|
|
3374
3436
|
);
|
|
3375
3437
|
console.log(
|
|
3376
|
-
` ${
|
|
3438
|
+
` ${ansis__default.green("7.")} ${i18n.t("menu:menuOptions.configureEnvPermission")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.configureEnvPermission")}`)}`
|
|
3377
3439
|
);
|
|
3378
3440
|
console.log("");
|
|
3379
3441
|
printCcjkFeaturesSection();
|
|
@@ -3395,7 +3457,7 @@ async function showClaudeCodeMenu() {
|
|
|
3395
3457
|
}
|
|
3396
3458
|
});
|
|
3397
3459
|
if (!choice) {
|
|
3398
|
-
console.log(
|
|
3460
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
3399
3461
|
return "exit";
|
|
3400
3462
|
}
|
|
3401
3463
|
const normalized = choice.toLowerCase();
|
|
@@ -3485,7 +3547,7 @@ async function showClaudeCodeMenu() {
|
|
|
3485
3547
|
break;
|
|
3486
3548
|
}
|
|
3487
3549
|
case "q":
|
|
3488
|
-
console.log(
|
|
3550
|
+
console.log(ansis__default.green(i18n.t("common:goodbye")));
|
|
3489
3551
|
return "exit";
|
|
3490
3552
|
default:
|
|
3491
3553
|
return void 0;
|
|
@@ -3496,31 +3558,31 @@ async function showClaudeCodeMenu() {
|
|
|
3496
3558
|
defaultValue: true
|
|
3497
3559
|
});
|
|
3498
3560
|
if (!shouldContinue) {
|
|
3499
|
-
console.log(
|
|
3561
|
+
console.log(ansis__default.green(i18n.t("common:goodbye")));
|
|
3500
3562
|
return "exit";
|
|
3501
3563
|
}
|
|
3502
3564
|
return void 0;
|
|
3503
3565
|
}
|
|
3504
3566
|
async function showCodexMenu() {
|
|
3505
|
-
console.log(
|
|
3567
|
+
console.log(ansis__default.green(i18n.t("menu:selectFunction")));
|
|
3506
3568
|
console.log(" -------- Codex --------");
|
|
3507
3569
|
console.log(
|
|
3508
|
-
` ${
|
|
3570
|
+
` ${ansis__default.green("1.")} ${i18n.t("menu:menuOptions.codexFullInit")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.codexFullInit")}`)}`
|
|
3509
3571
|
);
|
|
3510
3572
|
console.log(
|
|
3511
|
-
` ${
|
|
3573
|
+
` ${ansis__default.green("2.")} ${i18n.t("menu:menuOptions.codexImportWorkflow")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.codexImportWorkflow")}`)}`
|
|
3512
3574
|
);
|
|
3513
3575
|
console.log(
|
|
3514
|
-
` ${
|
|
3576
|
+
` ${ansis__default.green("3.")} ${i18n.t("menu:menuOptions.codexConfigureApi")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.codexConfigureApi")}`)}`
|
|
3515
3577
|
);
|
|
3516
3578
|
console.log(
|
|
3517
|
-
` ${
|
|
3579
|
+
` ${ansis__default.green("4.")} ${i18n.t("menu:menuOptions.codexConfigureMcp")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.codexConfigureMcp")}`)}`
|
|
3518
3580
|
);
|
|
3519
3581
|
console.log(
|
|
3520
|
-
` ${
|
|
3582
|
+
` ${ansis__default.green("5.")} ${i18n.t("menu:menuOptions.codexConfigureModel")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.codexConfigureModel")}`)}`
|
|
3521
3583
|
);
|
|
3522
3584
|
console.log(
|
|
3523
|
-
` ${
|
|
3585
|
+
` ${ansis__default.green("6.")} ${i18n.t("menu:menuOptions.codexConfigureAiMemory")} ${ansis__default.gray(`- ${i18n.t("menu:menuDescriptions.codexConfigureAiMemory")}`)}`
|
|
3524
3586
|
);
|
|
3525
3587
|
console.log("");
|
|
3526
3588
|
printZcfSection({
|
|
@@ -3539,7 +3601,7 @@ async function showCodexMenu() {
|
|
|
3539
3601
|
}
|
|
3540
3602
|
});
|
|
3541
3603
|
if (!choice) {
|
|
3542
|
-
console.log(
|
|
3604
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
3543
3605
|
return "exit";
|
|
3544
3606
|
}
|
|
3545
3607
|
const normalized = choice.toLowerCase();
|
|
@@ -3585,7 +3647,7 @@ async function showCodexMenu() {
|
|
|
3585
3647
|
return void 0;
|
|
3586
3648
|
}
|
|
3587
3649
|
case "q":
|
|
3588
|
-
console.log(
|
|
3650
|
+
console.log(ansis__default.green(i18n.t("common:goodbye")));
|
|
3589
3651
|
return "exit";
|
|
3590
3652
|
default:
|
|
3591
3653
|
return void 0;
|
|
@@ -3596,7 +3658,7 @@ async function showCodexMenu() {
|
|
|
3596
3658
|
defaultValue: true
|
|
3597
3659
|
});
|
|
3598
3660
|
if (!shouldContinue) {
|
|
3599
|
-
console.log(
|
|
3661
|
+
console.log(ansis__default.green(i18n.t("common:goodbye")));
|
|
3600
3662
|
return "exit";
|
|
3601
3663
|
}
|
|
3602
3664
|
return void 0;
|
|
@@ -3614,33 +3676,33 @@ async function isFirstTimeUser() {
|
|
|
3614
3676
|
async function showNewUserWelcome() {
|
|
3615
3677
|
const { version } = await import('./package.mjs');
|
|
3616
3678
|
console.log("");
|
|
3617
|
-
console.log(
|
|
3618
|
-
console.log(`${
|
|
3619
|
-
console.log(
|
|
3620
|
-
console.log(
|
|
3621
|
-
console.log(
|
|
3622
|
-
console.log(
|
|
3623
|
-
console.log(
|
|
3624
|
-
console.log(
|
|
3625
|
-
console.log(`${
|
|
3626
|
-
console.log(
|
|
3627
|
-
console.log(`${
|
|
3628
|
-
console.log(
|
|
3629
|
-
console.log(`${
|
|
3630
|
-
console.log(
|
|
3631
|
-
console.log(`${
|
|
3632
|
-
console.log(
|
|
3633
|
-
console.log(
|
|
3634
|
-
console.log(`${
|
|
3635
|
-
console.log(
|
|
3636
|
-
console.log(`${
|
|
3637
|
-
console.log(
|
|
3638
|
-
console.log(
|
|
3639
|
-
console.log(
|
|
3640
|
-
console.log(
|
|
3641
|
-
console.log(
|
|
3642
|
-
console.log(`${
|
|
3643
|
-
console.log(
|
|
3679
|
+
console.log(ansis__default.green.bold("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"));
|
|
3680
|
+
console.log(`${ansis__default.green.bold("\u2551")} ${ansis__default.green.bold("\u2551")}`);
|
|
3681
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.white.bold(" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 ") + ansis__default.green.bold("\u2551"));
|
|
3682
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.white.bold(" \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u255D ") + ansis__default.green.bold("\u2551"));
|
|
3683
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.white.bold(" \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2554\u255D ") + ansis__default.green.bold("\u2551"));
|
|
3684
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.white.bold(" \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2588\u2588\u2557 ") + ansis__default.green.bold("\u2551"));
|
|
3685
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.white.bold(" \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u255A\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2557 ") + ansis__default.green.bold("\u2551"));
|
|
3686
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.white.bold(" \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D ") + ansis__default.green.bold("\u2551"));
|
|
3687
|
+
console.log(`${ansis__default.green.bold("\u2551")} ${ansis__default.green.bold("\u2551")}`);
|
|
3688
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.gray(` Claude Code JinKu - v${version}`.padEnd(72)) + ansis__default.green.bold("\u2551"));
|
|
3689
|
+
console.log(`${ansis__default.green.bold("\u2551")} ${ansis__default.green.bold("\u2551")}`);
|
|
3690
|
+
console.log(ansis__default.green.bold("\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"));
|
|
3691
|
+
console.log(`${ansis__default.green.bold("\u2551")} ${ansis__default.green.bold("\u2551")}`);
|
|
3692
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.yellow.bold(` ${i18n.t("menu:newUser.welcomeTitle")}`.padEnd(72)) + ansis__default.green.bold("\u2551"));
|
|
3693
|
+
console.log(`${ansis__default.green.bold("\u2551")} ${ansis__default.green.bold("\u2551")}`);
|
|
3694
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.white(` ${i18n.t("menu:newUser.welcomeDesc1")}`.padEnd(72)) + ansis__default.green.bold("\u2551"));
|
|
3695
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.white(` ${i18n.t("menu:newUser.welcomeDesc2")}`.padEnd(72)) + ansis__default.green.bold("\u2551"));
|
|
3696
|
+
console.log(`${ansis__default.green.bold("\u2551")} ${ansis__default.green.bold("\u2551")}`);
|
|
3697
|
+
console.log(ansis__default.green.bold("\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"));
|
|
3698
|
+
console.log(`${ansis__default.green.bold("\u2551")} ${ansis__default.green.bold("\u2551")}`);
|
|
3699
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.green(` ${i18n.t("menu:newUser.highlights")}`.padEnd(72)) + ansis__default.green.bold("\u2551"));
|
|
3700
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.gray(` \u2022 ${i18n.t("menu:newUser.highlight1")}`.padEnd(72)) + ansis__default.green.bold("\u2551"));
|
|
3701
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.gray(` \u2022 ${i18n.t("menu:newUser.highlight2")}`.padEnd(72)) + ansis__default.green.bold("\u2551"));
|
|
3702
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.gray(` \u2022 ${i18n.t("menu:newUser.highlight3")}`.padEnd(72)) + ansis__default.green.bold("\u2551"));
|
|
3703
|
+
console.log(ansis__default.green.bold("\u2551") + ansis__default.gray(` \u2022 ${i18n.t("menu:newUser.highlight4")}`.padEnd(72)) + ansis__default.green.bold("\u2551"));
|
|
3704
|
+
console.log(`${ansis__default.green.bold("\u2551")} ${ansis__default.green.bold("\u2551")}`);
|
|
3705
|
+
console.log(ansis__default.green.bold("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"));
|
|
3644
3706
|
console.log("");
|
|
3645
3707
|
const { mode } = await inquirer.prompt({
|
|
3646
3708
|
type: "list",
|
|
@@ -3648,15 +3710,15 @@ async function showNewUserWelcome() {
|
|
|
3648
3710
|
message: i18n.t("menu:newUser.selectPrompt"),
|
|
3649
3711
|
choices: [
|
|
3650
3712
|
{
|
|
3651
|
-
name:
|
|
3713
|
+
name: ansis__default.green.bold(i18n.t("menu:newUser.quickStart")) + ansis__default.dim(` - ${i18n.t("menu:newUser.quickStartDesc")}`),
|
|
3652
3714
|
value: "quick"
|
|
3653
3715
|
},
|
|
3654
3716
|
{
|
|
3655
|
-
name:
|
|
3717
|
+
name: ansis__default.green(i18n.t("menu:newUser.fullConfig")) + ansis__default.dim(` - ${i18n.t("menu:newUser.fullConfigDesc")}`),
|
|
3656
3718
|
value: "full"
|
|
3657
3719
|
},
|
|
3658
3720
|
{
|
|
3659
|
-
name:
|
|
3721
|
+
name: ansis__default.yellow(i18n.t("menu:newUser.viewHelp")) + ansis__default.dim(` - ${i18n.t("menu:newUser.viewHelpDesc")}`),
|
|
3660
3722
|
value: "help"
|
|
3661
3723
|
}
|
|
3662
3724
|
],
|
|
@@ -3667,21 +3729,21 @@ async function showNewUserWelcome() {
|
|
|
3667
3729
|
}
|
|
3668
3730
|
async function showFeaturesOverview() {
|
|
3669
3731
|
console.log("");
|
|
3670
|
-
console.log(
|
|
3732
|
+
console.log(ansis__default.bold.cyan(i18n.t("menu:newUser.featuresTitle")));
|
|
3671
3733
|
console.log("");
|
|
3672
|
-
console.log(
|
|
3673
|
-
console.log(` ${
|
|
3674
|
-
console.log(` ${
|
|
3675
|
-
console.log(` ${
|
|
3676
|
-
console.log(` ${
|
|
3734
|
+
console.log(ansis__default.green(i18n.t("menu:newUser.coreFeatures")));
|
|
3735
|
+
console.log(` ${ansis__default.green("\u2022")} ${i18n.t("menu:newUser.feature.api")}`);
|
|
3736
|
+
console.log(` ${ansis__default.green("\u2022")} ${i18n.t("menu:newUser.feature.workflow")}`);
|
|
3737
|
+
console.log(` ${ansis__default.green("\u2022")} ${i18n.t("menu:newUser.feature.mcp")}`);
|
|
3738
|
+
console.log(` ${ansis__default.green("\u2022")} ${i18n.t("menu:newUser.feature.outputStyle")}`);
|
|
3677
3739
|
console.log("");
|
|
3678
|
-
console.log(
|
|
3679
|
-
console.log(` ${
|
|
3680
|
-
console.log(` ${
|
|
3681
|
-
console.log(` ${
|
|
3682
|
-
console.log(` ${
|
|
3740
|
+
console.log(ansis__default.green(i18n.t("menu:newUser.recommendedPlugins")));
|
|
3741
|
+
console.log(` ${ansis__default.green("\u2022")} ${i18n.t("menu:newUser.plugin.ccr")}`);
|
|
3742
|
+
console.log(` ${ansis__default.green("\u2022")} ${i18n.t("menu:newUser.plugin.ccusage")}`);
|
|
3743
|
+
console.log(` ${ansis__default.green("\u2022")} ${i18n.t("menu:newUser.plugin.cometix")}`);
|
|
3744
|
+
console.log(` ${ansis__default.green("\u2022")} ${i18n.t("menu:newUser.plugin.superpowers")}`);
|
|
3683
3745
|
console.log("");
|
|
3684
|
-
console.log(
|
|
3746
|
+
console.log(ansis__default.dim(i18n.t("menu:newUser.pressEnter")));
|
|
3685
3747
|
await inquirer.prompt([{ type: "input", name: "continue", message: "" }]);
|
|
3686
3748
|
}
|
|
3687
3749
|
async function showMainMenu(options = {}) {
|
|
@@ -3702,11 +3764,11 @@ async function showMainMenu(options = {}) {
|
|
|
3702
3764
|
const currentType = getCurrentCodeTool();
|
|
3703
3765
|
if (resolvedType !== currentType) {
|
|
3704
3766
|
updateZcfConfig({ codeToolType: resolvedType });
|
|
3705
|
-
console.log(
|
|
3767
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("menu:codeToolSwitched", { tool: getCodeToolLabel(resolvedType) })}`));
|
|
3706
3768
|
}
|
|
3707
3769
|
} catch (err) {
|
|
3708
3770
|
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
3709
|
-
console.error(
|
|
3771
|
+
console.error(ansis__default.yellow(errorMessage));
|
|
3710
3772
|
}
|
|
3711
3773
|
}
|
|
3712
3774
|
const useLegacyMenu = options.legacyMenu || process__default.env.CCJK_LEGACY_MENU === "1";
|