ccjk 12.0.0 → 12.0.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/agent-teams.mjs +17 -18
- package/dist/chunks/agent.mjs +105 -102
- package/dist/chunks/agents.mjs +87 -77
- package/dist/chunks/api-cli.mjs +41 -27
- package/dist/chunks/api-providers.mjs +2 -4
- package/dist/chunks/api.mjs +22 -11
- package/dist/chunks/auto-bootstrap.mjs +3 -5
- package/dist/chunks/auto-init.mjs +3 -4
- package/dist/chunks/auto-updater.mjs +103 -91
- package/dist/chunks/banner.mjs +41 -42
- package/dist/chunks/boost.mjs +30 -31
- package/dist/chunks/ccjk-agents.mjs +6 -9
- package/dist/chunks/ccjk-all.mjs +703 -85
- package/dist/chunks/ccjk-config.mjs +6 -6
- package/dist/chunks/ccjk-hooks.mjs +20 -9
- package/dist/chunks/ccjk-mcp.mjs +64 -52
- package/dist/chunks/ccjk-setup.mjs +35 -25
- package/dist/chunks/ccjk-skills.mjs +51 -41
- package/dist/chunks/ccr.mjs +42 -32
- package/dist/chunks/ccu.mjs +16 -12
- package/dist/chunks/check-updates.mjs +30 -19
- package/dist/chunks/claude-code-config-manager.mjs +25 -10
- package/dist/chunks/claude-code-incremental-manager.mjs +65 -51
- package/dist/chunks/claude-config.mjs +2 -2
- package/dist/chunks/claude-wrapper.mjs +9 -6
- package/dist/chunks/cleanup-migration.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +10 -3
- package/dist/chunks/cloud-sync.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +58 -45
- package/dist/chunks/codex-provider-manager.mjs +29 -16
- package/dist/chunks/codex-uninstaller.mjs +5 -6
- package/dist/chunks/codex.mjs +89 -89
- package/dist/chunks/commands.mjs +28 -29
- package/dist/chunks/commands2.mjs +4 -3
- package/dist/chunks/commit.mjs +42 -23
- package/dist/chunks/completion.mjs +46 -47
- package/dist/chunks/config-consolidator.mjs +12 -13
- package/dist/chunks/config-switch.mjs +66 -53
- package/dist/chunks/config.mjs +10 -10
- package/dist/chunks/config2.mjs +53 -42
- package/dist/chunks/config3.mjs +107 -93
- package/dist/chunks/constants.mjs +2 -4
- package/dist/chunks/context-loader.mjs +5 -4
- package/dist/chunks/context.mjs +77 -76
- package/dist/chunks/convoy-manager.mjs +4 -4
- package/dist/chunks/dashboard.mjs +28 -29
- package/dist/chunks/doctor.mjs +68 -54
- package/dist/chunks/evolution.mjs +37 -38
- package/dist/chunks/features.mjs +103 -92
- package/dist/chunks/fs-operations.mjs +1 -1
- package/dist/chunks/health-alerts.mjs +1 -1
- package/dist/chunks/health-check.mjs +1 -1
- package/dist/chunks/help.mjs +117 -116
- package/dist/chunks/hook-installer.mjs +3 -2
- package/dist/chunks/index.mjs +20 -6
- package/dist/chunks/index10.mjs +1171 -0
- package/dist/chunks/index11.mjs +1008 -0
- package/dist/chunks/index12.mjs +193 -0
- package/dist/chunks/index13.mjs +218 -0
- package/dist/chunks/index14.mjs +663 -0
- package/dist/chunks/index2.mjs +19 -10
- package/dist/chunks/index3.mjs +19079 -164
- package/dist/chunks/index4.mjs +8 -1171
- package/dist/chunks/index5.mjs +7479 -884
- package/dist/chunks/index6.mjs +160 -184
- package/dist/chunks/index7.mjs +3573 -653
- package/dist/chunks/index8.mjs +19 -0
- package/dist/chunks/index9.mjs +616 -0
- package/dist/chunks/init.mjs +173 -173
- package/dist/chunks/installer.mjs +92 -82
- package/dist/chunks/installer2.mjs +3 -2
- package/dist/chunks/interview.mjs +118 -107
- package/dist/chunks/json-config.mjs +3 -2
- package/dist/chunks/linux.mjs +3863 -0
- package/dist/chunks/macos.mjs +69 -0
- package/dist/chunks/main.mjs +635 -0
- package/dist/chunks/marketplace.mjs +69 -66
- package/dist/chunks/mcp-cli.mjs +61 -48
- package/dist/chunks/mcp.mjs +140 -127
- package/dist/chunks/menu.mjs +85 -85
- package/dist/chunks/metrics-display.mjs +41 -40
- package/dist/chunks/migrator.mjs +4 -5
- package/dist/chunks/monitor.mjs +95 -95
- package/dist/chunks/notification.mjs +151 -141
- package/dist/chunks/onboarding.mjs +26 -15
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/paradigm.mjs +24 -23
- package/dist/chunks/permission-manager.mjs +10 -11
- package/dist/chunks/permissions.mjs +72 -57
- package/dist/chunks/persistence-manager.mjs +97 -84
- package/dist/chunks/persistence.mjs +1 -1
- package/dist/chunks/platform.mjs +29 -29
- package/dist/chunks/plugin.mjs +104 -105
- package/dist/chunks/prompts.mjs +36 -25
- package/dist/chunks/providers.mjs +68 -69
- package/dist/chunks/quick-actions.mjs +71 -72
- package/dist/chunks/quick-provider.mjs +56 -40
- package/dist/chunks/quick-setup.mjs +71 -60
- package/dist/chunks/remote.mjs +21 -12
- package/dist/chunks/session.mjs +116 -103
- package/dist/chunks/sessions.mjs +29 -28
- package/dist/chunks/silent-updater.mjs +8 -10
- package/dist/chunks/simple-config.mjs +13 -10
- package/dist/chunks/skill.mjs +8560 -103
- package/dist/chunks/skills-sync.mjs +5212 -79
- package/dist/chunks/skills.mjs +105 -94
- package/dist/chunks/slash-commands.mjs +36 -37
- package/dist/chunks/smart-defaults.mjs +7 -3
- package/dist/chunks/smart-guide.mjs +1 -1
- package/dist/chunks/startup.mjs +2 -4
- package/dist/chunks/stats.mjs +41 -42
- package/dist/chunks/status.mjs +49 -50
- package/dist/chunks/team.mjs +24 -12
- package/dist/chunks/thinking.mjs +74 -63
- package/dist/chunks/trace.mjs +20 -19
- package/dist/chunks/uninstall.mjs +69 -56
- package/dist/chunks/update.mjs +39 -28
- package/dist/chunks/upgrade-manager.mjs +24 -18
- package/dist/chunks/version-checker.mjs +45 -41
- package/dist/chunks/vim.mjs +81 -69
- package/dist/chunks/windows.mjs +14 -0
- package/dist/chunks/workflows.mjs +15 -15
- package/dist/chunks/wsl.mjs +129 -0
- package/dist/chunks/zero-config.mjs +45 -34
- package/dist/cli.mjs +20 -20
- package/dist/index.mjs +41 -31
- package/dist/shared/ccjk.BAGoDD49.mjs +36 -0
- package/dist/shared/ccjk.BBtCGd_g.mjs +899 -0
- package/dist/shared/{ccjk.CGcy7cNM.mjs → ccjk.BDKUdmLk.mjs} +1 -1
- package/dist/shared/{ccjk.DtMBiwVG.mjs → ccjk.BFxsJM0k.mjs} +1 -1
- package/dist/shared/{ccjk.j4uut26D.mjs → ccjk.BIxuVL3_.mjs} +5 -5
- package/dist/shared/ccjk.BRZ9ww8S.mjs +142 -0
- package/dist/shared/{ccjk.CN0edl87.mjs → ccjk.BSYWk9ML.mjs} +1 -1
- package/dist/shared/{ccjk.Dk1HDseQ.mjs → ccjk.BnpWvs9V.mjs} +75 -75
- package/dist/shared/ccjk.BoApaI4j.mjs +28 -0
- package/dist/shared/{ccjk.DKojSRzw.mjs → ccjk.BrPUmTqm.mjs} +1 -1
- package/dist/shared/{ccjk.C10pepYx.mjs → ccjk.BxSmJ8B7.mjs} +1 -1
- package/dist/shared/ccjk.Bx_rmYfN.mjs +69 -0
- package/dist/shared/ccjk.COweQ1RR.mjs +5 -0
- package/dist/shared/{ccjk.BN90X6oc.mjs → ccjk.CePkJq2S.mjs} +17 -17
- package/dist/shared/{ccjk.Bvoex4TZ.mjs → ccjk.CfKKcvWy.mjs} +1 -1
- package/dist/shared/ccjk.Cjgrln_h.mjs +297 -0
- package/dist/shared/ccjk.CxpGa6MC.mjs +2724 -0
- package/dist/shared/{ccjk.DfwJOEok.mjs → ccjk.D5MFQT7w.mjs} +1 -1
- package/dist/shared/{ccjk.cChAaGgT.mjs → ccjk.DG_o24cZ.mjs} +6 -6
- package/dist/shared/{ccjk.bhFAMRyc.mjs → ccjk.DLLw-h4Y.mjs} +32 -32
- package/dist/shared/ccjk.DOwtZMk8.mjs +4019 -0
- package/dist/shared/{ccjk.BsXQugfY.mjs → ccjk.DTdjs-qK.mjs} +13 -13
- package/dist/shared/{ccjk.Bdhyg3X-.mjs → ccjk.DsYaCCx4.mjs} +1 -1
- package/dist/shared/ccjk.KfSWcGlE.mjs +38 -0
- package/dist/shared/ccjk.RyizuzOI.mjs +21 -0
- package/dist/shared/{ccjk.h7_W-wTs.mjs → ccjk.SPoXMvZD.mjs} +1 -1
- package/dist/shared/ccjk.T_cX87dY.mjs +15 -0
- package/dist/shared/{ccjk.CrB6OYHv.mjs → ccjk._dESH4Rk.mjs} +2 -2
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +249 -0
- package/dist/shared/{ccjk.CBhIZiPz.mjs → ccjk.hoqrwWdN.mjs} +1 -1
- package/dist/shared/{ccjk.BNwRnWYx.mjs → ccjk.s7OCVzdd.mjs} +1230 -33
- package/dist/shared/{ccjk.BOIUTf5z.mjs → ccjk.waa2ikKJ.mjs} +8 -9
- package/package.json +31 -30
- package/dist/shared/ccjk.DHbrGcgg.mjs +0 -13
- package/dist/shared/ccjk.DntgA8fQ.mjs +0 -42
package/dist/chunks/menu.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import inquirer from '
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i as inquirer } from './index3.mjs';
|
|
3
3
|
import { existsSync } from 'node:fs';
|
|
4
4
|
import process__default from 'node:process';
|
|
5
|
-
import { join } from 'pathe';
|
|
6
5
|
import { M as MCP_SERVICE_CONFIGS } from './codex.mjs';
|
|
7
6
|
import { CODE_TOOL_BANNERS, CLAUDE_DIR, isCodeToolType, DEFAULT_CODE_TOOL_TYPE } from './constants.mjs';
|
|
8
|
-
import { ensureI18nInitialized, i18n } from './
|
|
7
|
+
import { ensureI18nInitialized, i18n } from './index5.mjs';
|
|
9
8
|
import { displayBannerWithInfo } from './banner.mjs';
|
|
10
9
|
import { updateZcfConfig, readZcfConfig } from './ccjk-config.mjs';
|
|
11
10
|
import { r as readMcpConfig } from './claude-config.mjs';
|
|
12
|
-
import { r as resolveCodeType } from '../shared/ccjk.
|
|
13
|
-
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.
|
|
11
|
+
import { r as resolveCodeType } from '../shared/ccjk.BSYWk9ML.mjs';
|
|
12
|
+
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
|
|
14
13
|
import { changeScriptLanguageFeature, mcpManagerFeature, configureMergedPermissionsFeature, configureAiMemoryFeature, configureDefaultModelFeature, configureMcpFeature, configureApiFeature } from './features.mjs';
|
|
15
|
-
import { p as promptBoolean } from '../shared/ccjk.
|
|
14
|
+
import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
|
|
16
15
|
import { homedir } from 'node:os';
|
|
17
16
|
import { runCcrStop, runCcrStart, runCcrRestart, runCcrStatus, runCcrUi } from './commands.mjs';
|
|
18
17
|
import { readCcrConfig, configureCcrFeature } from './config2.mjs';
|
|
19
18
|
import { a as isCcrInstalled, b as installCcr, i as init } from './init.mjs';
|
|
19
|
+
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
20
20
|
import { ccjkAgents } from './ccjk-agents.mjs';
|
|
21
21
|
import { ccjkSkills } from './ccjk-skills.mjs';
|
|
22
22
|
import { checkUpdates } from './check-updates.mjs';
|
|
@@ -146,17 +146,17 @@ async function showCcrMenu() {
|
|
|
146
146
|
try {
|
|
147
147
|
ensureI18nInitialized();
|
|
148
148
|
console.log(`
|
|
149
|
-
${
|
|
150
|
-
console.log(
|
|
151
|
-
console.log(`${
|
|
149
|
+
${a.green("\u2550".repeat(50))}`);
|
|
150
|
+
console.log(a.bold.cyan(` ${i18n.t("ccr:ccrMenuTitle")}`));
|
|
151
|
+
console.log(`${a.green("\u2550".repeat(50))}
|
|
152
152
|
`);
|
|
153
|
-
console.log(` ${
|
|
154
|
-
console.log(` ${
|
|
155
|
-
console.log(` ${
|
|
156
|
-
console.log(` ${
|
|
157
|
-
console.log(` ${
|
|
158
|
-
console.log(` ${
|
|
159
|
-
console.log(` ${
|
|
153
|
+
console.log(` ${a.green("1.")} ${i18n.t("ccr:ccrMenuOptions.initCcr")} ${a.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.initCcr")}`)}`);
|
|
154
|
+
console.log(` ${a.green("2.")} ${i18n.t("ccr:ccrMenuOptions.startUi")} ${a.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.startUi")}`)}`);
|
|
155
|
+
console.log(` ${a.green("3.")} ${i18n.t("ccr:ccrMenuOptions.checkStatus")} ${a.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.checkStatus")}`)}`);
|
|
156
|
+
console.log(` ${a.green("4.")} ${i18n.t("ccr:ccrMenuOptions.restart")} ${a.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.restart")}`)}`);
|
|
157
|
+
console.log(` ${a.green("5.")} ${i18n.t("ccr:ccrMenuOptions.start")} ${a.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.start")}`)}`);
|
|
158
|
+
console.log(` ${a.green("6.")} ${i18n.t("ccr:ccrMenuOptions.stop")} ${a.gray(`- ${i18n.t("ccr:ccrMenuDescriptions.stop")}`)}`);
|
|
159
|
+
console.log(` ${a.yellow("0.")} ${i18n.t("ccr:ccrMenuOptions.back")}`);
|
|
160
160
|
console.log("");
|
|
161
161
|
const { choice } = await inquirer.prompt({
|
|
162
162
|
type: "input",
|
|
@@ -173,18 +173,18 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
173
173
|
if (!ccrStatus.hasCorrectPackage) {
|
|
174
174
|
await installCcr();
|
|
175
175
|
} else {
|
|
176
|
-
console.log(
|
|
176
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrAlreadyInstalled")}`));
|
|
177
177
|
}
|
|
178
178
|
await configureCcrFeature();
|
|
179
|
-
console.log(
|
|
179
|
+
console.log(a.green(`
|
|
180
180
|
\u2714 ${i18n.t("ccr:ccrSetupComplete")}`));
|
|
181
181
|
break;
|
|
182
182
|
}
|
|
183
183
|
case "2":
|
|
184
184
|
if (!isCcrConfigured()) {
|
|
185
|
-
console.log(
|
|
185
|
+
console.log(a.yellow(`
|
|
186
186
|
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
187
|
-
console.log(
|
|
187
|
+
console.log(a.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
188
188
|
`));
|
|
189
189
|
} else {
|
|
190
190
|
const config = readCcrConfig();
|
|
@@ -193,9 +193,9 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
193
193
|
break;
|
|
194
194
|
case "3":
|
|
195
195
|
if (!isCcrConfigured()) {
|
|
196
|
-
console.log(
|
|
196
|
+
console.log(a.yellow(`
|
|
197
197
|
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
198
|
-
console.log(
|
|
198
|
+
console.log(a.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
199
199
|
`));
|
|
200
200
|
} else {
|
|
201
201
|
await runCcrStatus();
|
|
@@ -203,9 +203,9 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
203
203
|
break;
|
|
204
204
|
case "4":
|
|
205
205
|
if (!isCcrConfigured()) {
|
|
206
|
-
console.log(
|
|
206
|
+
console.log(a.yellow(`
|
|
207
207
|
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
208
|
-
console.log(
|
|
208
|
+
console.log(a.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
209
209
|
`));
|
|
210
210
|
} else {
|
|
211
211
|
await runCcrRestart();
|
|
@@ -213,9 +213,9 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
213
213
|
break;
|
|
214
214
|
case "5":
|
|
215
215
|
if (!isCcrConfigured()) {
|
|
216
|
-
console.log(
|
|
216
|
+
console.log(a.yellow(`
|
|
217
217
|
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
218
|
-
console.log(
|
|
218
|
+
console.log(a.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
219
219
|
`));
|
|
220
220
|
} else {
|
|
221
221
|
await runCcrStart();
|
|
@@ -223,9 +223,9 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
223
223
|
break;
|
|
224
224
|
case "6":
|
|
225
225
|
if (!isCcrConfigured()) {
|
|
226
|
-
console.log(
|
|
226
|
+
console.log(a.yellow(`
|
|
227
227
|
\u26A0\uFE0F ${i18n.t("ccr:ccrNotConfigured")}`));
|
|
228
|
-
console.log(
|
|
228
|
+
console.log(a.green(` ${i18n.t("ccr:pleaseInitFirst")}
|
|
229
229
|
`));
|
|
230
230
|
} else {
|
|
231
231
|
await runCcrStop();
|
|
@@ -236,7 +236,7 @@ ${ansis.green("\u2550".repeat(50))}`);
|
|
|
236
236
|
}
|
|
237
237
|
if (choice !== "0") {
|
|
238
238
|
console.log(`
|
|
239
|
-
${
|
|
239
|
+
${a.dim("\u2500".repeat(50))}
|
|
240
240
|
`);
|
|
241
241
|
const continueInCcr = await promptBoolean({
|
|
242
242
|
message: i18n.t("common:returnToMenu"),
|
|
@@ -279,7 +279,7 @@ function getCodeToolLabel(codeTool) {
|
|
|
279
279
|
}
|
|
280
280
|
function printSeparator() {
|
|
281
281
|
console.log(`
|
|
282
|
-
${
|
|
282
|
+
${a.dim("\u2500".repeat(50))}
|
|
283
283
|
`);
|
|
284
284
|
}
|
|
285
285
|
async function handleCodeToolSwitch(current) {
|
|
@@ -300,39 +300,39 @@ async function handleCodeToolSwitch(current) {
|
|
|
300
300
|
choices
|
|
301
301
|
});
|
|
302
302
|
if (!tool) {
|
|
303
|
-
console.log(
|
|
303
|
+
console.log(a.green(i18n.t("common:cancelled")));
|
|
304
304
|
return false;
|
|
305
305
|
}
|
|
306
306
|
updateZcfConfig({ codeToolType: tool });
|
|
307
|
-
console.log(
|
|
307
|
+
console.log(a.green(`\u2714 ${isZh ? "\u5DF2\u5207\u6362\u5230" : "Switched to"} ${getCodeToolLabel(tool)}`));
|
|
308
308
|
return true;
|
|
309
309
|
}
|
|
310
310
|
function showHelpDocumentation(isZh) {
|
|
311
311
|
console.log("");
|
|
312
|
-
console.log(
|
|
313
|
-
console.log(
|
|
312
|
+
console.log(a.bold.cyan(isZh ? "\u{1F4D6} CCJK \u4F7F\u7528\u6307\u5357" : "\u{1F4D6} CCJK User Guide"));
|
|
313
|
+
console.log(a.dim("\u2500".repeat(50)));
|
|
314
314
|
console.log("");
|
|
315
|
-
console.log(
|
|
316
|
-
console.log(` ${
|
|
317
|
-
console.log(` ${
|
|
315
|
+
console.log(a.bold(isZh ? "\u{1F517} \u76F8\u5173\u94FE\u63A5" : "\u{1F517} Links"));
|
|
316
|
+
console.log(` ${a.green("GitHub:")} ${a.dim("https://github.com/anthropics/claude-code")}`);
|
|
317
|
+
console.log(` ${a.green("NPM:")} ${a.dim("https://www.npmjs.com/package/ccjk")}`);
|
|
318
318
|
console.log("");
|
|
319
|
-
console.log(
|
|
320
|
-
console.log(` ${
|
|
321
|
-
console.log(` ${
|
|
322
|
-
console.log(` ${
|
|
323
|
-
console.log(` ${
|
|
324
|
-
console.log(` ${
|
|
325
|
-
console.log(` ${
|
|
326
|
-
console.log(` ${
|
|
319
|
+
console.log(a.bold(isZh ? "\u{1F4AC} \u5E38\u7528\u547D\u4EE4" : "\u{1F4AC} Common Commands"));
|
|
320
|
+
console.log(` ${a.green("npx ccjk")} ${a.dim(isZh ? "- \u6253\u5F00\u4E3B\u83DC\u5355" : "- Open main menu")}`);
|
|
321
|
+
console.log(` ${a.green("npx ccjk init")} ${a.dim(isZh ? "- \u521D\u59CB\u5316\u914D\u7F6E" : "- Initialize config")}`);
|
|
322
|
+
console.log(` ${a.green("npx ccjk update")} ${a.dim(isZh ? "- \u66F4\u65B0\u5DE5\u4F5C\u6D41" : "- Update workflows")}`);
|
|
323
|
+
console.log(` ${a.green("npx ccjk doctor")} ${a.dim(isZh ? "- \u8BCA\u65AD\u95EE\u9898" : "- Diagnose issues")}`);
|
|
324
|
+
console.log(` ${a.green("npx ccjk skills")} ${a.dim(isZh ? "- \u7BA1\u7406\u6280\u80FD" : "- Manage skills")}`);
|
|
325
|
+
console.log(` ${a.green("npx ccjk mcp")} ${a.dim(isZh ? "- \u7BA1\u7406 MCP" : "- Manage MCP")}`);
|
|
326
|
+
console.log(` ${a.green("npx ccjk agents")} ${a.dim(isZh ? "- \u7BA1\u7406\u667A\u80FD\u4F53" : "- Manage agents")}`);
|
|
327
327
|
console.log("");
|
|
328
|
-
console.log(
|
|
329
|
-
console.log(` ${
|
|
330
|
-
console.log(` ${
|
|
328
|
+
console.log(a.bold(isZh ? "\u26A1 \u5FEB\u6377\u65B9\u5F0F" : "\u26A1 Shortcuts"));
|
|
329
|
+
console.log(` ${a.green("npx ccjk qs")} ${a.dim(isZh ? "- \u5FEB\u901F\u914D\u7F6E (quick-setup)" : "- Quick setup")}`);
|
|
330
|
+
console.log(` ${a.green("npx ccjk <code>")} ${a.dim(isZh ? "- \u5FEB\u901F\u542F\u52A8\u63D0\u4F9B\u5546 (\u5982: glm, kimi)" : "- Quick launch provider (e.g., glm, kimi)")}`);
|
|
331
331
|
console.log("");
|
|
332
|
-
console.log(
|
|
333
|
-
console.log(
|
|
334
|
-
console.log(
|
|
335
|
-
console.log(
|
|
332
|
+
console.log(a.bold(isZh ? "\u{1F4A1} \u63D0\u793A" : "\u{1F4A1} Tips"));
|
|
333
|
+
console.log(a.dim(isZh ? ' \u2022 \u9996\u6B21\u4F7F\u7528\u5EFA\u8BAE\u8FD0\u884C "npx ccjk" \u8FDB\u884C\u4E00\u952E\u914D\u7F6E' : ' \u2022 First time? Run "npx ccjk" for quick setup'));
|
|
334
|
+
console.log(a.dim(isZh ? ' \u2022 \u9047\u5230\u95EE\u9898\u53EF\u8FD0\u884C "npx ccjk doctor" \u81EA\u52A8\u8BCA\u65AD' : ' \u2022 Having issues? Run "npx ccjk doctor" to diagnose'));
|
|
335
|
+
console.log(a.dim(isZh ? ' \u2022 \u4F7F\u7528 "npx ccjk --help" \u67E5\u770B\u6240\u6709\u547D\u4EE4' : ' \u2022 Use "npx ccjk --help" to see all commands'));
|
|
336
336
|
console.log("");
|
|
337
337
|
}
|
|
338
338
|
function checkNewMcpServicesHint(isZh) {
|
|
@@ -343,7 +343,7 @@ function checkNewMcpServicesHint(isZh) {
|
|
|
343
343
|
if (missing.length > 0) {
|
|
344
344
|
const names = missing.map((c) => c.id).join(", ");
|
|
345
345
|
console.log(
|
|
346
|
-
|
|
346
|
+
a.cyan(` \u2728 ${isZh ? "\u65B0\u63A8\u8350\u670D\u52A1\u672A\u5B89\u88C5" : "New recommended services available"}: ${a.bold(names)} ${a.dim(isZh ? "(\u9009\u9879 4 \u5B89\u88C5)" : "(install via option 4)")}`)
|
|
347
347
|
);
|
|
348
348
|
}
|
|
349
349
|
} catch {
|
|
@@ -353,32 +353,32 @@ async function showSimplifiedMenu() {
|
|
|
353
353
|
const lang = i18n.language;
|
|
354
354
|
const isZh = lang === "zh-CN";
|
|
355
355
|
console.log("");
|
|
356
|
-
console.log(
|
|
356
|
+
console.log(a.bold.yellow(isZh ? "\u8BF7\u9009\u62E9\u529F\u80FD" : "Select Feature"));
|
|
357
357
|
checkNewMcpServicesHint(isZh);
|
|
358
|
-
console.log(
|
|
359
|
-
console.log(` ${
|
|
360
|
-
console.log(` ${
|
|
361
|
-
console.log(` ${
|
|
362
|
-
console.log(` ${
|
|
363
|
-
console.log(` ${
|
|
364
|
-
console.log(` ${
|
|
365
|
-
console.log(` ${
|
|
358
|
+
console.log(a.dim(` -------- Claude Code --------`));
|
|
359
|
+
console.log(` ${a.green("1.")} ${isZh ? "\u5B8C\u6574\u521D\u59CB\u5316" : "Full Init"} ${a.dim(isZh ? "- \u5B89\u88C5 Claude Code + \u5BFC\u5165\u5DE5\u4F5C\u6D41 + \u914D\u7F6E API \u6216 CCR \u4EE3\u7406 + \u914D\u7F6E MCP \u670D\u52A1" : "- Install Claude Code + Import workflows + Configure API or CCR proxy + Configure MCP")}`);
|
|
360
|
+
console.log(` ${a.green("2.")} ${isZh ? "\u5BFC\u5165\u5DE5\u4F5C\u6D41" : "Import Workflows"} ${a.dim(isZh ? "- \u4EC5\u5BFC\u5165/\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173\u6587\u4EF6" : "- Import/update workflow files only")}`);
|
|
361
|
+
console.log(` ${a.green("3.")} ${isZh ? "\u914D\u7F6E API \u6216 CCR \u4EE3\u7406" : "Configure API or CCR Proxy"} ${a.dim(isZh ? "- \u914D\u7F6E API URL\u3001\u8BA4\u8BC1\u4FE1\u606F\u6216 CCR \u4EE3\u7406" : "- Configure API URL, auth info or CCR proxy")}`);
|
|
362
|
+
console.log(` ${a.green("4.")} ${isZh ? "\u5B89\u88C5/\u66F4\u65B0 MCP \u670D\u52A1" : "Install / Update MCP Services"} ${a.dim(isZh ? "- \u591A\u9009\u5B89\u88C5\u63A8\u8350\u670D\u52A1\uFF0C\u81EA\u52A8\u5408\u5E76/\u4FEE\u590D Windows \u914D\u7F6E" : "- Multi-select & install recommended services, auto-fix Windows config")}`);
|
|
363
|
+
console.log(` ${a.green("5.")} ${isZh ? "\u914D\u7F6E\u9ED8\u8BA4\u6A21\u578B" : "Configure Default Model"} ${a.dim(isZh ? "- \u8BBE\u7F6E\u9ED8\u8BA4\u6A21\u578B\uFF08opus/sonnet/sonnet 1m/\u81EA\u5B9A\u4E49\uFF09" : "- Set default model (opus/sonnet/sonnet 1m/custom)")}`);
|
|
364
|
+
console.log(` ${a.green("6.")} ${isZh ? "\u914D\u7F6E Claude \u5168\u5C40\u8BB0\u5FC6" : "Configure Claude Memory"} ${a.dim(isZh ? "- \u914D\u7F6E AI \u8F93\u51FA\u8BED\u8A00\u548C\u8F93\u51FA\u98CE\u683C" : "- Configure AI output language and style")}`);
|
|
365
|
+
console.log(` ${a.green("7.")} ${isZh ? "\u6743\u9650 & \u73AF\u5883\u914D\u7F6E" : "Permissions & Env Setup"} ${a.dim(isZh ? "- \u5BFC\u5165\u73AF\u5883\u53D8\u91CF / \u5BFC\u5165\u63A8\u8350\u6743\u9650 / \u4E00\u952E\u6743\u9650\u9884\u8BBE\uFF08\u6700\u5927/\u5F00\u53D1\u8005/\u5B89\u5168\uFF09" : "- Import env vars / import permissions / one-click presets (max/dev/safe)")}`);
|
|
366
366
|
console.log("");
|
|
367
|
-
console.log(
|
|
368
|
-
console.log(` ${
|
|
369
|
-
console.log(` ${
|
|
370
|
-
console.log(` ${
|
|
371
|
-
console.log(` ${
|
|
372
|
-
console.log(` ${
|
|
367
|
+
console.log(a.dim(` --------- ${isZh ? "\u5176\u4ED6\u5DE5\u5177" : "Other Tools"} ----------`));
|
|
368
|
+
console.log(` ${a.green("K.")} ${isZh ? "Skills \u7BA1\u7406" : "Skills Manager"} ${a.dim(isZh ? "- \u5B89\u88C5/\u66F4\u65B0/\u5220\u9664\u5DE5\u4F5C\u6D41\u6280\u80FD" : "- Install/update/remove workflow skills")}`);
|
|
369
|
+
console.log(` ${a.green("M.")} ${isZh ? "MCP \u7BA1\u7406" : "MCP Manager"} ${a.dim(isZh ? "- \u72B6\u6001/\u8BCA\u65AD/\u5DF2\u88C5\u5217\u8868/\u5207\u6362\u9884\u8BBE/\u91CA\u653E\u95F2\u7F6E\u670D\u52A1" : "- Status / doctor / list / switch profile / release idle services")}`);
|
|
370
|
+
console.log(` ${a.green("A.")} ${isZh ? "Agents \u7BA1\u7406" : "Agents Manager"} ${a.dim(isZh ? "- \u521B\u5EFA/\u7BA1\u7406 AI \u667A\u80FD\u4F53" : "- Create/manage AI agents")}`);
|
|
371
|
+
console.log(` ${a.green("P.")} ${isZh ? "\u6301\u4E45\u5316\u7BA1\u7406" : "Persistence Manager"} ${a.dim(isZh ? "- \u7BA1\u7406\u4E0A\u4E0B\u6587\u5B58\u50A8\u548C\u5C42\u7EA7" : "- Manage context storage and tiers")}`);
|
|
372
|
+
console.log(` ${a.green("R.")} ${isZh ? "CCR" : "CCR"} ${a.dim(isZh ? "- \u914D\u7F6E Claude Code Router \u4EE5\u4F7F\u7528\u591A\u4E2A AI \u6A21\u578B" : "- Configure Claude Code Router for multiple AI models")}`);
|
|
373
373
|
console.log("");
|
|
374
|
-
console.log(
|
|
375
|
-
console.log(` ${
|
|
376
|
-
console.log(` ${
|
|
377
|
-
console.log(` ${
|
|
378
|
-
console.log(` ${
|
|
379
|
-
console.log(` ${
|
|
380
|
-
console.log(` ${
|
|
381
|
-
console.log(` ${
|
|
374
|
+
console.log(a.dim(` ------------ CCJK ------------`));
|
|
375
|
+
console.log(` ${a.green("0.")} ${isZh ? "\u66F4\u6539\u663E\u793A\u8BED\u8A00 / Select display language" : "Select display language"} ${a.dim(isZh ? "- \u66F4\u6539 CCJK \u754C\u9762\u8BED\u8A00" : "- Change CCJK interface language")}`);
|
|
376
|
+
console.log(` ${a.green("S.")} ${isZh ? "\u5207\u6362\u4EE3\u7801\u5DE5\u5177" : "Switch Code Tool"} ${a.dim(isZh ? "- \u5728\u652F\u6301\u7684\u4EE3\u7801\u5DE5\u5177\u4E4B\u95F4\u5207\u6362 (Claude Code, Codex)" : "- Switch between supported code tools (Claude Code, Codex)")}`);
|
|
377
|
+
console.log(` ${a.green("-.")} ${isZh ? "\u5378\u8F7D\u548C\u5220\u9664\u914D\u7F6E" : "Uninstall & Remove Config"} ${a.dim(isZh ? "- \u4ECE\u7CFB\u7EDF\u4E2D\u5220\u9664 Claude Code \u914D\u7F6E\u548C\u5DE5\u5177" : "- Remove Claude Code config and tools from system")}`);
|
|
378
|
+
console.log(` ${a.green("+.")} ${isZh ? "\u68C0\u67E5\u66F4\u65B0" : "Check Updates"} ${a.dim(isZh ? "- \u68C0\u67E5\u5E76\u66F4\u65B0 Claude Code\u3001CCR \u7684\u7248\u672C" : "- Check and update Claude Code, CCR versions")}`);
|
|
379
|
+
console.log(` ${a.green("D.")} ${isZh ? "\u{1F9E0} \u4F53\u68C0 & \u5065\u5EB7\u770B\u677F" : "\u{1F9E0} Health Check & Dashboard"} ${a.dim(isZh ? "- \u5065\u5EB7\u5206\u6570 + \u4F18\u5316\u5EFA\u8BAE + \u81EA\u52A8\u4FEE\u590D" : "- Health score + recommendations + auto-fix")}`);
|
|
380
|
+
console.log(` ${a.green("H.")} ${isZh ? "\u5E2E\u52A9\u6587\u6863" : "Help"} ${a.dim(isZh ? "- \u67E5\u770B\u4F7F\u7528\u6307\u5357" : "- View user guide")}`);
|
|
381
|
+
console.log(` ${a.green("Q.")} ${isZh ? "\u9000\u51FA" : "Exit"}`);
|
|
382
382
|
console.log("");
|
|
383
383
|
const { choice } = await inquirer.prompt({
|
|
384
384
|
type: "input",
|
|
@@ -391,7 +391,7 @@ async function showSimplifiedMenu() {
|
|
|
391
391
|
}
|
|
392
392
|
});
|
|
393
393
|
if (!choice) {
|
|
394
|
-
console.log(
|
|
394
|
+
console.log(a.green(i18n.t("common:cancelled")));
|
|
395
395
|
return "exit";
|
|
396
396
|
}
|
|
397
397
|
const normalized = normalizeMenuInput(choice);
|
|
@@ -496,7 +496,7 @@ async function showSimplifiedMenu() {
|
|
|
496
496
|
return void 0;
|
|
497
497
|
}
|
|
498
498
|
case "q": {
|
|
499
|
-
console.log(
|
|
499
|
+
console.log(a.cyan(i18n.t("common:goodbye")));
|
|
500
500
|
return "exit";
|
|
501
501
|
}
|
|
502
502
|
default:
|
|
@@ -508,7 +508,7 @@ async function showSimplifiedMenu() {
|
|
|
508
508
|
defaultValue: true
|
|
509
509
|
});
|
|
510
510
|
if (!shouldContinue) {
|
|
511
|
-
console.log(
|
|
511
|
+
console.log(a.green(isZh ? "\u{1F44B} \u518D\u89C1\uFF01" : "\u{1F44B} Goodbye!"));
|
|
512
512
|
return "exit";
|
|
513
513
|
}
|
|
514
514
|
return void 0;
|
|
@@ -526,9 +526,9 @@ async function isFirstTimeUser() {
|
|
|
526
526
|
function showNewUserWelcome() {
|
|
527
527
|
const isZh = i18n.language === "zh-CN";
|
|
528
528
|
console.log("");
|
|
529
|
-
console.log(
|
|
530
|
-
console.log(
|
|
531
|
-
console.log(
|
|
529
|
+
console.log(a.bold.yellow(isZh ? "\u{1F389} \u6B22\u8FCE\u9996\u6B21\u4F7F\u7528 CCJK!" : "\u{1F389} Welcome to CCJK!"));
|
|
530
|
+
console.log(a.dim(isZh ? " CCJK \u662F Claude Code \u7684\u667A\u80FD\u914D\u7F6E\u5DE5\u5177\uFF0C\u8BA9\u4F60\u7684 AI \u7F16\u7A0B\u4F53\u9A8C\u66F4\u52A0\u7B80\u5355\u9AD8\u6548" : " CCJK is the smart configuration tool for Claude Code"));
|
|
531
|
+
console.log(a.dim(isZh ? ' \u5EFA\u8BAE\u9996\u6B21\u4F7F\u7528\u9009\u62E9 "1. \u5B8C\u6574\u521D\u59CB\u5316" \u8FDB\u884C\u4E00\u952E\u914D\u7F6E' : ' Recommended: Select "1. Full Init" for first-time setup'));
|
|
532
532
|
console.log("");
|
|
533
533
|
}
|
|
534
534
|
async function showMainMenu(options = {}) {
|
|
@@ -544,11 +544,11 @@ async function showMainMenu(options = {}) {
|
|
|
544
544
|
if (resolvedType !== currentType) {
|
|
545
545
|
updateZcfConfig({ codeToolType: resolvedType });
|
|
546
546
|
const isZh = i18n.language === "zh-CN";
|
|
547
|
-
console.log(
|
|
547
|
+
console.log(a.green(`\u2714 ${isZh ? "\u5DF2\u5207\u6362\u5230" : "Switched to"} ${getCodeToolLabel(resolvedType)}`));
|
|
548
548
|
}
|
|
549
549
|
} catch (err) {
|
|
550
550
|
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
551
|
-
console.error(
|
|
551
|
+
console.error(a.red(errorMessage));
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
let exitMenu = false;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
2
3
|
|
|
3
4
|
function formatTokenCount(tokens) {
|
|
4
5
|
if (tokens >= 1e6) {
|
|
@@ -32,54 +33,54 @@ function displayCompressionResult(originalTokens, compressedTokens, compressionR
|
|
|
32
33
|
const originalFormatted = formatTokenCount(originalTokens);
|
|
33
34
|
const compressedFormatted = formatTokenCount(compressedTokens);
|
|
34
35
|
console.log(
|
|
35
|
-
|
|
36
|
+
a.green("\u2705") + " Compressed " + a.cyan(originalFormatted) + " tokens \u2192 " + a.cyan(compressedFormatted) + " " + a.yellow(`(${reductionPercent}% reduction)`) + " " + a.gray(`[${formatTime(timeTakenMs)}]`)
|
|
36
37
|
);
|
|
37
38
|
}
|
|
38
39
|
function displayCompressionStats(stats) {
|
|
39
40
|
console.log();
|
|
40
|
-
console.log(
|
|
41
|
-
console.log(
|
|
41
|
+
console.log(a.cyan.bold("\u{1F4CA} Compression Statistics"));
|
|
42
|
+
console.log(a.gray("\u2500".repeat(60)));
|
|
42
43
|
console.log();
|
|
43
|
-
console.log(
|
|
44
|
-
console.log(` ${
|
|
45
|
-
console.log(` ${
|
|
46
|
-
console.log(` ${
|
|
47
|
-
console.log(` ${
|
|
48
|
-
console.log(` ${
|
|
44
|
+
console.log(a.white.bold("Overall:"));
|
|
45
|
+
console.log(` ${a.gray("Total Compressions:")} ${a.white(stats.totalCompressions.toLocaleString())}`);
|
|
46
|
+
console.log(` ${a.gray("Tokens Saved:")} ${a.green(formatTokenCount(stats.totalTokensSaved))}`);
|
|
47
|
+
console.log(` ${a.gray("Avg Compression:")} ${a.yellow(formatRatio(stats.averageCompressionRatio))}`);
|
|
48
|
+
console.log(` ${a.gray("Avg Time:")} ${a.cyan(formatTime(stats.averageTimeTakenMs))}`);
|
|
49
|
+
console.log(` ${a.gray("Cost Savings:")} ${a.green.bold(formatCost(stats.estimatedCostSavings))}`);
|
|
49
50
|
if (stats.sessionStats && stats.sessionStats.compressions > 0) {
|
|
50
51
|
console.log();
|
|
51
|
-
console.log(
|
|
52
|
-
console.log(` ${
|
|
53
|
-
console.log(` ${
|
|
54
|
-
console.log(` ${
|
|
52
|
+
console.log(a.white.bold("Session (24h):"));
|
|
53
|
+
console.log(` ${a.gray("Compressions:")} ${a.white(stats.sessionStats.compressions.toLocaleString())}`);
|
|
54
|
+
console.log(` ${a.gray("Tokens Saved:")} ${a.green(formatTokenCount(stats.sessionStats.tokensSaved))}`);
|
|
55
|
+
console.log(` ${a.gray("Cost Savings:")} ${a.green(formatCost(stats.sessionStats.costSavings))}`);
|
|
55
56
|
}
|
|
56
57
|
if (stats.weeklyStats && stats.weeklyStats.compressions > 0) {
|
|
57
58
|
console.log();
|
|
58
|
-
console.log(
|
|
59
|
-
console.log(` ${
|
|
60
|
-
console.log(` ${
|
|
61
|
-
console.log(` ${
|
|
59
|
+
console.log(a.white.bold("Weekly (7d):"));
|
|
60
|
+
console.log(` ${a.gray("Compressions:")} ${a.white(stats.weeklyStats.compressions.toLocaleString())}`);
|
|
61
|
+
console.log(` ${a.gray("Tokens Saved:")} ${a.green(formatTokenCount(stats.weeklyStats.tokensSaved))}`);
|
|
62
|
+
console.log(` ${a.gray("Cost Savings:")} ${a.green(formatCost(stats.weeklyStats.costSavings))}`);
|
|
62
63
|
}
|
|
63
64
|
if (stats.monthlyStats && stats.monthlyStats.compressions > 0) {
|
|
64
65
|
console.log();
|
|
65
|
-
console.log(
|
|
66
|
-
console.log(` ${
|
|
67
|
-
console.log(` ${
|
|
68
|
-
console.log(` ${
|
|
66
|
+
console.log(a.white.bold("Monthly (30d):"));
|
|
67
|
+
console.log(` ${a.gray("Compressions:")} ${a.white(stats.monthlyStats.compressions.toLocaleString())}`);
|
|
68
|
+
console.log(` ${a.gray("Tokens Saved:")} ${a.green(formatTokenCount(stats.monthlyStats.tokensSaved))}`);
|
|
69
|
+
console.log(` ${a.gray("Cost Savings:")} ${a.green(formatCost(stats.monthlyStats.costSavings))}`);
|
|
69
70
|
}
|
|
70
71
|
console.log();
|
|
71
|
-
console.log(
|
|
72
|
-
console.log(
|
|
72
|
+
console.log(a.gray("\u2500".repeat(60)));
|
|
73
|
+
console.log(a.gray("\u{1F4A1} Cost based on $0.015 per 1K tokens (Claude Opus pricing)"));
|
|
73
74
|
console.log();
|
|
74
75
|
}
|
|
75
76
|
function displayCompactCompressionStats(stats) {
|
|
76
77
|
const lines = [];
|
|
77
|
-
lines.push(
|
|
78
|
-
lines.push(` ${
|
|
79
|
-
lines.push(` ${
|
|
80
|
-
lines.push(` ${
|
|
78
|
+
lines.push(a.cyan.bold("Compression Metrics"));
|
|
79
|
+
lines.push(` ${a.gray("Total Saved:")} ${a.green(formatTokenCount(stats.totalTokensSaved))} tokens`);
|
|
80
|
+
lines.push(` ${a.gray("Avg Reduction:")} ${a.yellow(formatRatio(stats.averageCompressionRatio))}`);
|
|
81
|
+
lines.push(` ${a.gray("Cost Savings:")} ${a.green.bold(formatCost(stats.estimatedCostSavings))}`);
|
|
81
82
|
if (stats.sessionStats && stats.sessionStats.compressions > 0) {
|
|
82
|
-
lines.push(` ${
|
|
83
|
+
lines.push(` ${a.gray("Session (24h):")} ${a.white(stats.sessionStats.compressions)} compressions, ${a.green(formatCost(stats.sessionStats.costSavings))} saved`);
|
|
83
84
|
}
|
|
84
85
|
return lines;
|
|
85
86
|
}
|
|
@@ -88,27 +89,27 @@ function createCompressionBar(ratio, width = 20) {
|
|
|
88
89
|
const empty = width - filled;
|
|
89
90
|
let bar = "";
|
|
90
91
|
if (ratio >= 0.7) {
|
|
91
|
-
bar =
|
|
92
|
+
bar = a.green("\u2588".repeat(filled));
|
|
92
93
|
} else if (ratio >= 0.4) {
|
|
93
|
-
bar =
|
|
94
|
+
bar = a.yellow("\u2588".repeat(filled));
|
|
94
95
|
} else {
|
|
95
|
-
bar =
|
|
96
|
+
bar = a.red("\u2588".repeat(filled));
|
|
96
97
|
}
|
|
97
|
-
bar +=
|
|
98
|
+
bar += a.gray("\u2591".repeat(empty));
|
|
98
99
|
return bar;
|
|
99
100
|
}
|
|
100
101
|
function displayCompressionTable(metrics, limit = 10) {
|
|
101
102
|
if (metrics.length === 0) {
|
|
102
|
-
console.log(
|
|
103
|
+
console.log(a.gray("No compression metrics available"));
|
|
103
104
|
return;
|
|
104
105
|
}
|
|
105
106
|
console.log();
|
|
106
|
-
console.log(
|
|
107
|
-
console.log(
|
|
107
|
+
console.log(a.cyan.bold("Recent Compressions"));
|
|
108
|
+
console.log(a.gray("\u2500".repeat(80)));
|
|
108
109
|
console.log(
|
|
109
|
-
|
|
110
|
+
a.white.bold("Original".padEnd(12)) + a.white.bold("Compressed".padEnd(12)) + a.white.bold("Ratio".padEnd(10)) + a.white.bold("Time".padEnd(10)) + a.white.bold("Strategy".padEnd(15)) + a.white.bold("Algorithm")
|
|
110
111
|
);
|
|
111
|
-
console.log(
|
|
112
|
+
console.log(a.gray("\u2500".repeat(80)));
|
|
112
113
|
const displayMetrics = metrics.slice(0, limit);
|
|
113
114
|
for (const metric of displayMetrics) {
|
|
114
115
|
const original = formatTokenCount(metric.originalTokens).padEnd(12);
|
|
@@ -118,10 +119,10 @@ function displayCompressionTable(metrics, limit = 10) {
|
|
|
118
119
|
const strategy = metric.strategy.padEnd(15);
|
|
119
120
|
const algorithm = metric.algorithm;
|
|
120
121
|
console.log(
|
|
121
|
-
|
|
122
|
+
a.cyan(original) + a.green(compressed) + a.yellow(ratio) + a.gray(time) + a.white(strategy) + a.gray(algorithm)
|
|
122
123
|
);
|
|
123
124
|
}
|
|
124
|
-
console.log(
|
|
125
|
+
console.log(a.gray("\u2500".repeat(80)));
|
|
125
126
|
console.log();
|
|
126
127
|
}
|
|
127
128
|
function formatBytes(bytes) {
|
package/dist/chunks/migrator.mjs
CHANGED
|
@@ -2,16 +2,15 @@ import { SETTINGS_FILE } from './constants.mjs';
|
|
|
2
2
|
import { exists } from './fs-operations.mjs';
|
|
3
3
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
4
4
|
import 'node:os';
|
|
5
|
-
import '
|
|
6
|
-
import './index3.mjs';
|
|
5
|
+
import './index5.mjs';
|
|
7
6
|
import 'node:fs';
|
|
8
7
|
import 'node:process';
|
|
9
8
|
import 'node:url';
|
|
10
|
-
import '
|
|
11
|
-
import 'i18next-fs-backend';
|
|
9
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
12
10
|
import 'node:crypto';
|
|
13
11
|
import 'node:fs/promises';
|
|
14
|
-
import '
|
|
12
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
13
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
15
14
|
|
|
16
15
|
const DEFAULT_SETTINGS_V2 = {
|
|
17
16
|
// Response language - empty means use system default
|