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/commands.mjs
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { exec } from 'node:child_process';
|
|
2
2
|
import { promisify } from 'node:util';
|
|
3
|
-
import
|
|
4
|
-
import { ensureI18nInitialized, i18n } from './
|
|
3
|
+
import a from './index2.mjs';
|
|
4
|
+
import { ensureI18nInitialized, i18n } from './index5.mjs';
|
|
5
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
5
6
|
import 'node:fs';
|
|
6
7
|
import 'node:process';
|
|
7
8
|
import 'node:url';
|
|
8
|
-
import '
|
|
9
|
-
import 'i18next-fs-backend';
|
|
10
|
-
import 'pathe';
|
|
9
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
11
10
|
|
|
12
11
|
const execAsync = promisify(exec);
|
|
13
12
|
async function runCcrUi(apiKey) {
|
|
14
13
|
ensureI18nInitialized();
|
|
15
|
-
console.log(
|
|
14
|
+
console.log(a.green(`
|
|
16
15
|
\u{1F5A5}\uFE0F ${i18n.t("ccr:startingCcrUi")}`));
|
|
17
16
|
if (apiKey) {
|
|
18
|
-
console.log(
|
|
17
|
+
console.log(a.bold.green(`
|
|
19
18
|
\u{1F511} ${i18n.t("ccr:ccrUiApiKey") || "CCR UI API Key"}: ${apiKey}`));
|
|
20
|
-
console.log(
|
|
19
|
+
console.log(a.gray(` ${i18n.t("ccr:ccrUiApiKeyHint") || "Use this API key to login to CCR UI"}
|
|
21
20
|
`));
|
|
22
21
|
}
|
|
23
22
|
try {
|
|
@@ -25,83 +24,83 @@ async function runCcrUi(apiKey) {
|
|
|
25
24
|
if (stdout)
|
|
26
25
|
console.log(stdout);
|
|
27
26
|
if (stderr)
|
|
28
|
-
console.error(
|
|
29
|
-
console.log(
|
|
27
|
+
console.error(a.yellow(stderr));
|
|
28
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrUiStarted")}`));
|
|
30
29
|
} catch (error) {
|
|
31
|
-
console.error(
|
|
30
|
+
console.error(a.red(`\u2716 ${i18n.t("ccr:ccrCommandFailed")}: ${error instanceof Error ? error.message : String(error)}`));
|
|
32
31
|
throw error;
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
async function runCcrStatus() {
|
|
36
35
|
ensureI18nInitialized();
|
|
37
|
-
console.log(
|
|
36
|
+
console.log(a.green(`
|
|
38
37
|
\u{1F4CA} ${i18n.t("ccr:checkingCcrStatus")}`));
|
|
39
38
|
try {
|
|
40
39
|
const { stdout, stderr } = await execAsync("ccr status");
|
|
41
40
|
if (stdout) {
|
|
42
41
|
console.log(`
|
|
43
|
-
${
|
|
42
|
+
${a.bold(i18n.t("ccr:ccrStatusTitle"))}`);
|
|
44
43
|
console.log(stdout);
|
|
45
44
|
}
|
|
46
45
|
if (stderr)
|
|
47
|
-
console.error(
|
|
46
|
+
console.error(a.yellow(stderr));
|
|
48
47
|
} catch (error) {
|
|
49
|
-
console.error(
|
|
48
|
+
console.error(a.red(`\u2716 ${i18n.t("ccr:ccrCommandFailed")}: ${error instanceof Error ? error.message : String(error)}`));
|
|
50
49
|
throw error;
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
async function runCcrRestart() {
|
|
54
53
|
ensureI18nInitialized();
|
|
55
|
-
console.log(
|
|
54
|
+
console.log(a.green(`
|
|
56
55
|
\u{1F504} ${i18n.t("ccr:restartingCcr")}`));
|
|
57
56
|
try {
|
|
58
57
|
const { stdout, stderr } = await execAsync("ccr restart");
|
|
59
58
|
if (stdout)
|
|
60
59
|
console.log(stdout);
|
|
61
60
|
if (stderr)
|
|
62
|
-
console.error(
|
|
63
|
-
console.log(
|
|
61
|
+
console.error(a.yellow(stderr));
|
|
62
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrRestarted")}`));
|
|
64
63
|
} catch (error) {
|
|
65
|
-
console.error(
|
|
64
|
+
console.error(a.red(`\u2716 ${i18n.t("ccr:ccrCommandFailed")}: ${error instanceof Error ? error.message : String(error)}`));
|
|
66
65
|
throw error;
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
async function runCcrStart() {
|
|
70
69
|
ensureI18nInitialized();
|
|
71
|
-
console.log(
|
|
70
|
+
console.log(a.green(`
|
|
72
71
|
\u25B6\uFE0F ${i18n.t("ccr:startingCcr")}`));
|
|
73
72
|
try {
|
|
74
73
|
const { stdout, stderr } = await execAsync("ccr start");
|
|
75
74
|
if (stdout)
|
|
76
75
|
console.log(stdout);
|
|
77
76
|
if (stderr)
|
|
78
|
-
console.error(
|
|
79
|
-
console.log(
|
|
77
|
+
console.error(a.yellow(stderr));
|
|
78
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrStarted")}`));
|
|
80
79
|
} catch (error) {
|
|
81
80
|
if (error.stdout && error.stdout.includes("Loaded JSON config from:")) {
|
|
82
81
|
console.log(error.stdout);
|
|
83
82
|
if (error.stderr)
|
|
84
|
-
console.error(
|
|
85
|
-
console.log(
|
|
83
|
+
console.error(a.yellow(error.stderr));
|
|
84
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrStarted")}`));
|
|
86
85
|
} else {
|
|
87
|
-
console.error(
|
|
86
|
+
console.error(a.red(`\u2716 ${i18n.t("ccr:ccrCommandFailed")}: ${error instanceof Error ? error.message : String(error)}`));
|
|
88
87
|
throw error;
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
async function runCcrStop() {
|
|
93
92
|
ensureI18nInitialized();
|
|
94
|
-
console.log(
|
|
93
|
+
console.log(a.green(`
|
|
95
94
|
\u23F9\uFE0F ${i18n.t("ccr:stoppingCcr")}`));
|
|
96
95
|
try {
|
|
97
96
|
const { stdout, stderr } = await execAsync("ccr stop");
|
|
98
97
|
if (stdout)
|
|
99
98
|
console.log(stdout);
|
|
100
99
|
if (stderr)
|
|
101
|
-
console.error(
|
|
102
|
-
console.log(
|
|
100
|
+
console.error(a.yellow(stderr));
|
|
101
|
+
console.log(a.green(`\u2714 ${i18n.t("ccr:ccrStopped")}`));
|
|
103
102
|
} catch (error) {
|
|
104
|
-
console.error(
|
|
103
|
+
console.error(a.red(`\u2716 ${i18n.t("ccr:ccrCommandFailed")}: ${error instanceof Error ? error.message : String(error)}`));
|
|
105
104
|
throw error;
|
|
106
105
|
}
|
|
107
106
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import process__default from 'node:process';
|
|
2
|
-
import
|
|
2
|
+
import a from './index2.mjs';
|
|
3
3
|
import { checkAgentBrowserInstalled, getInstallPath } from './installer2.mjs';
|
|
4
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
4
5
|
import 'node:fs';
|
|
5
6
|
import 'node:os';
|
|
6
7
|
import 'node:path';
|
|
7
8
|
|
|
8
|
-
const { cyan: _cyan, yellow: yellow$1, gray: _gray, green: green$1, red: _red, blue: _blue$1, bold: _bold, dim: _dim$1 } =
|
|
9
|
+
const { cyan: _cyan, yellow: yellow$1, gray: _gray, green: green$1, red: _red, blue: _blue$1, bold: _bold, dim: _dim$1 } = a;
|
|
9
10
|
class AgentBrowserSession {
|
|
10
11
|
options;
|
|
11
12
|
isRunning = false;
|
|
@@ -238,7 +239,7 @@ class AgentBrowserSession {
|
|
|
238
239
|
}
|
|
239
240
|
}
|
|
240
241
|
|
|
241
|
-
const { cyan, yellow, gray, green, red, blue: _blue, bold, dim: _dim } =
|
|
242
|
+
const { cyan, yellow, gray, green, red, blue: _blue, bold, dim: _dim } = a;
|
|
242
243
|
function agentBrowserHelp(_options) {
|
|
243
244
|
console.log(`
|
|
244
245
|
${bold(cyan("Agent Browser"))} - ${gray("Zero-config browser automation for AI agents")}
|
package/dist/chunks/commit.mjs
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import inquirer from '
|
|
3
|
-
import { exec } from '
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i as inquirer } from './index3.mjs';
|
|
3
|
+
import { exec as q } from './main.mjs';
|
|
4
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
5
|
+
import 'node:readline';
|
|
6
|
+
import 'stream';
|
|
7
|
+
import 'node:tty';
|
|
8
|
+
import 'node:process';
|
|
9
|
+
import 'node:async_hooks';
|
|
10
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
11
|
+
import 'node:util';
|
|
12
|
+
import 'tty';
|
|
13
|
+
import 'fs';
|
|
14
|
+
import 'child_process';
|
|
15
|
+
import 'node:path';
|
|
16
|
+
import 'node:os';
|
|
17
|
+
import 'node:crypto';
|
|
18
|
+
import 'buffer';
|
|
19
|
+
import 'string_decoder';
|
|
20
|
+
import 'module';
|
|
21
|
+
import 'node:child_process';
|
|
22
|
+
import 'node:stream';
|
|
4
23
|
|
|
5
24
|
async function checkGitRepo() {
|
|
6
25
|
try {
|
|
7
|
-
await
|
|
26
|
+
await q("git", ["rev-parse", "--git-dir"]);
|
|
8
27
|
return true;
|
|
9
28
|
} catch {
|
|
10
29
|
return false;
|
|
@@ -14,7 +33,7 @@ async function getGitStatus() {
|
|
|
14
33
|
const isRepo = await checkGitRepo();
|
|
15
34
|
if (!isRepo)
|
|
16
35
|
return { isRepo: false, hasChanges: false, staged: [], unstaged: [], untracked: [] };
|
|
17
|
-
const { stdout } = await
|
|
36
|
+
const { stdout } = await q("git", ["status", "--porcelain"]);
|
|
18
37
|
const lines = stdout.trim().split("\n").filter(Boolean);
|
|
19
38
|
const staged = [];
|
|
20
39
|
const unstaged = [];
|
|
@@ -40,7 +59,7 @@ async function getGitStatus() {
|
|
|
40
59
|
async function generateCommitMessage(files) {
|
|
41
60
|
if (files.length === 0)
|
|
42
61
|
return "chore: update files";
|
|
43
|
-
const { stdout: diff } = await
|
|
62
|
+
const { stdout: diff } = await q("git", ["diff", "--cached", "--stat"]);
|
|
44
63
|
const hasTest = files.some((f) => f.includes("test") || f.includes("spec"));
|
|
45
64
|
const hasDocs = files.some((f) => f.endsWith(".md"));
|
|
46
65
|
const hasConfig = files.some((f) => f.endsWith(".json") || f.endsWith(".yaml"));
|
|
@@ -54,34 +73,34 @@ async function generateCommitMessage(files) {
|
|
|
54
73
|
${diff.trim()}`;
|
|
55
74
|
}
|
|
56
75
|
async function stageAllChanges() {
|
|
57
|
-
await
|
|
76
|
+
await q("git", ["add", "-A"]);
|
|
58
77
|
}
|
|
59
78
|
async function commitChanges(message) {
|
|
60
|
-
await
|
|
79
|
+
await q("git", ["commit", "-m", message]);
|
|
61
80
|
}
|
|
62
81
|
|
|
63
82
|
async function commit(options = {}) {
|
|
64
83
|
if (!await checkGitRepo()) {
|
|
65
|
-
console.log(
|
|
84
|
+
console.log(a.red("\u2717 Not a git repository"));
|
|
66
85
|
return;
|
|
67
86
|
}
|
|
68
87
|
const status = await getGitStatus();
|
|
69
88
|
if (!status.hasChanges) {
|
|
70
|
-
console.log(
|
|
89
|
+
console.log(a.yellow("No changes to commit"));
|
|
71
90
|
return;
|
|
72
91
|
}
|
|
73
|
-
console.log(
|
|
92
|
+
console.log(a.green("\n\u{1F4DD} Changes detected:"));
|
|
74
93
|
if (status.staged.length > 0) {
|
|
75
|
-
console.log(
|
|
76
|
-
status.staged.forEach((f) => console.log(
|
|
94
|
+
console.log(a.green(` Staged: ${status.staged.length} files`));
|
|
95
|
+
status.staged.forEach((f) => console.log(a.gray(` ${f}`)));
|
|
77
96
|
}
|
|
78
97
|
if (status.unstaged.length > 0)
|
|
79
|
-
console.log(
|
|
98
|
+
console.log(a.yellow(` Unstaged: ${status.unstaged.length} files`));
|
|
80
99
|
if (status.untracked.length > 0)
|
|
81
|
-
console.log(
|
|
100
|
+
console.log(a.yellow(` Untracked: ${status.untracked.length} files`));
|
|
82
101
|
if (status.unstaged.length > 0 || status.untracked.length > 0) {
|
|
83
102
|
await stageAllChanges();
|
|
84
|
-
console.log(
|
|
103
|
+
console.log(a.green("\n\u2713 All changes staged"));
|
|
85
104
|
}
|
|
86
105
|
const allFiles = [...status.staged, ...status.unstaged, ...status.untracked];
|
|
87
106
|
let message;
|
|
@@ -89,8 +108,8 @@ async function commit(options = {}) {
|
|
|
89
108
|
message = options.message;
|
|
90
109
|
} else if (options.auto) {
|
|
91
110
|
message = await generateCommitMessage(allFiles);
|
|
92
|
-
console.log(
|
|
93
|
-
console.log(
|
|
111
|
+
console.log(a.green("\n\u{1F4AC} Generated commit message:"));
|
|
112
|
+
console.log(a.white(message));
|
|
94
113
|
} else {
|
|
95
114
|
const suggested = await generateCommitMessage(allFiles);
|
|
96
115
|
const { commitMessage } = await inquirer.prompt([{
|
|
@@ -102,16 +121,16 @@ async function commit(options = {}) {
|
|
|
102
121
|
message = commitMessage;
|
|
103
122
|
}
|
|
104
123
|
if (options.dryRun) {
|
|
105
|
-
console.log(
|
|
106
|
-
console.log(
|
|
107
|
-
console.log(
|
|
124
|
+
console.log(a.yellow("\n\u{1F50D} Dry run - no commit created"));
|
|
125
|
+
console.log(a.gray("Would commit with:"));
|
|
126
|
+
console.log(a.white(message));
|
|
108
127
|
return;
|
|
109
128
|
}
|
|
110
129
|
try {
|
|
111
130
|
await commitChanges(message);
|
|
112
|
-
console.log(
|
|
131
|
+
console.log(a.green("\n\u2713 Changes committed"));
|
|
113
132
|
} catch (error) {
|
|
114
|
-
console.log(
|
|
133
|
+
console.log(a.red(`
|
|
115
134
|
\u2717 Commit failed: ${error}`));
|
|
116
135
|
}
|
|
117
136
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import
|
|
5
|
-
import { i18n } from './
|
|
4
|
+
import a from './index2.mjs';
|
|
5
|
+
import { i18n } from './index5.mjs';
|
|
6
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
6
7
|
import 'node:process';
|
|
7
8
|
import 'node:url';
|
|
8
|
-
import '
|
|
9
|
-
import 'i18next-fs-backend';
|
|
10
|
-
import 'pathe';
|
|
9
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
11
10
|
|
|
12
11
|
const COMPLETION_COMMANDS = [
|
|
13
12
|
// Core Commands
|
|
@@ -363,11 +362,11 @@ const provider = new CCJKCompletionProvider();
|
|
|
363
362
|
async function installCompletion(shell, options = {}) {
|
|
364
363
|
const isZh = (options.lang || i18n.language) === "zh-CN";
|
|
365
364
|
console.log("");
|
|
366
|
-
console.log(
|
|
365
|
+
console.log(a.bold.cyan(isZh ? `Installing ${shell} completion...` : `Installing ${shell} completion...`));
|
|
367
366
|
const script = await provider.generateScript(shell);
|
|
368
367
|
const installPath = getCompletionInstallPath(shell);
|
|
369
368
|
if (!installPath) {
|
|
370
|
-
console.log(
|
|
369
|
+
console.log(a.red(isZh ? `Cannot determine install path for ${shell}` : `Cannot determine install path for ${shell}`));
|
|
371
370
|
return;
|
|
372
371
|
}
|
|
373
372
|
const dir = join(installPath, "..");
|
|
@@ -375,7 +374,7 @@ async function installCompletion(shell, options = {}) {
|
|
|
375
374
|
mkdirSync(dir, { recursive: true });
|
|
376
375
|
}
|
|
377
376
|
writeFileSync(installPath, script, "utf-8");
|
|
378
|
-
console.log(
|
|
377
|
+
console.log(a.green(isZh ? `Completion script installed to: ${installPath}` : `Completion script installed to: ${installPath}`));
|
|
379
378
|
console.log("");
|
|
380
379
|
showActivationInstructions(shell, installPath, isZh);
|
|
381
380
|
}
|
|
@@ -383,12 +382,12 @@ async function uninstallCompletion(shell, options = {}) {
|
|
|
383
382
|
const isZh = (options.lang || i18n.language) === "zh-CN";
|
|
384
383
|
const installPath = getCompletionInstallPath(shell);
|
|
385
384
|
if (!installPath || !existsSync(installPath)) {
|
|
386
|
-
console.log(
|
|
385
|
+
console.log(a.yellow(isZh ? `No completion script found for ${shell}` : `No completion script found for ${shell}`));
|
|
387
386
|
return;
|
|
388
387
|
}
|
|
389
388
|
const { unlinkSync } = await import('node:fs');
|
|
390
389
|
unlinkSync(installPath);
|
|
391
|
-
console.log(
|
|
390
|
+
console.log(a.green(isZh ? `Completion script removed: ${installPath}` : `Completion script removed: ${installPath}`));
|
|
392
391
|
}
|
|
393
392
|
async function showCompletion(shell, _options = {}) {
|
|
394
393
|
const script = await provider.generateScript(shell);
|
|
@@ -417,38 +416,38 @@ function getCompletionInstallPath(shell) {
|
|
|
417
416
|
}
|
|
418
417
|
}
|
|
419
418
|
function showActivationInstructions(shell, installPath, isZh) {
|
|
420
|
-
console.log(
|
|
419
|
+
console.log(a.bold(isZh ? "Activation Instructions:" : "Activation Instructions:"));
|
|
421
420
|
console.log("");
|
|
422
421
|
switch (shell) {
|
|
423
422
|
case "bash":
|
|
424
|
-
console.log(
|
|
423
|
+
console.log(a.dim(isZh ? "Add the following to your ~/.bashrc:" : "Add the following to your ~/.bashrc:"));
|
|
425
424
|
console.log("");
|
|
426
|
-
console.log(
|
|
425
|
+
console.log(a.green(` source ${installPath}`));
|
|
427
426
|
console.log("");
|
|
428
|
-
console.log(
|
|
429
|
-
console.log(
|
|
427
|
+
console.log(a.dim(isZh ? "Then reload your shell:" : "Then reload your shell:"));
|
|
428
|
+
console.log(a.green(" source ~/.bashrc"));
|
|
430
429
|
break;
|
|
431
430
|
case "zsh":
|
|
432
|
-
console.log(
|
|
431
|
+
console.log(a.dim(isZh ? "Add the following to your ~/.zshrc:" : "Add the following to your ~/.zshrc:"));
|
|
433
432
|
console.log("");
|
|
434
|
-
console.log(
|
|
435
|
-
console.log(
|
|
433
|
+
console.log(a.green(` fpath=(${join(installPath, "..")} $fpath)`));
|
|
434
|
+
console.log(a.green(" autoload -Uz compinit && compinit"));
|
|
436
435
|
console.log("");
|
|
437
|
-
console.log(
|
|
438
|
-
console.log(
|
|
436
|
+
console.log(a.dim(isZh ? "Then reload your shell:" : "Then reload your shell:"));
|
|
437
|
+
console.log(a.green(" source ~/.zshrc"));
|
|
439
438
|
break;
|
|
440
439
|
case "fish":
|
|
441
|
-
console.log(
|
|
442
|
-
console.log(
|
|
443
|
-
console.log(
|
|
440
|
+
console.log(a.dim(isZh ? "Fish completions are automatically loaded." : "Fish completions are automatically loaded."));
|
|
441
|
+
console.log(a.dim(isZh ? "Restart your shell or run:" : "Restart your shell or run:"));
|
|
442
|
+
console.log(a.green(" source ~/.config/fish/config.fish"));
|
|
444
443
|
break;
|
|
445
444
|
case "powershell":
|
|
446
|
-
console.log(
|
|
445
|
+
console.log(a.dim(isZh ? "Add the following to your PowerShell profile:" : "Add the following to your PowerShell profile:"));
|
|
447
446
|
console.log("");
|
|
448
|
-
console.log(
|
|
447
|
+
console.log(a.green(` . ${installPath}`));
|
|
449
448
|
console.log("");
|
|
450
|
-
console.log(
|
|
451
|
-
console.log(
|
|
449
|
+
console.log(a.dim(isZh ? "To find your profile path, run:" : "To find your profile path, run:"));
|
|
450
|
+
console.log(a.green(" $PROFILE"));
|
|
452
451
|
break;
|
|
453
452
|
}
|
|
454
453
|
console.log("");
|
|
@@ -463,21 +462,21 @@ async function completionCommand(action, shell, options = {}) {
|
|
|
463
462
|
switch (action) {
|
|
464
463
|
case "install":
|
|
465
464
|
if (!shell || !validShells.includes(shell)) {
|
|
466
|
-
console.log(
|
|
465
|
+
console.log(a.red(isZh ? `Please specify a valid shell: ${validShells.join(", ")}` : `Please specify a valid shell: ${validShells.join(", ")}`));
|
|
467
466
|
return;
|
|
468
467
|
}
|
|
469
468
|
await installCompletion(shell, options);
|
|
470
469
|
break;
|
|
471
470
|
case "uninstall":
|
|
472
471
|
if (!shell || !validShells.includes(shell)) {
|
|
473
|
-
console.log(
|
|
472
|
+
console.log(a.red(isZh ? `Please specify a valid shell: ${validShells.join(", ")}` : `Please specify a valid shell: ${validShells.join(", ")}`));
|
|
474
473
|
return;
|
|
475
474
|
}
|
|
476
475
|
await uninstallCompletion(shell, options);
|
|
477
476
|
break;
|
|
478
477
|
case "show":
|
|
479
478
|
if (!shell || !validShells.includes(shell)) {
|
|
480
|
-
console.log(
|
|
479
|
+
console.log(a.red(isZh ? `Please specify a valid shell: ${validShells.join(", ")}` : `Please specify a valid shell: ${validShells.join(", ")}`));
|
|
481
480
|
return;
|
|
482
481
|
}
|
|
483
482
|
await showCompletion(shell, options);
|
|
@@ -488,28 +487,28 @@ async function completionCommand(action, shell, options = {}) {
|
|
|
488
487
|
}
|
|
489
488
|
function showCompletionHelp(isZh) {
|
|
490
489
|
console.log("");
|
|
491
|
-
console.log(
|
|
492
|
-
console.log(
|
|
490
|
+
console.log(a.bold.cyan(isZh ? "Shell Completion Commands" : "Shell Completion Commands"));
|
|
491
|
+
console.log(a.dim("-".repeat(50)));
|
|
493
492
|
console.log("");
|
|
494
|
-
console.log(` ${
|
|
495
|
-
console.log(` ${
|
|
493
|
+
console.log(` ${a.green("ccjk completion install <shell>")}`);
|
|
494
|
+
console.log(` ${a.dim(isZh ? "Install completion script" : "Install completion script")}`);
|
|
496
495
|
console.log("");
|
|
497
|
-
console.log(` ${
|
|
498
|
-
console.log(` ${
|
|
496
|
+
console.log(` ${a.green("ccjk completion uninstall <shell>")}`);
|
|
497
|
+
console.log(` ${a.dim(isZh ? "Uninstall completion script" : "Uninstall completion script")}`);
|
|
499
498
|
console.log("");
|
|
500
|
-
console.log(` ${
|
|
501
|
-
console.log(` ${
|
|
499
|
+
console.log(` ${a.green("ccjk completion show <shell>")}`);
|
|
500
|
+
console.log(` ${a.dim(isZh ? "Show completion script" : "Show completion script")}`);
|
|
502
501
|
console.log("");
|
|
503
|
-
console.log(
|
|
504
|
-
console.log(` ${
|
|
505
|
-
console.log(` ${
|
|
506
|
-
console.log(` ${
|
|
507
|
-
console.log(` ${
|
|
502
|
+
console.log(a.bold(isZh ? "Supported Shells:" : "Supported Shells:"));
|
|
503
|
+
console.log(` ${a.yellow("bash")} - Bash shell`);
|
|
504
|
+
console.log(` ${a.yellow("zsh")} - Zsh shell`);
|
|
505
|
+
console.log(` ${a.yellow("fish")} - Fish shell`);
|
|
506
|
+
console.log(` ${a.yellow("powershell")} - PowerShell`);
|
|
508
507
|
console.log("");
|
|
509
|
-
console.log(
|
|
510
|
-
console.log(
|
|
511
|
-
console.log(
|
|
512
|
-
console.log(
|
|
508
|
+
console.log(a.bold(isZh ? "Examples:" : "Examples:"));
|
|
509
|
+
console.log(a.dim(" ccjk completion install bash"));
|
|
510
|
+
console.log(a.dim(" ccjk completion install zsh"));
|
|
511
|
+
console.log(a.dim(" ccjk completion show fish"));
|
|
513
512
|
console.log("");
|
|
514
513
|
}
|
|
515
514
|
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { existsSync, statSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import process__default from 'node:process';
|
|
4
|
-
import
|
|
5
|
-
import dayjs from '
|
|
6
|
-
import { join } from 'pathe';
|
|
4
|
+
import a from './index2.mjs';
|
|
5
|
+
import { d as dayjs } from '../shared/ccjk.RyizuzOI.mjs';
|
|
7
6
|
import { SETTINGS_FILE, ClAUDE_CONFIG_FILE, CLAUDE_VSC_CONFIG_FILE } from './constants.mjs';
|
|
8
7
|
import { STATUS } from './banner.mjs';
|
|
9
|
-
import '
|
|
8
|
+
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
9
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
10
|
+
import './index5.mjs';
|
|
10
11
|
import 'node:url';
|
|
11
|
-
import 'i18next';
|
|
12
|
-
import 'i18next-fs-backend';
|
|
13
12
|
import './package.mjs';
|
|
14
13
|
|
|
15
14
|
const CONFIG_LOCATIONS = [
|
|
@@ -132,7 +131,7 @@ function compareConfigs(configs) {
|
|
|
132
131
|
}
|
|
133
132
|
function displayConfigScan(configs) {
|
|
134
133
|
const existingConfigs = configs.filter((c) => c.exists);
|
|
135
|
-
console.log(
|
|
134
|
+
console.log(a.green("\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Config Files Detected \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n"));
|
|
136
135
|
if (existingConfigs.length === 0) {
|
|
137
136
|
console.log(STATUS.info("No config files found"));
|
|
138
137
|
return;
|
|
@@ -147,24 +146,24 @@ function displayConfigScan(configs) {
|
|
|
147
146
|
const typeLabel = config.type === "global" ? "primary" : config.type;
|
|
148
147
|
if (config.type === "global" && config.path === SETTINGS_FILE) {
|
|
149
148
|
console.log(STATUS.success(`${config.path}`));
|
|
150
|
-
console.log(
|
|
149
|
+
console.log(a.gray(` (${typeLabel}, ${sizeKB}KB, modified ${modified})`));
|
|
151
150
|
} else if (config.type === "legacy") {
|
|
152
151
|
console.log(STATUS.warning(`${config.path}`));
|
|
153
|
-
console.log(
|
|
152
|
+
console.log(a.gray(` (${typeLabel}, ${sizeKB}KB, modified ${modified})`));
|
|
154
153
|
} else {
|
|
155
154
|
console.log(STATUS.info(`${config.path}`));
|
|
156
|
-
console.log(
|
|
155
|
+
console.log(a.gray(` (${typeLabel}, ${sizeKB}KB, modified ${modified})`));
|
|
157
156
|
}
|
|
158
157
|
}
|
|
159
158
|
const conflicts = compareConfigs(configs);
|
|
160
159
|
if (conflicts.length > 0) {
|
|
161
|
-
console.log(
|
|
160
|
+
console.log(a.yellow(`
|
|
162
161
|
Conflicts found: ${conflicts.length}`));
|
|
163
162
|
for (const conflict of conflicts.slice(0, 5)) {
|
|
164
|
-
console.log(
|
|
163
|
+
console.log(a.yellow(` - ${conflict.key}: differs in ${conflict.files.length} files`));
|
|
165
164
|
}
|
|
166
165
|
if (conflicts.length > 5) {
|
|
167
|
-
console.log(
|
|
166
|
+
console.log(a.gray(` ... and ${conflicts.length - 5} more`));
|
|
168
167
|
}
|
|
169
168
|
}
|
|
170
169
|
console.log("");
|