ccjk 2.2.2 → 2.2.5
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/auto-updater.mjs +37 -3
- package/dist/chunks/ccjk-config.mjs +77 -13
- package/dist/chunks/ccr.mjs +8 -11
- package/dist/chunks/ccu.mjs +4 -4
- package/dist/chunks/check-updates.mjs +5 -8
- package/dist/chunks/claude-code-config-manager.mjs +8 -11
- package/dist/chunks/claude-code-incremental-manager.mjs +4 -7
- package/dist/chunks/codex.mjs +496 -17
- package/dist/chunks/commands.mjs +392 -89
- package/dist/chunks/commands2.mjs +109 -0
- package/dist/chunks/config-consolidator.mjs +2 -2
- package/dist/chunks/config-switch.mjs +5 -8
- package/dist/chunks/doctor.mjs +6 -6
- package/dist/chunks/features.mjs +654 -35
- package/dist/chunks/help.mjs +339 -0
- package/dist/chunks/index.mjs +323 -10
- package/dist/chunks/index2.mjs +3 -3
- package/dist/chunks/index3.mjs +1171 -0
- package/dist/chunks/init.mjs +22 -25
- package/dist/chunks/installer.mjs +178 -0
- package/dist/chunks/interview.mjs +6 -6
- package/dist/chunks/mcp-performance.mjs +82 -2
- package/dist/chunks/mcp.mjs +500 -0
- package/dist/chunks/menu.mjs +10 -10
- package/dist/chunks/notification.mjs +5 -5
- package/dist/chunks/onboarding.mjs +6 -6
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/platform.mjs +10 -10
- package/dist/chunks/prompts.mjs +7 -8
- package/dist/chunks/session.mjs +2 -2
- package/dist/chunks/skills-sync.mjs +2 -2
- package/dist/chunks/uninstall.mjs +4 -5
- package/dist/chunks/update.mjs +5 -8
- package/dist/chunks/upgrade-manager.mjs +2 -2
- package/dist/{shared/ccjk.Cy-RH2qV.mjs → chunks/version-checker.mjs} +373 -30
- package/dist/cli.mjs +293 -53
- package/dist/i18n/locales/en/agentBrowser.json +79 -0
- package/dist/i18n/locales/en/mcp.json +2 -4
- package/dist/i18n/locales/en/updater.json +5 -2
- package/dist/i18n/locales/zh/agentBrowser.json +79 -0
- package/dist/i18n/locales/zh-CN/common.json +1 -1
- package/dist/i18n/locales/zh-CN/mcp.json +2 -4
- package/dist/i18n/locales/zh-CN/updater.json +5 -2
- package/dist/index.d.mts +8 -584
- package/dist/index.d.ts +8 -584
- package/dist/index.mjs +10 -14
- package/dist/shared/{ccjk.DJM5aVQJ.mjs → ccjk.ByTIGCUC.mjs} +3 -3
- package/dist/shared/{ccjk.qYAnUMuy.mjs → ccjk.CGTmRqsu.mjs} +2 -3
- package/dist/shared/{ccjk.CUdzQluX.mjs → ccjk.CURU8gbR.mjs} +1 -1
- package/dist/{chunks/mcp-market.mjs → shared/ccjk.D-RZS4E2.mjs} +6 -65
- package/dist/shared/{ccjk.B7169qud.mjs → ccjk.tB4-Y4Qb.mjs} +3 -3
- package/package.json +4 -1
- package/templates/common/skills/en/agent-browser.md +258 -0
- package/templates/common/skills/zh-CN/agent-browser.md +260 -0
- package/dist/chunks/claude-config.mjs +0 -228
- package/dist/chunks/features2.mjs +0 -661
- package/dist/chunks/json-config.mjs +0 -59
- package/dist/chunks/mcp-doctor.mjs +0 -160
- package/dist/chunks/mcp-profile.mjs +0 -220
- package/dist/chunks/mcp-release.mjs +0 -138
- package/dist/chunks/shencha.mjs +0 -320
- package/dist/chunks/tools.mjs +0 -169
- package/dist/shared/ccjk.COdsoe-Y.mjs +0 -64
- package/dist/shared/ccjk.DwDtZ5cK.mjs +0 -266
- package/dist/shared/ccjk.n_AtlHzB.mjs +0 -186
|
@@ -4,7 +4,7 @@ import { exec } from 'tinyexec';
|
|
|
4
4
|
import { ensureI18nInitialized, i18n, format } from './index2.mjs';
|
|
5
5
|
import { shouldUseSudoForGlobalInstall } from './platform.mjs';
|
|
6
6
|
import { p as promptBoolean } from '../shared/ccjk.DhBeLRzf.mjs';
|
|
7
|
-
import {
|
|
7
|
+
import { checkClaudeCodeVersion, fixBrokenNpmSymlink, checkCcrVersion, handleDuplicateInstallations, checkCometixLineVersion } from './version-checker.mjs';
|
|
8
8
|
import 'node:fs';
|
|
9
9
|
import 'node:process';
|
|
10
10
|
import 'node:url';
|
|
@@ -106,6 +106,20 @@ async function updateClaudeCode(force = false, skipPrompt = false) {
|
|
|
106
106
|
console.log(ansis.cyan(format(i18n.t("updater:latestVersion"), { version: latestVersion })));
|
|
107
107
|
if (isBroken) {
|
|
108
108
|
console.log(ansis.yellow(i18n.t("updater:installationBroken")));
|
|
109
|
+
const fixResult = await fixBrokenNpmSymlink();
|
|
110
|
+
if (fixResult.fixed) {
|
|
111
|
+
console.log(ansis.green(`\u2714 ${i18n.t("updater:symlinkFixed")}: ${fixResult.message}`));
|
|
112
|
+
const recheckResult = await checkClaudeCodeVersion();
|
|
113
|
+
if (!recheckResult.isBroken) {
|
|
114
|
+
console.log(ansis.green(i18n.t("updater:installationRepaired")));
|
|
115
|
+
if (!recheckResult.needsUpdate && !force) {
|
|
116
|
+
console.log(ansis.green(format(i18n.t("updater:claudeCodeUpToDate"), { version: recheckResult.currentVersion || "" })));
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
console.log(ansis.gray(`\u2139 ${fixResult.message}`));
|
|
122
|
+
}
|
|
109
123
|
}
|
|
110
124
|
if (!skipPrompt) {
|
|
111
125
|
const confirm = await promptBoolean({
|
|
@@ -128,8 +142,28 @@ async function updateClaudeCode(force = false, skipPrompt = false) {
|
|
|
128
142
|
throw new Error(result.stderr || `Command failed with exit code ${result.exitCode}`);
|
|
129
143
|
}
|
|
130
144
|
} else {
|
|
131
|
-
if (isBroken
|
|
132
|
-
|
|
145
|
+
if (isBroken) {
|
|
146
|
+
if (installationSource === "npm") {
|
|
147
|
+
await execWithSudoIfNeeded("npm", ["install", "-g", "@anthropic-ai/claude-code"]);
|
|
148
|
+
} else if (installationSource === "curl") {
|
|
149
|
+
const { detectAllClaudeCodeInstallations } = await import('./version-checker.mjs');
|
|
150
|
+
const installations = await detectAllClaudeCodeInstallations();
|
|
151
|
+
const curlInstall = installations.find((i) => i.source === "curl" && i.version);
|
|
152
|
+
if (curlInstall?.path) {
|
|
153
|
+
await execWithSudoIfNeeded(curlInstall.path, ["update"]);
|
|
154
|
+
} else {
|
|
155
|
+
throw new Error(i18n.t("updater:curlReinstallRequired"));
|
|
156
|
+
}
|
|
157
|
+
} else {
|
|
158
|
+
const { detectAllClaudeCodeInstallations } = await import('./version-checker.mjs');
|
|
159
|
+
const installations = await detectAllClaudeCodeInstallations();
|
|
160
|
+
const activeInstall = installations.find((i) => i.version);
|
|
161
|
+
if (activeInstall?.path) {
|
|
162
|
+
await execWithSudoIfNeeded(activeInstall.path, ["update"]);
|
|
163
|
+
} else {
|
|
164
|
+
throw new Error(i18n.t("updater:curlReinstallRequired"));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
133
167
|
} else {
|
|
134
168
|
await execWithSudoIfNeeded("claude", ["update"]);
|
|
135
169
|
}
|
|
@@ -1,18 +1,67 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, renameSync, copyFileSync, rmSync } from 'node:fs';
|
|
2
|
-
import { dirname } from 'pathe';
|
|
2
|
+
import { join, dirname } from 'pathe';
|
|
3
3
|
import { parse, stringify } from 'smol-toml';
|
|
4
4
|
import { DEFAULT_CODE_TOOL_TYPE, ZCF_CONFIG_FILE, LEGACY_ZCF_CONFIG_FILES, ZCF_CONFIG_DIR, isCodeToolType, SUPPORTED_LANGS } from './constants.mjs';
|
|
5
|
-
import { exists, readFile, ensureDir,
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
import { exists, readFile, writeFileAtomic, writeFile, ensureDir, copyFile } from './fs-operations.mjs';
|
|
6
|
+
import dayjs from 'dayjs';
|
|
7
|
+
|
|
8
|
+
function readJsonConfig(path, options = {}) {
|
|
9
|
+
const { defaultValue = null, validate, sanitize } = options;
|
|
10
|
+
if (!exists(path)) {
|
|
11
|
+
return defaultValue;
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
const content = readFile(path);
|
|
15
|
+
const data = JSON.parse(content);
|
|
16
|
+
if (validate && !validate(data)) {
|
|
17
|
+
console.log(`Invalid configuration: ${path}`);
|
|
18
|
+
return defaultValue;
|
|
19
|
+
}
|
|
20
|
+
if (sanitize) {
|
|
21
|
+
return sanitize(data);
|
|
22
|
+
}
|
|
23
|
+
return data;
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.error(`Failed to parse JSON: ${path}`, error);
|
|
26
|
+
return defaultValue;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function writeJsonConfig(path, data, options = {}) {
|
|
30
|
+
const { pretty = true, backup = false, backupDir, atomic = true } = options;
|
|
31
|
+
if (backup && exists(path)) {
|
|
32
|
+
backupJsonConfig(path, backupDir);
|
|
33
|
+
}
|
|
34
|
+
const content = pretty ? JSON.stringify(data, null, 2) : JSON.stringify(data);
|
|
35
|
+
if (atomic) {
|
|
36
|
+
writeFileAtomic(path, content);
|
|
37
|
+
} else {
|
|
38
|
+
writeFile(path, content);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function backupJsonConfig(path, backupDir) {
|
|
42
|
+
if (!exists(path)) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
const timestamp = dayjs().format("YYYY-MM-DD_HH-mm-ss");
|
|
46
|
+
const fileName = path.split("/").pop() || "config.json";
|
|
47
|
+
const baseDir = backupDir || join(path, "..", "backup");
|
|
48
|
+
const backupPath = join(baseDir, `${fileName}.backup_${timestamp}`);
|
|
49
|
+
try {
|
|
50
|
+
ensureDir(baseDir);
|
|
51
|
+
copyFile(path, backupPath);
|
|
52
|
+
return backupPath;
|
|
53
|
+
} catch (error) {
|
|
54
|
+
console.error("Failed to backup config", error);
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const jsonConfig = {
|
|
60
|
+
__proto__: null,
|
|
61
|
+
backupJsonConfig: backupJsonConfig,
|
|
62
|
+
readJsonConfig: readJsonConfig,
|
|
63
|
+
writeJsonConfig: writeJsonConfig
|
|
64
|
+
};
|
|
16
65
|
|
|
17
66
|
function isSupportedLang(value) {
|
|
18
67
|
return SUPPORTED_LANGS.includes(value);
|
|
@@ -258,4 +307,19 @@ function readDefaultTomlConfig() {
|
|
|
258
307
|
return readTomlConfig(ZCF_CONFIG_FILE);
|
|
259
308
|
}
|
|
260
309
|
|
|
261
|
-
|
|
310
|
+
const ccjkConfig = {
|
|
311
|
+
__proto__: null,
|
|
312
|
+
createDefaultTomlConfig: createDefaultTomlConfig,
|
|
313
|
+
migrateFromJsonConfig: migrateFromJsonConfig,
|
|
314
|
+
migrateZcfConfigIfNeeded: migrateZcfConfigIfNeeded,
|
|
315
|
+
readDefaultTomlConfig: readDefaultTomlConfig,
|
|
316
|
+
readTomlConfig: readTomlConfig,
|
|
317
|
+
readZcfConfig: readZcfConfig,
|
|
318
|
+
readZcfConfigAsync: readZcfConfigAsync,
|
|
319
|
+
updateTomlConfig: updateTomlConfig,
|
|
320
|
+
updateZcfConfig: updateZcfConfig,
|
|
321
|
+
writeTomlConfig: writeTomlConfig,
|
|
322
|
+
writeZcfConfig: writeZcfConfig
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
export { readZcfConfig as a, backupJsonConfig as b, readDefaultTomlConfig as c, updateTomlConfig as d, readZcfConfigAsync as e, createDefaultTomlConfig as f, writeTomlConfig as g, ccjkConfig as h, jsonConfig as j, readJsonConfig as r, updateZcfConfig as u, writeJsonConfig as w };
|
package/dist/chunks/ccr.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as displayBannerWithInfo } from '../shared/ccjk.BhKlRJ0h.mjs';
|
|
2
|
-
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.
|
|
2
|
+
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.tB4-Y4Qb.mjs';
|
|
3
3
|
import { s as showCcrMenu, a as showMainMenu } from './menu.mjs';
|
|
4
4
|
import 'ansis';
|
|
5
5
|
import './package.mjs';
|
|
@@ -18,37 +18,34 @@ import 'smol-toml';
|
|
|
18
18
|
import './fs-operations.mjs';
|
|
19
19
|
import 'node:crypto';
|
|
20
20
|
import 'node:fs/promises';
|
|
21
|
-
import './json-config.mjs';
|
|
22
21
|
import 'dayjs';
|
|
23
22
|
import './codex.mjs';
|
|
24
23
|
import 'ora';
|
|
25
24
|
import 'semver';
|
|
26
25
|
import 'tinyexec';
|
|
27
|
-
import './claude-config.mjs';
|
|
28
26
|
import './platform.mjs';
|
|
29
27
|
import '../shared/ccjk.DhBeLRzf.mjs';
|
|
30
28
|
import 'inquirer-toggle';
|
|
31
29
|
import './prompts.mjs';
|
|
32
|
-
import '../shared/ccjk.DwDtZ5cK.mjs';
|
|
33
30
|
import 'node:child_process';
|
|
34
|
-
import '../shared/ccjk.
|
|
35
|
-
import './
|
|
31
|
+
import '../shared/ccjk.CURU8gbR.mjs';
|
|
32
|
+
import './features.mjs';
|
|
36
33
|
import './init.mjs';
|
|
37
|
-
import '../shared/ccjk.
|
|
34
|
+
import '../shared/ccjk.CGTmRqsu.mjs';
|
|
38
35
|
import 'node:util';
|
|
39
36
|
import './auto-updater.mjs';
|
|
40
|
-
import '
|
|
37
|
+
import './version-checker.mjs';
|
|
41
38
|
import 'node:path';
|
|
42
|
-
import '../shared/ccjk.
|
|
39
|
+
import '../shared/ccjk.ByTIGCUC.mjs';
|
|
43
40
|
import '../shared/ccjk.Bi-m3LKY.mjs';
|
|
44
41
|
import './smart-guide.mjs';
|
|
45
42
|
import './ccu.mjs';
|
|
46
|
-
import './
|
|
43
|
+
import './commands2.mjs';
|
|
47
44
|
import './check-updates.mjs';
|
|
48
45
|
import './config-switch.mjs';
|
|
49
46
|
import './claude-code-config-manager.mjs';
|
|
50
47
|
import './doctor.mjs';
|
|
51
|
-
import '
|
|
48
|
+
import '../shared/ccjk.D-RZS4E2.mjs';
|
|
52
49
|
import './notification.mjs';
|
|
53
50
|
import 'node:buffer';
|
|
54
51
|
import '@iarna/toml';
|
package/dist/chunks/ccu.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import process__default from 'node:process';
|
|
2
2
|
import ansis from 'ansis';
|
|
3
3
|
import { x } from 'tinyexec';
|
|
4
4
|
import { i18n } from './index2.mjs';
|
|
@@ -23,11 +23,11 @@ async function executeCcusage(args = []) {
|
|
|
23
23
|
} catch (error) {
|
|
24
24
|
console.error(ansis.red(i18n.t("tools:ccusageFailed")));
|
|
25
25
|
console.error(ansis.yellow(i18n.t("tools:checkNetworkConnection")));
|
|
26
|
-
if (
|
|
26
|
+
if (process__default.env.DEBUG) {
|
|
27
27
|
console.error(ansis.gray(i18n.t("tools:errorDetails")), error);
|
|
28
28
|
}
|
|
29
|
-
if (
|
|
30
|
-
|
|
29
|
+
if (process__default.env.NODE_ENV !== "test") {
|
|
30
|
+
process__default.exit(1);
|
|
31
31
|
}
|
|
32
32
|
throw error;
|
|
33
33
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import process__default from 'node:process';
|
|
2
2
|
import ansis from 'ansis';
|
|
3
3
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
4
|
-
import { r as resolveCodeType } from '../shared/ccjk.
|
|
4
|
+
import { r as resolveCodeType } from '../shared/ccjk.CURU8gbR.mjs';
|
|
5
5
|
import { checkAndUpdateTools } from './auto-updater.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { Q as runCodexUpdate } from './codex.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:url';
|
|
9
9
|
import 'i18next';
|
|
@@ -16,23 +16,20 @@ import 'smol-toml';
|
|
|
16
16
|
import './fs-operations.mjs';
|
|
17
17
|
import 'node:crypto';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
|
-
import './json-config.mjs';
|
|
20
19
|
import 'dayjs';
|
|
21
20
|
import 'ora';
|
|
22
21
|
import 'tinyexec';
|
|
23
22
|
import './platform.mjs';
|
|
24
23
|
import '../shared/ccjk.DhBeLRzf.mjs';
|
|
25
24
|
import 'inquirer-toggle';
|
|
26
|
-
import '
|
|
25
|
+
import './version-checker.mjs';
|
|
27
26
|
import 'node:child_process';
|
|
28
27
|
import 'node:path';
|
|
29
28
|
import 'node:util';
|
|
30
29
|
import 'semver';
|
|
31
30
|
import 'inquirer';
|
|
32
|
-
import './claude-config.mjs';
|
|
33
31
|
import './prompts.mjs';
|
|
34
32
|
import './package.mjs';
|
|
35
|
-
import '../shared/ccjk.DwDtZ5cK.mjs';
|
|
36
33
|
|
|
37
34
|
class ToolUpdateScheduler {
|
|
38
35
|
/**
|
|
@@ -86,7 +83,7 @@ Defaulting to "claude-code".`));
|
|
|
86
83
|
} catch (error) {
|
|
87
84
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
88
85
|
console.error(ansis.red(`${i18n.t("updater:errorCheckingUpdates")} ${errorMessage}`));
|
|
89
|
-
|
|
86
|
+
process__default.exit(1);
|
|
90
87
|
}
|
|
91
88
|
}
|
|
92
89
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
2
|
import { join } from 'pathe';
|
|
3
3
|
import { ZCF_CONFIG_FILE, ZCF_CONFIG_DIR, SETTINGS_FILE } from './constants.mjs';
|
|
4
|
-
import { readDefaultTomlConfig, createDefaultTomlConfig, writeTomlConfig } from './ccjk-config.mjs';
|
|
5
|
-
import {
|
|
4
|
+
import { c as readDefaultTomlConfig, f as createDefaultTomlConfig, r as readJsonConfig, g as writeTomlConfig } from './ccjk-config.mjs';
|
|
5
|
+
import { ae as clearModelEnv } from './codex.mjs';
|
|
6
6
|
import { ensureDir, exists, copyFile } from './fs-operations.mjs';
|
|
7
|
-
import { readJsonConfig } from './json-config.mjs';
|
|
8
7
|
import 'node:os';
|
|
9
8
|
import './index2.mjs';
|
|
10
9
|
import 'node:fs';
|
|
@@ -13,20 +12,18 @@ import 'node:url';
|
|
|
13
12
|
import 'i18next';
|
|
14
13
|
import 'i18next-fs-backend';
|
|
15
14
|
import 'smol-toml';
|
|
16
|
-
import 'node:crypto';
|
|
17
|
-
import 'node:fs/promises';
|
|
18
15
|
import 'ansis';
|
|
19
16
|
import 'inquirer';
|
|
20
17
|
import 'ora';
|
|
21
18
|
import 'semver';
|
|
22
19
|
import 'tinyexec';
|
|
23
|
-
import './claude-config.mjs';
|
|
24
20
|
import './platform.mjs';
|
|
25
21
|
import '../shared/ccjk.DhBeLRzf.mjs';
|
|
26
22
|
import 'inquirer-toggle';
|
|
27
23
|
import './prompts.mjs';
|
|
28
24
|
import './package.mjs';
|
|
29
|
-
import '
|
|
25
|
+
import 'node:crypto';
|
|
26
|
+
import 'node:fs/promises';
|
|
30
27
|
import 'node:child_process';
|
|
31
28
|
|
|
32
29
|
class ClaudeCodeConfigManager {
|
|
@@ -198,11 +195,11 @@ class ClaudeCodeConfigManager {
|
|
|
198
195
|
ensureI18nInitialized();
|
|
199
196
|
try {
|
|
200
197
|
if (!profile) {
|
|
201
|
-
const { switchToOfficialLogin } = await import('./codex.mjs').then(function (n) { return n.
|
|
198
|
+
const { switchToOfficialLogin } = await import('./codex.mjs').then(function (n) { return n.ah; });
|
|
202
199
|
switchToOfficialLogin();
|
|
203
200
|
return;
|
|
204
201
|
}
|
|
205
|
-
const { readJsonConfig: readJsonConfig2, writeJsonConfig } = await import('./
|
|
202
|
+
const { readJsonConfig: readJsonConfig2, writeJsonConfig } = await import('./ccjk-config.mjs').then(function (n) { return n.j; });
|
|
206
203
|
const settings = readJsonConfig2(SETTINGS_FILE) || {};
|
|
207
204
|
if (!settings.env)
|
|
208
205
|
settings.env = {};
|
|
@@ -250,11 +247,11 @@ class ClaudeCodeConfigManager {
|
|
|
250
247
|
clearModelEnv(settings.env);
|
|
251
248
|
}
|
|
252
249
|
writeJsonConfig(SETTINGS_FILE, settings);
|
|
253
|
-
const { setPrimaryApiKey, addCompletedOnboarding } = await import('./
|
|
250
|
+
const { setPrimaryApiKey, addCompletedOnboarding } = await import('./codex.mjs').then(function (n) { return n.ag; });
|
|
254
251
|
setPrimaryApiKey();
|
|
255
252
|
addCompletedOnboarding();
|
|
256
253
|
if (shouldRestartCcr) {
|
|
257
|
-
const { runCcrRestart } = await import('./
|
|
254
|
+
const { runCcrRestart } = await import('./commands2.mjs');
|
|
258
255
|
await runCcrRestart();
|
|
259
256
|
}
|
|
260
257
|
} catch (error) {
|
|
@@ -3,7 +3,7 @@ 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.CGTmRqsu.mjs';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:process';
|
|
9
9
|
import 'node:url';
|
|
@@ -18,16 +18,13 @@ import 'smol-toml';
|
|
|
18
18
|
import './fs-operations.mjs';
|
|
19
19
|
import 'node:crypto';
|
|
20
20
|
import 'node:fs/promises';
|
|
21
|
-
import './json-config.mjs';
|
|
22
21
|
import './codex.mjs';
|
|
23
22
|
import 'ora';
|
|
24
23
|
import 'semver';
|
|
25
24
|
import 'tinyexec';
|
|
26
|
-
import './claude-config.mjs';
|
|
27
25
|
import './platform.mjs';
|
|
28
26
|
import './prompts.mjs';
|
|
29
27
|
import './package.mjs';
|
|
30
|
-
import '../shared/ccjk.DwDtZ5cK.mjs';
|
|
31
28
|
import 'node:child_process';
|
|
32
29
|
import 'inquirer-toggle';
|
|
33
30
|
|
|
@@ -191,7 +188,7 @@ ${i18n.t("multi-config:addingNewProfile")}`));
|
|
|
191
188
|
]);
|
|
192
189
|
let modelConfig = null;
|
|
193
190
|
if (selectedProvider === "custom") {
|
|
194
|
-
const { promptCustomModels } = await import('./
|
|
191
|
+
const { promptCustomModels } = await import('./features.mjs');
|
|
195
192
|
modelConfig = await promptCustomModels();
|
|
196
193
|
}
|
|
197
194
|
const setAsDefault = await promptBoolean({
|
|
@@ -374,7 +371,7 @@ ${i18n.t("multi-config:editingProfile", { name: selectedProfile.name })}`));
|
|
|
374
371
|
]);
|
|
375
372
|
let modelConfig = null;
|
|
376
373
|
if (selectedProfile.authType !== "ccr_proxy") {
|
|
377
|
-
const { promptCustomModels } = await import('./
|
|
374
|
+
const { promptCustomModels } = await import('./features.mjs');
|
|
378
375
|
modelConfig = await promptCustomModels(
|
|
379
376
|
selectedProfile.primaryModel,
|
|
380
377
|
selectedProfile.defaultHaikuModel,
|
|
@@ -501,7 +498,7 @@ ${i18n.t("multi-config:copyingProfile", { name: selectedProfile.name })}`));
|
|
|
501
498
|
const answers = await inquirer.prompt(questions);
|
|
502
499
|
let modelConfig = null;
|
|
503
500
|
if (selectedProfile.authType !== "ccr_proxy") {
|
|
504
|
-
const { promptCustomModels } = await import('./
|
|
501
|
+
const { promptCustomModels } = await import('./features.mjs');
|
|
505
502
|
modelConfig = await promptCustomModels(
|
|
506
503
|
selectedProfile.primaryModel,
|
|
507
504
|
selectedProfile.defaultHaikuModel,
|