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/mcp.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ansis__default from 'ansis';
|
|
2
2
|
import { i18n } from './index2.mjs';
|
|
3
3
|
import 'node:child_process';
|
|
4
4
|
import 'node:process';
|
|
5
5
|
import { M as MCP_SERVICE_TIERS, i as isCoreService, g as getServicesByTier, c as checkMcpPerformance, f as formatPerformanceWarning, a as calculateResourceUsage, b as getOptimizationSuggestions, d as getMcpTierConfig } from './mcp-performance.mjs';
|
|
6
6
|
import { r as readMcpConfig, d as backupMcpConfig, w as writeMcpConfig } from './config.mjs';
|
|
7
|
-
export { m as mcpInstall, a as mcpList, b as mcpSearch, c as mcpUninstall } from '../shared/ccjk.
|
|
7
|
+
export { m as mcpInstall, a as mcpList, b as mcpSearch, c as mcpUninstall } from '../shared/ccjk.C_3BYaWc.mjs';
|
|
8
8
|
import { M as MCP_SERVICE_CONFIGS } from './codex.mjs';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'node:url';
|
|
@@ -93,13 +93,13 @@ async function mcpRelease(options = {}) {
|
|
|
93
93
|
const lang = options.lang || i18n.language || "en";
|
|
94
94
|
const isZh = lang === "zh-CN";
|
|
95
95
|
console.log("");
|
|
96
|
-
console.log(
|
|
97
|
-
console.log(
|
|
96
|
+
console.log(ansis__default.bold.cyan(isZh ? "\u{1F9F9} MCP \u670D\u52A1\u91CA\u653E" : "\u{1F9F9} MCP Service Release"));
|
|
97
|
+
console.log(ansis__default.dim("\u2500".repeat(50)));
|
|
98
98
|
console.log("");
|
|
99
99
|
const config = readMcpConfig();
|
|
100
100
|
const configuredServices = config?.mcpServers ? Object.keys(config.mcpServers) : [];
|
|
101
101
|
if (configuredServices.length === 0) {
|
|
102
|
-
console.log(
|
|
102
|
+
console.log(ansis__default.yellow(isZh ? "\u6CA1\u6709\u914D\u7F6E\u4EFB\u4F55 MCP \u670D\u52A1" : "No MCP services configured"));
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
let servicesToRelease;
|
|
@@ -111,37 +111,37 @@ async function mcpRelease(options = {}) {
|
|
|
111
111
|
servicesToRelease = getReleasableServices(configuredServices, "all");
|
|
112
112
|
}
|
|
113
113
|
if (servicesToRelease.length === 0) {
|
|
114
|
-
console.log(
|
|
114
|
+
console.log(ansis__default.green(isZh ? "\u2714 \u6CA1\u6709\u53EF\u91CA\u653E\u7684\u670D\u52A1" : "\u2714 No services to release"));
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
console.log(isZh ? "\u5C06\u91CA\u653E\u4EE5\u4E0B\u670D\u52A1:" : "Services to release:");
|
|
118
118
|
for (const serviceId of servicesToRelease) {
|
|
119
119
|
const tier = MCP_SERVICE_TIERS[serviceId] || "ondemand";
|
|
120
|
-
console.log(` ${
|
|
120
|
+
console.log(` ${ansis__default.yellow("\u2022")} ${serviceId} ${ansis__default.dim(`[${tier}]`)}`);
|
|
121
121
|
}
|
|
122
122
|
console.log("");
|
|
123
123
|
if (options.dryRun) {
|
|
124
|
-
console.log(
|
|
124
|
+
console.log(ansis__default.green(isZh ? "(\u6A21\u62DF\u8FD0\u884C - \u4E0D\u4F1A\u5B9E\u9645\u4FEE\u6539\u914D\u7F6E)" : "(Dry run - no changes will be made)"));
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
127
|
const result = await releaseServices(servicesToRelease, options);
|
|
128
128
|
if (result.success) {
|
|
129
|
-
console.log(
|
|
129
|
+
console.log(ansis__default.green(`\u2714 ${isZh ? "\u5DF2\u91CA\u653E" : "Released"} ${result.releasedServices.length} ${isZh ? "\u4E2A\u670D\u52A1" : "services"}`));
|
|
130
130
|
if (result.skippedServices.length > 0) {
|
|
131
|
-
console.log(
|
|
131
|
+
console.log(ansis__default.yellow(`${isZh ? "\u8DF3\u8FC7" : "Skipped"}: ${result.skippedServices.join(", ")}`));
|
|
132
132
|
}
|
|
133
133
|
const remaining = configuredServices.filter((s) => !result.releasedServices.includes(s));
|
|
134
134
|
console.log("");
|
|
135
|
-
console.log(
|
|
135
|
+
console.log(ansis__default.dim(`${isZh ? "\u5269\u4F59\u670D\u52A1" : "Remaining services"}: ${remaining.length}`));
|
|
136
136
|
if (remaining.length > 0) {
|
|
137
|
-
console.log(
|
|
137
|
+
console.log(ansis__default.dim(` ${remaining.join(", ")}`));
|
|
138
138
|
}
|
|
139
139
|
console.log("");
|
|
140
|
-
console.log(
|
|
140
|
+
console.log(ansis__default.yellow(isZh ? "\u26A0\uFE0F \u8BF7\u91CD\u542F Claude Code \u4EE5\u4F7F\u66F4\u6539\u751F\u6548" : "\u26A0\uFE0F Please restart Claude Code for changes to take effect"));
|
|
141
141
|
} else {
|
|
142
|
-
console.log(
|
|
142
|
+
console.log(ansis__default.red(`\u2716 ${isZh ? "\u91CA\u653E\u5931\u8D25" : "Release failed"}`));
|
|
143
143
|
for (const error of result.errors) {
|
|
144
|
-
console.log(
|
|
144
|
+
console.log(ansis__default.red(` ${error}`));
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -184,39 +184,39 @@ async function mcpDoctor(options = {}) {
|
|
|
184
184
|
const lang = options.lang || i18n.language || "en";
|
|
185
185
|
const isZh = lang === "zh-CN";
|
|
186
186
|
console.log("");
|
|
187
|
-
console.log(
|
|
188
|
-
console.log(
|
|
187
|
+
console.log(ansis__default.bold.cyan(isZh ? "\u{1F50D} MCP \u5065\u5EB7\u68C0\u67E5" : "\u{1F50D} MCP Health Check"));
|
|
188
|
+
console.log(ansis__default.dim("\u2550".repeat(60)));
|
|
189
189
|
console.log("");
|
|
190
190
|
const config = readMcpConfig();
|
|
191
191
|
const configuredServices = config?.mcpServers ? Object.keys(config.mcpServers) : [];
|
|
192
|
-
console.log(
|
|
193
|
-
console.log(
|
|
192
|
+
console.log(ansis__default.bold(isZh ? "\u{1F4CA} \u670D\u52A1\u7EDF\u8BA1" : "\u{1F4CA} Service Statistics"));
|
|
193
|
+
console.log(ansis__default.dim("\u2500".repeat(40)));
|
|
194
194
|
const coreServices = getServicesByTier("core");
|
|
195
195
|
const ondemandServices = getServicesByTier("ondemand");
|
|
196
196
|
const scenarioServices = getServicesByTier("scenario");
|
|
197
197
|
const configuredCore = configuredServices.filter((s) => coreServices.includes(s));
|
|
198
198
|
const configuredOndemand = configuredServices.filter((s) => ondemandServices.includes(s));
|
|
199
199
|
const configuredScenario = configuredServices.filter((s) => scenarioServices.includes(s));
|
|
200
|
-
console.log(` ${isZh ? "\u603B\u8BA1" : "Total"}: ${
|
|
201
|
-
console.log(` ${
|
|
202
|
-
console.log(` ${
|
|
203
|
-
console.log(` ${
|
|
200
|
+
console.log(` ${isZh ? "\u603B\u8BA1" : "Total"}: ${ansis__default.bold(configuredServices.length.toString())} ${isZh ? "\u4E2A\u670D\u52A1" : "services"}`);
|
|
201
|
+
console.log(` ${ansis__default.green("Core")}: ${configuredCore.length}/${coreServices.length}`);
|
|
202
|
+
console.log(` ${ansis__default.yellow("OnDemand")}: ${configuredOndemand.length}/${ondemandServices.length}`);
|
|
203
|
+
console.log(` ${ansis__default.green("Scenario")}: ${configuredScenario.length}/${scenarioServices.length}`);
|
|
204
204
|
console.log("");
|
|
205
205
|
const perfWarning = checkMcpPerformance(configuredServices.length);
|
|
206
206
|
if (perfWarning) {
|
|
207
|
-
console.log(
|
|
208
|
-
console.log(
|
|
207
|
+
console.log(ansis__default.bold(isZh ? "\u26A0\uFE0F \u6027\u80FD\u8B66\u544A" : "\u26A0\uFE0F Performance Warning"));
|
|
208
|
+
console.log(ansis__default.dim("\u2500".repeat(40)));
|
|
209
209
|
console.log(formatPerformanceWarning(perfWarning, lang));
|
|
210
210
|
console.log("");
|
|
211
211
|
}
|
|
212
212
|
const resourceUsage = calculateResourceUsage(configuredServices.length);
|
|
213
|
-
console.log(
|
|
214
|
-
console.log(
|
|
213
|
+
console.log(ansis__default.bold(isZh ? "\u{1F4BB} \u8D44\u6E90\u4F7F\u7528\u4F30\u7B97" : "\u{1F4BB} Resource Usage Estimate"));
|
|
214
|
+
console.log(ansis__default.dim("\u2500".repeat(40)));
|
|
215
215
|
const ratingColors = {
|
|
216
|
-
low:
|
|
217
|
-
medium:
|
|
218
|
-
high:
|
|
219
|
-
critical:
|
|
216
|
+
low: ansis__default.green,
|
|
217
|
+
medium: ansis__default.yellow,
|
|
218
|
+
high: ansis__default.red,
|
|
219
|
+
critical: ansis__default.bgRed.white
|
|
220
220
|
};
|
|
221
221
|
const ratingLabels = {
|
|
222
222
|
low: isZh ? "\u4F4E" : "Low",
|
|
@@ -229,35 +229,35 @@ async function mcpDoctor(options = {}) {
|
|
|
229
229
|
console.log(` ${isZh ? "\u8BC4\u7EA7" : "Rating"}: ${ratingColors[resourceUsage.rating](ratingLabels[resourceUsage.rating])}`);
|
|
230
230
|
console.log("");
|
|
231
231
|
if (options.verbose || options.service) {
|
|
232
|
-
console.log(
|
|
233
|
-
console.log(
|
|
232
|
+
console.log(ansis__default.bold(isZh ? "\u{1F527} \u670D\u52A1\u8BE6\u60C5" : "\u{1F527} Service Details"));
|
|
233
|
+
console.log(ansis__default.dim("\u2500".repeat(40)));
|
|
234
234
|
const servicesToCheck = options.service ? [options.service] : configuredServices;
|
|
235
235
|
for (const serviceId of servicesToCheck) {
|
|
236
236
|
const health = checkServiceHealth(serviceId, configuredServices);
|
|
237
237
|
const statusIcon = {
|
|
238
|
-
healthy:
|
|
239
|
-
warning:
|
|
240
|
-
error:
|
|
241
|
-
unknown:
|
|
238
|
+
healthy: ansis__default.green("\u2714"),
|
|
239
|
+
warning: ansis__default.yellow("\u26A0"),
|
|
240
|
+
error: ansis__default.red("\u2716"),
|
|
241
|
+
unknown: ansis__default.gray("?")
|
|
242
242
|
};
|
|
243
243
|
const tierColor = {
|
|
244
|
-
core:
|
|
245
|
-
ondemand:
|
|
246
|
-
scenario:
|
|
244
|
+
core: ansis__default.green,
|
|
245
|
+
ondemand: ansis__default.yellow,
|
|
246
|
+
scenario: ansis__default.green
|
|
247
247
|
};
|
|
248
|
-
console.log(` ${statusIcon[health.status]} ${
|
|
249
|
-
console.log(` ${isZh ? "\u5C42\u7EA7" : "Tier"}: ${(tierColor[health.tier] ||
|
|
248
|
+
console.log(` ${statusIcon[health.status]} ${ansis__default.bold(serviceId)}`);
|
|
249
|
+
console.log(` ${isZh ? "\u5C42\u7EA7" : "Tier"}: ${(tierColor[health.tier] || ansis__default.gray)(health.tier)}`);
|
|
250
250
|
if (health.idleTimeout) {
|
|
251
251
|
console.log(` ${isZh ? "\u7A7A\u95F2\u8D85\u65F6" : "Idle Timeout"}: ${health.idleTimeout}s`);
|
|
252
252
|
}
|
|
253
253
|
if (health.issues.length > 0) {
|
|
254
254
|
for (const issue of health.issues) {
|
|
255
|
-
console.log(` ${
|
|
255
|
+
console.log(` ${ansis__default.yellow("!")} ${issue}`);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
if (health.suggestions.length > 0) {
|
|
259
259
|
for (const suggestion of health.suggestions) {
|
|
260
|
-
console.log(` ${
|
|
260
|
+
console.log(` ${ansis__default.dim("\u2192")} ${suggestion}`);
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
console.log("");
|
|
@@ -265,21 +265,21 @@ async function mcpDoctor(options = {}) {
|
|
|
265
265
|
}
|
|
266
266
|
const suggestions = getOptimizationSuggestions(configuredServices);
|
|
267
267
|
if (suggestions.length > 0) {
|
|
268
|
-
console.log(
|
|
269
|
-
console.log(
|
|
268
|
+
console.log(ansis__default.bold(isZh ? "\u{1F4A1} \u4F18\u5316\u5EFA\u8BAE" : "\u{1F4A1} Optimization Suggestions"));
|
|
269
|
+
console.log(ansis__default.dim("\u2500".repeat(40)));
|
|
270
270
|
for (const suggestion of suggestions) {
|
|
271
271
|
console.log(` \u2022 ${suggestion}`);
|
|
272
272
|
}
|
|
273
273
|
console.log("");
|
|
274
274
|
}
|
|
275
|
-
console.log(
|
|
276
|
-
console.log(
|
|
277
|
-
console.log(` ${
|
|
278
|
-
console.log(` ${
|
|
279
|
-
console.log(` ${
|
|
275
|
+
console.log(ansis__default.bold(isZh ? "\u{1F680} \u5FEB\u901F\u64CD\u4F5C" : "\u{1F680} Quick Actions"));
|
|
276
|
+
console.log(ansis__default.dim("\u2500".repeat(40)));
|
|
277
|
+
console.log(` ${ansis__default.green("ccjk mcp profile use minimal")} - ${isZh ? "\u5207\u6362\u5230\u6781\u7B80\u6A21\u5F0F" : "Switch to minimal mode"}`);
|
|
278
|
+
console.log(` ${ansis__default.green("ccjk mcp profile list")} - ${isZh ? "\u67E5\u770B\u6240\u6709\u9884\u8BBE" : "View all profiles"}`);
|
|
279
|
+
console.log(` ${ansis__default.green("ccjk mcp release")} - ${isZh ? "\u91CA\u653E\u7A7A\u95F2\u670D\u52A1" : "Release idle services"}`);
|
|
280
280
|
console.log("");
|
|
281
|
-
console.log(
|
|
282
|
-
const summaryStatus = perfWarning?.level === "critical" ?
|
|
281
|
+
console.log(ansis__default.dim("\u2550".repeat(60)));
|
|
282
|
+
const summaryStatus = perfWarning?.level === "critical" ? ansis__default.red(isZh ? "\u9700\u8981\u4F18\u5316" : "Needs Optimization") : perfWarning?.level === "warning" ? ansis__default.yellow(isZh ? "\u5EFA\u8BAE\u4F18\u5316" : "Optimization Recommended") : ansis__default.green(isZh ? "\u72B6\u6001\u826F\u597D" : "Healthy");
|
|
283
283
|
console.log(`${isZh ? "\u603B\u4F53\u72B6\u6001" : "Overall Status"}: ${summaryStatus}`);
|
|
284
284
|
console.log("");
|
|
285
285
|
}
|
|
@@ -355,24 +355,24 @@ async function listProfiles(options = {}) {
|
|
|
355
355
|
const lang = options.lang || i18n.language || "en";
|
|
356
356
|
const isZh = lang === "zh-CN";
|
|
357
357
|
console.log("");
|
|
358
|
-
console.log(
|
|
359
|
-
console.log(
|
|
358
|
+
console.log(ansis__default.bold.cyan(isZh ? "\u{1F4CB} \u53EF\u7528\u7684 MCP \u914D\u7F6E\u9884\u8BBE" : "\u{1F4CB} Available MCP Profiles"));
|
|
359
|
+
console.log(ansis__default.dim("\u2500".repeat(50)));
|
|
360
360
|
console.log("");
|
|
361
361
|
for (const profile of MCP_PROFILES) {
|
|
362
362
|
const name = getProfileName(profile, lang);
|
|
363
363
|
const desc = getProfileDescription(profile, lang);
|
|
364
364
|
const serviceCount = profile.services.length === 0 ? isZh ? "\u5168\u90E8" : "All" : profile.services.length.toString();
|
|
365
|
-
const defaultBadge = profile.isDefault ?
|
|
366
|
-
console.log(`${
|
|
367
|
-
console.log(` ${
|
|
368
|
-
console.log(` ${
|
|
365
|
+
const defaultBadge = profile.isDefault ? ansis__default.green(isZh ? " [\u9ED8\u8BA4]" : " [default]") : "";
|
|
366
|
+
console.log(`${ansis__default.bold.green(profile.id)}${defaultBadge}`);
|
|
367
|
+
console.log(` ${ansis__default.white(name)} - ${ansis__default.dim(desc)}`);
|
|
368
|
+
console.log(` ${ansis__default.dim(isZh ? "\u670D\u52A1\u6570\u91CF" : "Services")}: ${serviceCount}`);
|
|
369
369
|
if (profile.services.length > 0 && profile.services.length <= 6) {
|
|
370
|
-
console.log(` ${
|
|
370
|
+
console.log(` ${ansis__default.dim(profile.services.join(", "))}`);
|
|
371
371
|
}
|
|
372
372
|
console.log("");
|
|
373
373
|
}
|
|
374
|
-
console.log(
|
|
375
|
-
console.log(
|
|
374
|
+
console.log(ansis__default.dim("\u2500".repeat(50)));
|
|
375
|
+
console.log(ansis__default.dim(isZh ? "\u4F7F\u7528 `ccjk mcp profile use <id>` \u5207\u6362\u914D\u7F6E" : "Use `ccjk mcp profile use <id>` to switch profile"));
|
|
376
376
|
console.log("");
|
|
377
377
|
}
|
|
378
378
|
async function useProfile(profileId, options = {}) {
|
|
@@ -380,13 +380,13 @@ async function useProfile(profileId, options = {}) {
|
|
|
380
380
|
const isZh = lang === "zh-CN";
|
|
381
381
|
const profile = getProfileById(profileId);
|
|
382
382
|
if (!profile) {
|
|
383
|
-
console.log(
|
|
384
|
-
console.log(
|
|
383
|
+
console.log(ansis__default.red(isZh ? `\u274C \u672A\u627E\u5230\u914D\u7F6E\u9884\u8BBE: ${profileId}` : `\u274C Profile not found: ${profileId}`));
|
|
384
|
+
console.log(ansis__default.dim(isZh ? `\u53EF\u7528\u9884\u8BBE: ${getProfileIds().join(", ")}` : `Available profiles: ${getProfileIds().join(", ")}`));
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
387
|
const backupPath = backupMcpConfig();
|
|
388
388
|
if (backupPath) {
|
|
389
|
-
console.log(
|
|
389
|
+
console.log(ansis__default.gray(`\u2714 ${isZh ? "\u5DF2\u5907\u4EFD\u5F53\u524D\u914D\u7F6E" : "Backed up current config"}: ${backupPath}`));
|
|
390
390
|
}
|
|
391
391
|
let servicesToEnable;
|
|
392
392
|
if (profile.services.length === 0) {
|
|
@@ -408,15 +408,15 @@ async function useProfile(profileId, options = {}) {
|
|
|
408
408
|
};
|
|
409
409
|
writeMcpConfig(newConfig);
|
|
410
410
|
const profileName = getProfileName(profile, lang);
|
|
411
|
-
console.log(
|
|
412
|
-
console.log(
|
|
411
|
+
console.log(ansis__default.green(`\u2714 ${isZh ? "\u5DF2\u5207\u6362\u5230\u914D\u7F6E\u9884\u8BBE" : "Switched to profile"}: ${profileName}`));
|
|
412
|
+
console.log(ansis__default.dim(` ${isZh ? "\u5DF2\u542F\u7528\u670D\u52A1" : "Enabled services"}: ${servicesToEnable.length}`));
|
|
413
413
|
const warning = checkMcpPerformance(servicesToEnable.length);
|
|
414
414
|
if (warning) {
|
|
415
415
|
console.log("");
|
|
416
416
|
console.log(formatPerformanceWarning(warning, lang));
|
|
417
417
|
}
|
|
418
418
|
console.log("");
|
|
419
|
-
console.log(
|
|
419
|
+
console.log(ansis__default.yellow(isZh ? "\u26A0\uFE0F \u8BF7\u91CD\u542F Claude Code \u4EE5\u4F7F\u66F4\u6539\u751F\u6548" : "\u26A0\uFE0F Please restart Claude Code for changes to take effect"));
|
|
420
420
|
}
|
|
421
421
|
|
|
422
422
|
async function mcpStatus(options = {}) {
|
|
@@ -426,8 +426,8 @@ async function mcpStatus(options = {}) {
|
|
|
426
426
|
const lang = options.lang || i18n.language || "en";
|
|
427
427
|
const isZh = lang === "zh-CN";
|
|
428
428
|
console.log("");
|
|
429
|
-
console.log(
|
|
430
|
-
console.log(
|
|
429
|
+
console.log(ansis__default.bold.cyan(isZh ? "\u26A1 MCP \u5FEB\u901F\u72B6\u6001" : "\u26A1 MCP Quick Status"));
|
|
430
|
+
console.log(ansis__default.dim("\u2500".repeat(40)));
|
|
431
431
|
const config = await readMcpConfig();
|
|
432
432
|
const services = Object.keys(config?.mcpServers || {});
|
|
433
433
|
let coreCount = 0;
|
|
@@ -442,27 +442,27 @@ async function mcpStatus(options = {}) {
|
|
|
442
442
|
else scenarioCount++;
|
|
443
443
|
}
|
|
444
444
|
console.log("");
|
|
445
|
-
console.log(`${
|
|
446
|
-
console.log(`${
|
|
447
|
-
console.log(`${
|
|
448
|
-
console.log(`${
|
|
445
|
+
console.log(`${ansis__default.green("\u25CF")} ${isZh ? "\u6838\u5FC3\u670D\u52A1" : "Core"}: ${coreCount}`);
|
|
446
|
+
console.log(`${ansis__default.yellow("\u25CF")} ${isZh ? "\u6309\u9700\u670D\u52A1" : "On-demand"}: ${ondemandCount}`);
|
|
447
|
+
console.log(`${ansis__default.green("\u25CF")} ${isZh ? "\u573A\u666F\u670D\u52A1" : "Scenario"}: ${scenarioCount}`);
|
|
448
|
+
console.log(`${ansis__default.dim("\u2500")} ${isZh ? "\u603B\u8BA1" : "Total"}: ${services.length}`);
|
|
449
449
|
const perfResult = checkMcpPerformance(services.length);
|
|
450
450
|
if (perfResult) {
|
|
451
451
|
console.log("");
|
|
452
452
|
console.log(formatPerformanceWarning(perfResult, lang));
|
|
453
453
|
} else {
|
|
454
454
|
console.log("");
|
|
455
|
-
console.log(
|
|
455
|
+
console.log(ansis__default.green(isZh ? "\u2713 \u6027\u80FD\u72B6\u6001\u826F\u597D" : "\u2713 Performance OK"));
|
|
456
456
|
}
|
|
457
457
|
console.log("");
|
|
458
|
-
console.log(
|
|
458
|
+
console.log(ansis__default.dim(isZh ? "\u63D0\u793A: \u4F7F\u7528 ccjk mcp doctor \u67E5\u770B\u8BE6\u7EC6\u8BCA\u65AD" : "Tip: Use ccjk mcp doctor for detailed diagnostics"));
|
|
459
459
|
}
|
|
460
460
|
function mcpHelp(options = {}) {
|
|
461
461
|
const lang = options.lang || i18n.language || "en";
|
|
462
462
|
const isZh = lang === "zh-CN";
|
|
463
463
|
console.log("");
|
|
464
|
-
console.log(
|
|
465
|
-
console.log(
|
|
464
|
+
console.log(ansis__default.bold.cyan(isZh ? "\u{1F527} MCP \u7BA1\u7406\u547D\u4EE4" : "\u{1F527} MCP Management Commands"));
|
|
465
|
+
console.log(ansis__default.dim("\u2500".repeat(50)));
|
|
466
466
|
console.log("");
|
|
467
467
|
const commands = [
|
|
468
468
|
{
|
|
@@ -491,12 +491,12 @@ function mcpHelp(options = {}) {
|
|
|
491
491
|
}
|
|
492
492
|
];
|
|
493
493
|
for (const { cmd, desc } of commands) {
|
|
494
|
-
console.log(` ${
|
|
495
|
-
console.log(` ${
|
|
494
|
+
console.log(` ${ansis__default.green(cmd)}`);
|
|
495
|
+
console.log(` ${ansis__default.dim(desc)}`);
|
|
496
496
|
console.log("");
|
|
497
497
|
}
|
|
498
|
-
console.log(
|
|
499
|
-
console.log(
|
|
498
|
+
console.log(ansis__default.dim("\u2500".repeat(50)));
|
|
499
|
+
console.log(ansis__default.dim(isZh ? "\u{1F4A1} \u63A8\u8350: \u4F7F\u7528 minimal \u9884\u8BBE\u53EF\u663E\u8457\u63D0\u5347\u6027\u80FD" : "\u{1F4A1} Tip: Use minimal profile for best performance"));
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
export { listProfiles, mcpDoctor, mcpHelp, mcpRelease, mcpStatus, useProfile };
|