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
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ansis__default from 'ansis';
|
|
2
2
|
import { homepage, version } from '../chunks/package.mjs';
|
|
3
3
|
import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
|
|
4
4
|
|
|
5
5
|
const theme = {
|
|
6
6
|
// === Core Colors ===
|
|
7
7
|
/** Terminal green - main text color */
|
|
8
|
-
primary:
|
|
8
|
+
primary: ansis__default.hex("#00FF00"),
|
|
9
9
|
/** Bright white - emphasis and highlights */
|
|
10
|
-
secondary:
|
|
10
|
+
secondary: ansis__default.white,
|
|
11
11
|
/** Dim green - subtle accents */
|
|
12
|
-
accent:
|
|
12
|
+
accent: ansis__default.hex("#00CC00"),
|
|
13
13
|
// === Semantic Colors ===
|
|
14
14
|
/** Success - bright green checkmark */
|
|
15
|
-
success:
|
|
15
|
+
success: ansis__default.hex("#00FF7F"),
|
|
16
16
|
/** Warning - amber/yellow for caution */
|
|
17
|
-
warning:
|
|
17
|
+
warning: ansis__default.hex("#FFD700"),
|
|
18
18
|
/** Error - red for failures */
|
|
19
|
-
error:
|
|
19
|
+
error: ansis__default.hex("#FF4444"),
|
|
20
20
|
/** Info - cyan for informational messages */
|
|
21
|
-
info:
|
|
21
|
+
info: ansis__default.hex("#00FFFF"),
|
|
22
22
|
// === Text Styles ===
|
|
23
23
|
/** Muted text - gray for less important info */
|
|
24
|
-
muted:
|
|
24
|
+
muted: ansis__default.gray,
|
|
25
25
|
/** Bold text */
|
|
26
|
-
bold:
|
|
26
|
+
bold: ansis__default.bold,
|
|
27
27
|
/** Dim text - for background info */
|
|
28
|
-
dim:
|
|
28
|
+
dim: ansis__default.dim,
|
|
29
29
|
// === MUD-specific Styles ===
|
|
30
30
|
/** Command prompt style - bright green */
|
|
31
|
-
prompt:
|
|
31
|
+
prompt: ansis__default.hex("#00FF00").bold,
|
|
32
32
|
/** System message - white */
|
|
33
|
-
system:
|
|
33
|
+
system: ansis__default.white,
|
|
34
34
|
/** NPC/hint text - dim green */
|
|
35
|
-
hint:
|
|
35
|
+
hint: ansis__default.hex("#88CC88"),
|
|
36
36
|
/** Quest/task highlight - bright */
|
|
37
|
-
quest:
|
|
37
|
+
quest: ansis__default.hex("#00FF00").bold,
|
|
38
38
|
/** Item/feature name - white bold */
|
|
39
|
-
item:
|
|
39
|
+
item: ansis__default.white.bold
|
|
40
40
|
};
|
|
41
41
|
const status = {
|
|
42
42
|
/** ✓ Success indicator */
|
|
43
|
-
ok: (text) => `${
|
|
43
|
+
ok: (text) => `${ansis__default.green("\u2713")} ${text}`,
|
|
44
44
|
/** ✗ Error indicator */
|
|
45
|
-
fail: (text) => `${
|
|
45
|
+
fail: (text) => `${ansis__default.red("\u2717")} ${text}`,
|
|
46
46
|
/** ⚠ Warning indicator */
|
|
47
|
-
warn: (text) => `${
|
|
47
|
+
warn: (text) => `${ansis__default.yellow("\u26A0")} ${text}`,
|
|
48
48
|
/** ℹ Info indicator */
|
|
49
|
-
info: (text) => `${
|
|
49
|
+
info: (text) => `${ansis__default.cyan("\u2139")} ${text}`,
|
|
50
50
|
/** ○ Pending indicator */
|
|
51
|
-
wait: (text) => `${
|
|
51
|
+
wait: (text) => `${ansis__default.gray("\u25CB")} ${text}`,
|
|
52
52
|
/** ◐ In-progress indicator */
|
|
53
|
-
work: (text) => `${
|
|
53
|
+
work: (text) => `${ansis__default.green("\u25D0")} ${text}`,
|
|
54
54
|
/** → Arrow indicator */
|
|
55
|
-
step: (text) => `${
|
|
55
|
+
step: (text) => `${ansis__default.green("\u2192")} ${text}`,
|
|
56
56
|
/** • Bullet point */
|
|
57
|
-
dot: (text) => `${
|
|
57
|
+
dot: (text) => `${ansis__default.green("\u2022")} ${text}`
|
|
58
58
|
};
|
|
59
59
|
const box = {
|
|
60
60
|
single: { tl: "\u250C", tr: "\u2510", bl: "\u2514", br: "\u2518", h: "\u2500", v: "\u2502" },
|
|
@@ -133,15 +133,15 @@ function displayBanner(subtitle) {
|
|
|
133
133
|
const subtitleText = subtitle || defaultSubtitle;
|
|
134
134
|
const paddedSubtitle = padToDisplayWidth(subtitleText, 28);
|
|
135
135
|
console.log(
|
|
136
|
-
|
|
136
|
+
ansis__default.green.bold(`
|
|
137
137
|
\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\u2557
|
|
138
138
|
\u2551 \u2551
|
|
139
139
|
\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2551
|
|
140
140
|
\u2551 \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 \u2551
|
|
141
|
-
\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2554\u255D ${
|
|
142
|
-
\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2588\u2588\u2557 ${
|
|
141
|
+
\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2554\u255D ${ansis__default.white.bold("JinKu")} \u2551
|
|
142
|
+
\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2588\u2588\u2557 ${ansis__default.gray(`v${version}`)}${" ".repeat(Math.max(0, 17 - version.length))}\u2551
|
|
143
143
|
\u2551 \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 \u2551
|
|
144
|
-
\u2551 \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 ${
|
|
144
|
+
\u2551 \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.gray(paddedSubtitle)} \u2551
|
|
145
145
|
\u2551 \u2551
|
|
146
146
|
\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\u255D
|
|
147
147
|
`)
|
|
@@ -149,14 +149,14 @@ function displayBanner(subtitle) {
|
|
|
149
149
|
}
|
|
150
150
|
function displayBannerWithInfo(subtitle) {
|
|
151
151
|
displayBanner(subtitle);
|
|
152
|
-
console.log(
|
|
153
|
-
console.log(
|
|
152
|
+
console.log(ansis__default.gray(` ${ansis__default.green("ccjk")} - Advanced AI Development Assistant`));
|
|
153
|
+
console.log(ansis__default.gray(` ${ansis__default.green(homepage)}
|
|
154
154
|
`));
|
|
155
155
|
}
|
|
156
156
|
function renderProgressBar(pct, width = 30) {
|
|
157
157
|
const filled = Math.round(pct / 100 * width);
|
|
158
158
|
const empty = width - filled;
|
|
159
|
-
const bar = theme.primary("\u2588".repeat(filled)) +
|
|
159
|
+
const bar = theme.primary("\u2588".repeat(filled)) + ansis__default.gray("\u2591".repeat(empty));
|
|
160
160
|
const percentage = `${Math.round(pct)}%`.padStart(4);
|
|
161
161
|
return `[${bar}] ${theme.secondary(percentage)}`;
|
|
162
162
|
}
|
|
@@ -165,7 +165,7 @@ function sectionDivider(title, width = 50) {
|
|
|
165
165
|
return theme.primary("\u2550".repeat(width));
|
|
166
166
|
}
|
|
167
167
|
const padding = Math.floor((width - getDisplayWidth(title) - 2) / 2);
|
|
168
|
-
return theme.primary(`${"\u2550".repeat(padding)} ${
|
|
168
|
+
return theme.primary(`${"\u2550".repeat(padding)} ${ansis__default.white.bold(title)} ${"\u2550".repeat(width - padding - getDisplayWidth(title) - 2)}`);
|
|
169
169
|
}
|
|
170
170
|
const STATUS = {
|
|
171
171
|
success: status.ok,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ansis__default from 'ansis';
|
|
2
2
|
import { SETTINGS_FILE, CLAUDE_DIR } from '../chunks/constants.mjs';
|
|
3
3
|
import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
|
|
4
4
|
import { j as backupExistingConfig, h as getExistingApiConfig, i as configureApi, s as switchToOfficialLogin, a as applyAiLanguageDirective } from '../chunks/config.mjs';
|
|
@@ -86,46 +86,46 @@ function displayMigrationResult(result) {
|
|
|
86
86
|
ensureI18nInitialized();
|
|
87
87
|
if (result.success) {
|
|
88
88
|
if (result.changes.length > 0) {
|
|
89
|
-
console.log(
|
|
89
|
+
console.log(ansis__default.green(`
|
|
90
90
|
\u2705 ${i18n.t("common:configurationFixed")}
|
|
91
91
|
`));
|
|
92
|
-
console.log(
|
|
92
|
+
console.log(ansis__default.bold("Changes made:"));
|
|
93
93
|
for (const change of result.changes) {
|
|
94
|
-
console.log(
|
|
94
|
+
console.log(ansis__default.gray(` \u2022 ${change}`));
|
|
95
95
|
}
|
|
96
96
|
if (result.backupPath) {
|
|
97
|
-
console.log(
|
|
97
|
+
console.log(ansis__default.gray(`
|
|
98
98
|
\u{1F4E6} Backup created: ${result.backupPath}`));
|
|
99
99
|
}
|
|
100
|
-
console.log(
|
|
100
|
+
console.log(ansis__default.yellow("\n\u26A0\uFE0F Please restart Claude Code CLI for changes to take effect.\n"));
|
|
101
101
|
} else {
|
|
102
|
-
console.log(
|
|
102
|
+
console.log(ansis__default.green(`
|
|
103
103
|
\u2705 ${i18n.t("common:noMigrationNeeded")}
|
|
104
104
|
`));
|
|
105
105
|
}
|
|
106
106
|
} else {
|
|
107
|
-
console.log(
|
|
107
|
+
console.log(ansis__default.red(`
|
|
108
108
|
\u274C ${i18n.t("common:migrationFailed")}
|
|
109
109
|
`));
|
|
110
110
|
if (result.errors.length > 0) {
|
|
111
|
-
console.log(
|
|
111
|
+
console.log(ansis__default.bold("Errors:"));
|
|
112
112
|
for (const error of result.errors) {
|
|
113
|
-
console.log(
|
|
113
|
+
console.log(ansis__default.red(` \u2022 ${error}`));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
if (result.backupPath) {
|
|
117
|
-
console.log(
|
|
117
|
+
console.log(ansis__default.gray(`
|
|
118
118
|
\u{1F4E6} Backup available at: ${result.backupPath}`));
|
|
119
|
-
console.log(
|
|
119
|
+
console.log(ansis__default.gray("You can restore with: cp <backup-path>/settings.json ~/.claude/settings.json\n"));
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
async function promptMigration() {
|
|
124
124
|
ensureI18nInitialized();
|
|
125
125
|
const inquirer = await import('inquirer');
|
|
126
|
-
console.log(
|
|
127
|
-
console.log(
|
|
128
|
-
console.log(
|
|
126
|
+
console.log(ansis__default.yellow("\n\u26A0\uFE0F Problematic configuration detected!\n"));
|
|
127
|
+
console.log(ansis__default.gray("Your settings.json contains configurations that prevent Claude Code"));
|
|
128
|
+
console.log(ansis__default.gray("from retrieving token counts, causing /compact failures.\n"));
|
|
129
129
|
const { shouldMigrate } = await inquirer.default.prompt({
|
|
130
130
|
type: "confirm",
|
|
131
131
|
name: "shouldMigrate",
|
|
@@ -244,14 +244,14 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault) {
|
|
|
244
244
|
];
|
|
245
245
|
const availableStyles = getAvailableOutputStyles();
|
|
246
246
|
if (hasLegacyPersonalityFiles() && !preselectedStyles) {
|
|
247
|
-
console.log(
|
|
247
|
+
console.log(ansis__default.yellow(`\u26A0\uFE0F ${i18n.t("configuration:legacyFilesDetected")}`));
|
|
248
248
|
const cleanupLegacy = await promptBoolean({
|
|
249
249
|
message: i18n.t("configuration:cleanupLegacyFiles"),
|
|
250
250
|
defaultValue: true
|
|
251
251
|
});
|
|
252
252
|
if (cleanupLegacy) {
|
|
253
253
|
cleanupLegacyPersonalityFiles();
|
|
254
|
-
console.log(
|
|
254
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("configuration:legacyFilesRemoved")}`));
|
|
255
255
|
}
|
|
256
256
|
} else if (hasLegacyPersonalityFiles() && preselectedStyles) {
|
|
257
257
|
cleanupLegacyPersonalityFiles();
|
|
@@ -270,7 +270,7 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault) {
|
|
|
270
270
|
choices: addNumbersToChoices(customStyles.map((style) => {
|
|
271
271
|
const styleInfo = outputStyleList.find((s) => s.id === style.id);
|
|
272
272
|
return {
|
|
273
|
-
name: `${styleInfo?.name || style.id} - ${
|
|
273
|
+
name: `${styleInfo?.name || style.id} - ${ansis__default.gray(styleInfo?.description || "")}`,
|
|
274
274
|
value: style.id,
|
|
275
275
|
checked: false
|
|
276
276
|
// Let user choose, not pre-selected
|
|
@@ -279,7 +279,7 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault) {
|
|
|
279
279
|
validate: async (input) => input.length > 0 || i18n.t("configuration:selectAtLeastOne")
|
|
280
280
|
});
|
|
281
281
|
if (!promptedStyles || promptedStyles.length === 0) {
|
|
282
|
-
console.log(
|
|
282
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
285
|
selectedStyles = promptedStyles;
|
|
@@ -292,7 +292,7 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault) {
|
|
|
292
292
|
...selectedStyles.map((styleId) => {
|
|
293
293
|
const styleInfo = outputStyleList.find((s) => s.id === styleId);
|
|
294
294
|
return {
|
|
295
|
-
name: `${styleInfo?.name || styleId} - ${
|
|
295
|
+
name: `${styleInfo?.name || styleId} - ${ansis__default.gray(styleInfo?.description || "")}`,
|
|
296
296
|
value: styleId,
|
|
297
297
|
short: styleInfo?.name || styleId
|
|
298
298
|
};
|
|
@@ -301,7 +301,7 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault) {
|
|
|
301
301
|
...availableStyles.filter((style) => !style.isCustom).map((style) => {
|
|
302
302
|
const styleInfo = outputStyleList.find((s) => s.id === style.id);
|
|
303
303
|
return {
|
|
304
|
-
name: `${styleInfo?.name || style.id} - ${
|
|
304
|
+
name: `${styleInfo?.name || style.id} - ${ansis__default.gray(styleInfo?.description || "")}`,
|
|
305
305
|
value: style.id,
|
|
306
306
|
short: styleInfo?.name || style.id
|
|
307
307
|
};
|
|
@@ -310,7 +310,7 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault) {
|
|
|
310
310
|
default: selectedStyles.includes("senior-architect") ? "senior-architect" : selectedStyles[0]
|
|
311
311
|
});
|
|
312
312
|
if (!promptedDefault) {
|
|
313
|
-
console.log(
|
|
313
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
316
|
defaultStyle = promptedDefault;
|
|
@@ -321,9 +321,9 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault) {
|
|
|
321
321
|
outputStyles: selectedStyles,
|
|
322
322
|
defaultOutputStyle: defaultStyle
|
|
323
323
|
});
|
|
324
|
-
console.log(
|
|
325
|
-
console.log(
|
|
326
|
-
console.log(
|
|
324
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("configuration:outputStyleInstalled")}`));
|
|
325
|
+
console.log(ansis__default.gray(` ${i18n.t("configuration:selectedStyles")}: ${selectedStyles.join(", ")}`));
|
|
326
|
+
console.log(ansis__default.gray(` ${i18n.t("configuration:defaultStyle")}: ${defaultStyle}`));
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
function validateApiKey(apiKey) {
|
|
@@ -359,19 +359,19 @@ async function configureApiCompletely(preselectedAuthType) {
|
|
|
359
359
|
short: i18n.t("api:useOfficialLogin")
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
|
-
name: `${i18n.t("api:useAuthToken")} - ${
|
|
362
|
+
name: `${i18n.t("api:useAuthToken")} - ${ansis__default.gray(i18n.t("api:authTokenDesc"))}`,
|
|
363
363
|
value: "auth_token",
|
|
364
364
|
short: i18n.t("api:useAuthToken")
|
|
365
365
|
},
|
|
366
366
|
{
|
|
367
|
-
name: `${i18n.t("api:useApiKey")} - ${
|
|
367
|
+
name: `${i18n.t("api:useApiKey")} - ${ansis__default.gray(i18n.t("api:apiKeyDesc"))}`,
|
|
368
368
|
value: "api_key",
|
|
369
369
|
short: i18n.t("api:useApiKey")
|
|
370
370
|
}
|
|
371
371
|
])
|
|
372
372
|
});
|
|
373
373
|
if (!selectedAuthType) {
|
|
374
|
-
console.log(
|
|
374
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
375
375
|
return null;
|
|
376
376
|
}
|
|
377
377
|
authType = selectedAuthType;
|
|
@@ -381,7 +381,7 @@ async function configureApiCompletely(preselectedAuthType) {
|
|
|
381
381
|
if (success) {
|
|
382
382
|
return null;
|
|
383
383
|
} else {
|
|
384
|
-
console.log(
|
|
384
|
+
console.log(ansis__default.red(i18n.t("api:officialLoginFailed")));
|
|
385
385
|
return null;
|
|
386
386
|
}
|
|
387
387
|
}
|
|
@@ -401,7 +401,7 @@ async function configureApiCompletely(preselectedAuthType) {
|
|
|
401
401
|
}
|
|
402
402
|
});
|
|
403
403
|
if (url === void 0) {
|
|
404
|
-
console.log(
|
|
404
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
405
405
|
return null;
|
|
406
406
|
}
|
|
407
407
|
const keyMessage = authType === "auth_token" ? i18n.t("api:enterAuthToken") : i18n.t("api:enterApiKey");
|
|
@@ -421,10 +421,10 @@ async function configureApiCompletely(preselectedAuthType) {
|
|
|
421
421
|
}
|
|
422
422
|
});
|
|
423
423
|
if (key === void 0) {
|
|
424
|
-
console.log(
|
|
424
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
425
425
|
return null;
|
|
426
426
|
}
|
|
427
|
-
console.log(
|
|
427
|
+
console.log(ansis__default.gray(` API Key: ${formatApiKeyDisplay(key)}`));
|
|
428
428
|
return { url, key, authType };
|
|
429
429
|
}
|
|
430
430
|
async function modifyApiConfigPartially(existingConfig) {
|
|
@@ -445,7 +445,7 @@ async function modifyApiConfigPartially(existingConfig) {
|
|
|
445
445
|
])
|
|
446
446
|
});
|
|
447
447
|
if (!item) {
|
|
448
|
-
console.log(
|
|
448
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
449
449
|
return;
|
|
450
450
|
}
|
|
451
451
|
if (item === "url") {
|
|
@@ -466,14 +466,14 @@ async function modifyApiConfigPartially(existingConfig) {
|
|
|
466
466
|
}
|
|
467
467
|
});
|
|
468
468
|
if (url === void 0) {
|
|
469
|
-
console.log(
|
|
469
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
470
470
|
return;
|
|
471
471
|
}
|
|
472
472
|
currentConfig.url = url;
|
|
473
473
|
const savedConfig = configureApi(currentConfig);
|
|
474
474
|
if (savedConfig) {
|
|
475
|
-
console.log(
|
|
476
|
-
console.log(
|
|
475
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("api:modificationSaved")}`));
|
|
476
|
+
console.log(ansis__default.gray(` ${i18n.t("api:apiConfigUrl")}: ${savedConfig.url}`));
|
|
477
477
|
}
|
|
478
478
|
} else if (item === "key") {
|
|
479
479
|
const authType = currentConfig.authType || "auth_token";
|
|
@@ -494,14 +494,14 @@ async function modifyApiConfigPartially(existingConfig) {
|
|
|
494
494
|
}
|
|
495
495
|
});
|
|
496
496
|
if (key === void 0) {
|
|
497
|
-
console.log(
|
|
497
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
500
|
currentConfig.key = key;
|
|
501
501
|
const savedConfig = configureApi(currentConfig);
|
|
502
502
|
if (savedConfig) {
|
|
503
|
-
console.log(
|
|
504
|
-
console.log(
|
|
503
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("api:modificationSaved")}`));
|
|
504
|
+
console.log(ansis__default.gray(` ${i18n.t("api:apiConfigKey")}: ${formatApiKeyDisplay(savedConfig.key)}`));
|
|
505
505
|
}
|
|
506
506
|
} else if (item === "authType") {
|
|
507
507
|
const { authType } = await inquirer.prompt({
|
|
@@ -515,14 +515,14 @@ async function modifyApiConfigPartially(existingConfig) {
|
|
|
515
515
|
default: currentConfig.authType === "api_key" ? 1 : 0
|
|
516
516
|
});
|
|
517
517
|
if (authType === void 0) {
|
|
518
|
-
console.log(
|
|
518
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
519
519
|
return;
|
|
520
520
|
}
|
|
521
521
|
currentConfig.authType = authType;
|
|
522
522
|
const savedConfig = configureApi(currentConfig);
|
|
523
523
|
if (savedConfig) {
|
|
524
|
-
console.log(
|
|
525
|
-
console.log(
|
|
524
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("api:modificationSaved")}`));
|
|
525
|
+
console.log(ansis__default.gray(` ${i18n.t("api:apiConfigAuthType")}: ${savedConfig.authType}`));
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
}
|
|
@@ -530,15 +530,15 @@ async function updatePromptOnly(aiOutputLang) {
|
|
|
530
530
|
ensureI18nInitialized();
|
|
531
531
|
const backupDir = backupExistingConfig();
|
|
532
532
|
if (backupDir) {
|
|
533
|
-
console.log(
|
|
533
|
+
console.log(ansis__default.gray(`\u2714 ${i18n.t("configuration:backupSuccess")}: ${backupDir}`));
|
|
534
534
|
}
|
|
535
535
|
if (aiOutputLang) {
|
|
536
536
|
applyAiLanguageDirective(aiOutputLang);
|
|
537
537
|
}
|
|
538
538
|
await configureOutputStyle();
|
|
539
|
-
console.log(
|
|
539
|
+
console.log(ansis__default.green(`\u2714 ${i18n.t("configuration:configSuccess")} ${CLAUDE_DIR}`));
|
|
540
540
|
console.log(`
|
|
541
|
-
${
|
|
541
|
+
${ansis__default.green(i18n.t("common:complete"))}`);
|
|
542
542
|
}
|
|
543
543
|
|
|
544
544
|
function getRootDir() {
|
|
@@ -550,18 +550,18 @@ const DEFAULT_CODE_TOOL_TEMPLATE = "claude-code";
|
|
|
550
550
|
const COMMON_TEMPLATE_CATEGORIES = ["git", "sixStep"];
|
|
551
551
|
function formatTags(tags) {
|
|
552
552
|
const tagColors = {
|
|
553
|
-
recommended: (text) =>
|
|
554
|
-
popular: (text) =>
|
|
555
|
-
new: (text) =>
|
|
556
|
-
essential: (text) =>
|
|
557
|
-
professional: (text) =>
|
|
553
|
+
recommended: (text) => ansis__default.bgGreen.black(` ${text} `),
|
|
554
|
+
popular: (text) => ansis__default.bgYellow.black(` ${text} `),
|
|
555
|
+
new: (text) => ansis__default.bgCyan.black(` ${text} `),
|
|
556
|
+
essential: (text) => ansis__default.bgBlue.white(` ${text} `),
|
|
557
|
+
professional: (text) => ansis__default.bgMagenta.white(` ${text} `)
|
|
558
558
|
};
|
|
559
559
|
return tags.map((tag) => tagColors[tag](getTagLabel(tag))).join(" ");
|
|
560
560
|
}
|
|
561
561
|
function buildWorkflowChoice(workflow) {
|
|
562
562
|
const tags = formatTags(workflow.metadata.tags);
|
|
563
|
-
const stats = workflow.stats ?
|
|
564
|
-
const description = workflow.description ?
|
|
563
|
+
const stats = workflow.stats ? ansis__default.dim(workflow.stats) : "";
|
|
564
|
+
const description = workflow.description ? ansis__default.gray(workflow.description) : "";
|
|
565
565
|
const nameLine = `${workflow.name} ${tags}`;
|
|
566
566
|
const detailLine = stats ? ` ${stats}` : "";
|
|
567
567
|
const descLine = description ? ` ${description}` : "";
|
|
@@ -581,9 +581,9 @@ async function selectAndInstallWorkflows(configLang, preselectedWorkflows) {
|
|
|
581
581
|
selectedWorkflows = preselectedWorkflows;
|
|
582
582
|
} else {
|
|
583
583
|
console.log("");
|
|
584
|
-
console.log(
|
|
585
|
-
console.log(
|
|
586
|
-
console.log(
|
|
584
|
+
console.log(ansis__default.bold.cyan("\u2501".repeat(60)));
|
|
585
|
+
console.log(ansis__default.bold.white(` \u{1F680} ${i18n.t("workflow:selectWorkflowType")}`));
|
|
586
|
+
console.log(ansis__default.bold.cyan("\u2501".repeat(60)));
|
|
587
587
|
console.log("");
|
|
588
588
|
const response = await inquirer.prompt({
|
|
589
589
|
type: "checkbox",
|
|
@@ -595,7 +595,7 @@ async function selectAndInstallWorkflows(configLang, preselectedWorkflows) {
|
|
|
595
595
|
selectedWorkflows = response.selectedWorkflows;
|
|
596
596
|
}
|
|
597
597
|
if (!selectedWorkflows || selectedWorkflows.length === 0) {
|
|
598
|
-
console.log(
|
|
598
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
599
599
|
return;
|
|
600
600
|
}
|
|
601
601
|
await cleanupOldVersionFiles();
|
|
@@ -623,7 +623,7 @@ async function installWorkflowWithDependencies(config, configLang) {
|
|
|
623
623
|
interviewWorkflow: i18n.t("workflow:workflowOption.interviewWorkflow")
|
|
624
624
|
};
|
|
625
625
|
const workflowName = WORKFLOW_OPTION_KEYS[config.id] || config.id;
|
|
626
|
-
console.log(
|
|
626
|
+
console.log(ansis__default.green(`
|
|
627
627
|
\u{1F4E6} ${i18n.t("workflow:installingWorkflow")}: ${workflowName}...`));
|
|
628
628
|
const commandsDir = join(CLAUDE_DIR, "commands", "ccjk");
|
|
629
629
|
if (!existsSync(commandsDir)) {
|
|
@@ -655,11 +655,11 @@ async function installWorkflowWithDependencies(config, configLang) {
|
|
|
655
655
|
try {
|
|
656
656
|
await copyFile$1(commandSource, commandDest);
|
|
657
657
|
result.installedCommands.push(destFileName);
|
|
658
|
-
console.log(
|
|
658
|
+
console.log(ansis__default.gray(` \u2714 ${i18n.t("workflow:installedCommand")}: ccjk/${destFileName}`));
|
|
659
659
|
} catch (error) {
|
|
660
660
|
const errorMsg = `${i18n.t("workflow:failedToInstallCommand")} ${commandFile}: ${error}`;
|
|
661
661
|
result.errors?.push(errorMsg);
|
|
662
|
-
console.error(
|
|
662
|
+
console.error(ansis__default.red(` \u2717 ${errorMsg}`));
|
|
663
663
|
result.success = false;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
@@ -685,11 +685,11 @@ async function installWorkflowWithDependencies(config, configLang) {
|
|
|
685
685
|
try {
|
|
686
686
|
await copyFile$1(agentSource, agentDest);
|
|
687
687
|
result.installedAgents.push(agent.filename);
|
|
688
|
-
console.log(
|
|
688
|
+
console.log(ansis__default.gray(` \u2714 ${i18n.t("workflow:installedAgent")}: ccjk/${config.category}/${agent.filename}`));
|
|
689
689
|
} catch (error) {
|
|
690
690
|
const errorMsg = `${i18n.t("workflow:failedToInstallAgent")} ${agent.filename}: ${error}`;
|
|
691
691
|
result.errors?.push(errorMsg);
|
|
692
|
-
console.error(
|
|
692
|
+
console.error(ansis__default.red(` \u2717 ${errorMsg}`));
|
|
693
693
|
if (agent.required) {
|
|
694
694
|
result.success = false;
|
|
695
695
|
}
|
|
@@ -698,15 +698,15 @@ async function installWorkflowWithDependencies(config, configLang) {
|
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
if (result.success) {
|
|
701
|
-
console.log(
|
|
701
|
+
console.log(ansis__default.green(`\u2714 ${workflowName} ${i18n.t("workflow:workflowInstallSuccess")}`));
|
|
702
702
|
} else {
|
|
703
|
-
console.log(
|
|
703
|
+
console.log(ansis__default.red(`\u2717 ${workflowName} ${i18n.t("workflow:workflowInstallError")}`));
|
|
704
704
|
}
|
|
705
705
|
return result;
|
|
706
706
|
}
|
|
707
707
|
async function cleanupOldVersionFiles() {
|
|
708
708
|
ensureI18nInitialized();
|
|
709
|
-
console.log(
|
|
709
|
+
console.log(ansis__default.green(`
|
|
710
710
|
\u{1F9F9} ${i18n.t("workflow:cleaningOldFiles")}...`));
|
|
711
711
|
const oldCommandFiles = [
|
|
712
712
|
join(CLAUDE_DIR, "commands", "workflow.md"),
|
|
@@ -720,9 +720,9 @@ async function cleanupOldVersionFiles() {
|
|
|
720
720
|
if (existsSync(file)) {
|
|
721
721
|
try {
|
|
722
722
|
await rm(file, { force: true });
|
|
723
|
-
console.log(
|
|
723
|
+
console.log(ansis__default.gray(` \u2714 ${i18n.t("workflow:removedOldFile")}: ${file.replace(CLAUDE_DIR, "~/.claude")}`));
|
|
724
724
|
} catch {
|
|
725
|
-
console.error(
|
|
725
|
+
console.error(ansis__default.yellow(` \u26A0 ${i18n.t("errors:failedToRemoveFile")}: ${file.replace(CLAUDE_DIR, "~/.claude")}`));
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
}
|
|
@@ -730,9 +730,9 @@ async function cleanupOldVersionFiles() {
|
|
|
730
730
|
if (existsSync(file)) {
|
|
731
731
|
try {
|
|
732
732
|
await rm(file, { force: true });
|
|
733
|
-
console.log(
|
|
733
|
+
console.log(ansis__default.gray(` \u2714 ${i18n.t("workflow:removedOldFile")}: ${file.replace(CLAUDE_DIR, "~/.claude")}`));
|
|
734
734
|
} catch {
|
|
735
|
-
console.error(
|
|
735
|
+
console.error(ansis__default.yellow(` \u26A0 ${i18n.t("errors:failedToRemoveFile")}: ${file.replace(CLAUDE_DIR, "~/.claude")}`));
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
738
|
}
|