ccjk 5.2.1 → 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 +57 -57
- 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,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ansis__default from 'ansis';
|
|
2
2
|
import inquirer from 'inquirer';
|
|
3
3
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
4
4
|
import { ClaudeCodeConfigManager } from './claude-code-config-manager.mjs';
|
|
5
5
|
import { a as addNumbersToChoices, p as promptBoolean } from '../shared/ccjk.DhBeLRzf.mjs';
|
|
6
|
-
import { v as validateApiKey } from '../shared/ccjk.
|
|
6
|
+
import { v as validateApiKey } from '../shared/ccjk.XgW1H2t3.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:process';
|
|
9
9
|
import 'node:url';
|
|
@@ -47,10 +47,10 @@ async function configureIncrementalManagement() {
|
|
|
47
47
|
}
|
|
48
48
|
const profiles = Object.values(config.profiles);
|
|
49
49
|
const currentProfile = config.currentProfileId ? config.profiles[config.currentProfileId] : null;
|
|
50
|
-
console.log(
|
|
51
|
-
console.log(
|
|
50
|
+
console.log(ansis__default.green(i18n.t("multi-config:incrementalManagementTitle")));
|
|
51
|
+
console.log(ansis__default.gray(i18n.t("multi-config:currentProfileCount", { count: profiles.length })));
|
|
52
52
|
if (currentProfile) {
|
|
53
|
-
console.log(
|
|
53
|
+
console.log(ansis__default.gray(i18n.t("multi-config:currentDefaultProfile", { profile: currentProfile.name })));
|
|
54
54
|
}
|
|
55
55
|
const choices = [
|
|
56
56
|
{ name: i18n.t("multi-config:addProfile"), value: "add" },
|
|
@@ -66,7 +66,7 @@ async function configureIncrementalManagement() {
|
|
|
66
66
|
choices: addNumbersToChoices(choices)
|
|
67
67
|
}]);
|
|
68
68
|
if (!action || action === "skip") {
|
|
69
|
-
console.log(
|
|
69
|
+
console.log(ansis__default.yellow(i18n.t("common:skip")));
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
switch (action) {
|
|
@@ -91,7 +91,7 @@ async function promptContinueAdding() {
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
async function handleAddProfile() {
|
|
94
|
-
console.log(
|
|
94
|
+
console.log(ansis__default.green(`
|
|
95
95
|
${i18n.t("multi-config:addingNewProfile")}`));
|
|
96
96
|
const { getApiProviders } = await import('./api-providers.mjs');
|
|
97
97
|
const providers = getApiProviders("claude-code");
|
|
@@ -114,7 +114,7 @@ ${i18n.t("multi-config:addingNewProfile")}`));
|
|
|
114
114
|
prefilledBaseUrl = provider.claudeCode.baseUrl;
|
|
115
115
|
prefilledAuthType = provider.claudeCode.authType;
|
|
116
116
|
prefilledDefaultModels = provider.claudeCode.defaultModels;
|
|
117
|
-
console.log(
|
|
117
|
+
console.log(ansis__default.gray(i18n.t("api:providerSelected", { name: provider.name })));
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
const answers = await inquirer.prompt([
|
|
@@ -233,7 +233,7 @@ ${i18n.t("multi-config:addingNewProfile")}`));
|
|
|
233
233
|
defaultValue: false
|
|
234
234
|
});
|
|
235
235
|
if (!overwrite) {
|
|
236
|
-
console.log(
|
|
236
|
+
console.log(ansis__default.yellow(i18n.t("multi-config:profileDuplicateSkipped", { name: profile.name })));
|
|
237
237
|
const shouldContinue2 = await promptContinueAdding();
|
|
238
238
|
if (shouldContinue2) {
|
|
239
239
|
await handleAddProfile();
|
|
@@ -251,37 +251,37 @@ ${i18n.t("multi-config:addingNewProfile")}`));
|
|
|
251
251
|
defaultOpusModel: profile.defaultOpusModel
|
|
252
252
|
});
|
|
253
253
|
if (updateResult.success) {
|
|
254
|
-
console.log(
|
|
254
|
+
console.log(ansis__default.green(i18n.t("multi-config:profileUpdated", { name: profile.name })));
|
|
255
255
|
if (updateResult.backupPath) {
|
|
256
|
-
console.log(
|
|
256
|
+
console.log(ansis__default.gray(i18n.t("common:backupCreated", { path: updateResult.backupPath })));
|
|
257
257
|
}
|
|
258
258
|
if (setAsDefault) {
|
|
259
259
|
const switchResult = await ClaudeCodeConfigManager.switchProfile(existingProfile.id);
|
|
260
260
|
if (switchResult.success) {
|
|
261
|
-
console.log(
|
|
261
|
+
console.log(ansis__default.green(i18n.t("multi-config:profileSetAsDefault", { name: profile.name })));
|
|
262
262
|
await ClaudeCodeConfigManager.applyProfileSettings({ ...profile, id: existingProfile.id });
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
} else {
|
|
266
|
-
console.log(
|
|
266
|
+
console.log(ansis__default.red(i18n.t("multi-config:profileUpdateFailed", { error: updateResult.error || "" })));
|
|
267
267
|
}
|
|
268
268
|
} else {
|
|
269
269
|
const result = await ClaudeCodeConfigManager.addProfile(profile);
|
|
270
270
|
if (result.success) {
|
|
271
271
|
const runtimeProfile = result.addedProfile || { ...profile, id: profileId };
|
|
272
|
-
console.log(
|
|
272
|
+
console.log(ansis__default.green(i18n.t("multi-config:profileAdded", { name: runtimeProfile.name })));
|
|
273
273
|
if (result.backupPath) {
|
|
274
|
-
console.log(
|
|
274
|
+
console.log(ansis__default.gray(i18n.t("common:backupCreated", { path: result.backupPath })));
|
|
275
275
|
}
|
|
276
276
|
if (setAsDefault) {
|
|
277
277
|
const switchResult = await ClaudeCodeConfigManager.switchProfile(runtimeProfile.id);
|
|
278
278
|
if (switchResult.success) {
|
|
279
|
-
console.log(
|
|
279
|
+
console.log(ansis__default.green(i18n.t("multi-config:profileSetAsDefault", { name: runtimeProfile.name })));
|
|
280
280
|
await ClaudeCodeConfigManager.applyProfileSettings(runtimeProfile);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
} else {
|
|
284
|
-
console.log(
|
|
284
|
+
console.log(ansis__default.red(i18n.t("multi-config:profileAddFailed", { error: result.error })));
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
const shouldContinue = await promptContinueAdding();
|
|
@@ -301,15 +301,15 @@ async function handleEditProfile(profiles) {
|
|
|
301
301
|
choices: addNumbersToChoices(choices)
|
|
302
302
|
}]);
|
|
303
303
|
if (!selectedProfileId) {
|
|
304
|
-
console.log(
|
|
304
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
305
305
|
return;
|
|
306
306
|
}
|
|
307
307
|
const selectedProfile = profiles.find((p) => p.id === selectedProfileId);
|
|
308
308
|
if (!selectedProfile) {
|
|
309
|
-
console.log(
|
|
309
|
+
console.log(ansis__default.red(i18n.t("multi-config:profileNotFound")));
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
|
-
console.log(
|
|
312
|
+
console.log(ansis__default.green(`
|
|
313
313
|
${i18n.t("multi-config:editingProfile", { name: selectedProfile.name })}`));
|
|
314
314
|
const answers = await inquirer.prompt([
|
|
315
315
|
{
|
|
@@ -396,20 +396,20 @@ ${i18n.t("multi-config:editingProfile", { name: selectedProfile.name })}`));
|
|
|
396
396
|
}
|
|
397
397
|
const result = await ClaudeCodeConfigManager.updateProfile(selectedProfile.id, updateData);
|
|
398
398
|
if (result.success) {
|
|
399
|
-
console.log(
|
|
399
|
+
console.log(ansis__default.green(i18n.t("multi-config:profileUpdated", { name: updateData.name })));
|
|
400
400
|
if (result.backupPath) {
|
|
401
|
-
console.log(
|
|
401
|
+
console.log(ansis__default.gray(i18n.t("common:backupCreated", { path: result.backupPath })));
|
|
402
402
|
}
|
|
403
403
|
const currentConfig = ClaudeCodeConfigManager.readConfig();
|
|
404
404
|
if (currentConfig?.currentProfileId === selectedProfile.id) {
|
|
405
405
|
const updatedProfile = ClaudeCodeConfigManager.getProfileById(selectedProfile.id);
|
|
406
406
|
if (updatedProfile) {
|
|
407
407
|
await ClaudeCodeConfigManager.applyProfileSettings(updatedProfile);
|
|
408
|
-
console.log(
|
|
408
|
+
console.log(ansis__default.green(i18n.t("multi-config:settingsApplied")));
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
} else {
|
|
412
|
-
console.log(
|
|
412
|
+
console.log(ansis__default.red(i18n.t("multi-config:profileUpdateFailed", { error: result.error })));
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
async function handleCopyProfile(profiles) {
|
|
@@ -424,15 +424,15 @@ async function handleCopyProfile(profiles) {
|
|
|
424
424
|
choices: addNumbersToChoices(choices)
|
|
425
425
|
}]);
|
|
426
426
|
if (!selectedProfileId) {
|
|
427
|
-
console.log(
|
|
427
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
430
|
const selectedProfile = profiles.find((p) => p.id === selectedProfileId);
|
|
431
431
|
if (!selectedProfile) {
|
|
432
|
-
console.log(
|
|
432
|
+
console.log(ansis__default.red(i18n.t("multi-config:profileNotFound")));
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
435
|
-
console.log(
|
|
435
|
+
console.log(ansis__default.green(`
|
|
436
436
|
${i18n.t("multi-config:copyingProfile", { name: selectedProfile.name })}`));
|
|
437
437
|
const copiedName = `${selectedProfile.name}-copy`;
|
|
438
438
|
const questions = [
|
|
@@ -532,24 +532,24 @@ ${i18n.t("multi-config:copyingProfile", { name: selectedProfile.name })}`));
|
|
|
532
532
|
const result = await ClaudeCodeConfigManager.addProfile(copiedProfile);
|
|
533
533
|
if (result.success) {
|
|
534
534
|
const runtimeProfile = result.addedProfile || { ...copiedProfile, id: profileId };
|
|
535
|
-
console.log(
|
|
535
|
+
console.log(ansis__default.green(i18n.t("multi-config:profileCopied", { name: runtimeProfile.name })));
|
|
536
536
|
if (result.backupPath) {
|
|
537
|
-
console.log(
|
|
537
|
+
console.log(ansis__default.gray(i18n.t("common:backupCreated", { path: result.backupPath })));
|
|
538
538
|
}
|
|
539
539
|
if (setAsDefault) {
|
|
540
540
|
const switchResult = await ClaudeCodeConfigManager.switchProfile(runtimeProfile.id);
|
|
541
541
|
if (switchResult.success) {
|
|
542
|
-
console.log(
|
|
542
|
+
console.log(ansis__default.green(i18n.t("multi-config:profileSetAsDefault", { name: runtimeProfile.name })));
|
|
543
543
|
await ClaudeCodeConfigManager.applyProfileSettings(runtimeProfile);
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
} else {
|
|
547
|
-
console.log(
|
|
547
|
+
console.log(ansis__default.red(i18n.t("multi-config:profileCopyFailed", { error: result.error })));
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
async function handleDeleteProfile(profiles) {
|
|
551
551
|
if (profiles.length <= 1) {
|
|
552
|
-
console.log(
|
|
552
|
+
console.log(ansis__default.yellow(i18n.t("multi-config:cannotDeleteLast")));
|
|
553
553
|
return;
|
|
554
554
|
}
|
|
555
555
|
const choices = profiles.map((profile) => ({
|
|
@@ -572,7 +572,7 @@ async function handleDeleteProfile(profiles) {
|
|
|
572
572
|
}
|
|
573
573
|
});
|
|
574
574
|
if (!selectedProfileIds || selectedProfileIds.length === 0) {
|
|
575
|
-
console.log(
|
|
575
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
576
576
|
return;
|
|
577
577
|
}
|
|
578
578
|
const selectedNames = selectedProfileIds.map(
|
|
@@ -583,24 +583,24 @@ async function handleDeleteProfile(profiles) {
|
|
|
583
583
|
defaultValue: false
|
|
584
584
|
});
|
|
585
585
|
if (!confirmed) {
|
|
586
|
-
console.log(
|
|
586
|
+
console.log(ansis__default.yellow(i18n.t("common:cancelled")));
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
589
589
|
const result = await ClaudeCodeConfigManager.deleteProfiles(selectedProfileIds);
|
|
590
590
|
if (result.success) {
|
|
591
|
-
console.log(
|
|
591
|
+
console.log(ansis__default.green(i18n.t("multi-config:profilesDeleted", { count: selectedProfileIds.length })));
|
|
592
592
|
if (result.backupPath) {
|
|
593
|
-
console.log(
|
|
593
|
+
console.log(ansis__default.gray(i18n.t("common:backupCreated", { path: result.backupPath })));
|
|
594
594
|
}
|
|
595
595
|
if (result.newCurrentProfileId) {
|
|
596
596
|
const newProfile = ClaudeCodeConfigManager.getProfileById(result.newCurrentProfileId);
|
|
597
597
|
if (newProfile) {
|
|
598
|
-
console.log(
|
|
598
|
+
console.log(ansis__default.green(i18n.t("multi-config:newDefaultProfile", { profile: newProfile.name })));
|
|
599
599
|
await ClaudeCodeConfigManager.applyProfileSettings(newProfile);
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
} else {
|
|
603
|
-
console.log(
|
|
603
|
+
console.log(ansis__default.red(i18n.t("multi-config:profilesDeleteFailed", { error: result.error })));
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
|