ccjk 2.0.10 β 2.0.13
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/README.md +42 -2
- package/dist/chunks/claude-code-config-manager.mjs +9 -7
- package/dist/chunks/claude-code-incremental-manager.mjs +3 -1
- package/dist/chunks/codex-config-switch.mjs +5 -3
- package/dist/chunks/codex-provider-manager.mjs +3 -1
- package/dist/chunks/codex-uninstaller.mjs +8 -6
- package/dist/chunks/commands.mjs +3 -1
- package/dist/chunks/features.mjs +14 -12
- package/dist/chunks/plugin-recommendation.mjs +22 -2
- package/dist/chunks/simple-config.mjs +703 -253
- package/dist/chunks/skills-sync.mjs +5 -4
- package/dist/cli.mjs +722 -60
- package/dist/i18n/locales/en/codex.json +4 -1
- package/dist/i18n/locales/en/hooksSync.json +28 -6
- package/dist/i18n/locales/en/menu.json +61 -0
- package/dist/i18n/locales/en/updater.json +2 -1
- package/dist/i18n/locales/zh-CN/codex.json +4 -1
- package/dist/i18n/locales/zh-CN/hooksSync.json +26 -4
- package/dist/i18n/locales/zh-CN/menu.json +61 -0
- package/dist/i18n/locales/zh-CN/updater.json +1 -0
- package/dist/index.d.mts +99 -8
- package/dist/index.d.ts +99 -8
- package/dist/index.mjs +12 -10
- package/package.json +28 -24
package/README.md
CHANGED
|
@@ -102,6 +102,39 @@ claude
|
|
|
102
102
|
|
|
103
103
|
## β¨ Core Features
|
|
104
104
|
|
|
105
|
+
### π― Simplified 8-Category Menu (v2.0.12)
|
|
106
|
+
|
|
107
|
+
Navigate CCJK features with our streamlined menu structure:
|
|
108
|
+
|
|
109
|
+
| Category | Features |
|
|
110
|
+
|----------|----------|
|
|
111
|
+
| π Quick Start | Initialization, Updates, Health Check |
|
|
112
|
+
| βοΈ Config Center | API, Permissions, MCP, Context Management |
|
|
113
|
+
| π οΈ Tool Management | Multi-tool Support, Version Check |
|
|
114
|
+
| π¦ Extension Market | Plugins, Skills, Workflows |
|
|
115
|
+
| π Code Quality | Audit, Interview-Driven Development |
|
|
116
|
+
| π₯ Team Collaboration | Team Features, Session Management |
|
|
117
|
+
| π Analytics | Usage Analysis, Config Scanning |
|
|
118
|
+
| ποΈ Uninstall & Cleanup | Uninstall Tools |
|
|
119
|
+
|
|
120
|
+
### π Context Management (NEW in v2.0.12)
|
|
121
|
+
|
|
122
|
+
Intelligently manage project context and CLAUDE.md rules:
|
|
123
|
+
|
|
124
|
+
- **Auto Detection** - Project type, framework, package manager
|
|
125
|
+
- **Smart Recommendations** - Coding style, testing, security rules
|
|
126
|
+
- **Context File Management** - Global/Project/Local levels
|
|
127
|
+
- **Export Project Knowledge** - Generate complete knowledge base
|
|
128
|
+
|
|
129
|
+
**Supported Frameworks:** Node.js, Python, Rust, Go, Java, .NET, Ruby, PHP
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Context management commands
|
|
133
|
+
ccjk context detect # Auto-detect project context
|
|
134
|
+
ccjk context recommend # Get smart recommendations
|
|
135
|
+
ccjk context export # Export project knowledge
|
|
136
|
+
```
|
|
137
|
+
|
|
105
138
|
### π NEW in v2.0.9: Multi-Dimensional Cloud Sync System
|
|
106
139
|
|
|
107
140
|
**Sync your configurations across devices and teams!**
|
|
@@ -277,9 +310,16 @@ npx ccjk init --provider minimax --api-key YOUR_KEY
|
|
|
277
310
|
|
|
278
311
|
## πΊοΈ Roadmap
|
|
279
312
|
|
|
280
|
-
### β
Recently Completed (v2.0.
|
|
313
|
+
### β
Recently Completed (v2.0.12)
|
|
314
|
+
|
|
315
|
+
#### π― Simplified 8-Category Menu System
|
|
316
|
+
- **Streamlined Navigation** - 8 intuitive categories for all features
|
|
317
|
+
- **Context Management** - Auto-detect project type, framework, package manager
|
|
318
|
+
- **Smart Recommendations** - AI-powered coding style, testing, security rules
|
|
319
|
+
- **Knowledge Export** - Generate complete project knowledge base
|
|
320
|
+
- **Status**: β
**COMPLETED** - Full i18n support, multi-framework detection
|
|
281
321
|
|
|
282
|
-
#### βοΈ Multi-Dimensional Cloud Sync System
|
|
322
|
+
#### βοΈ Multi-Dimensional Cloud Sync System (v2.0.9)
|
|
283
323
|
- **Skills Cloud Sync** - Bidirectional sync with 4 conflict resolution strategies
|
|
284
324
|
- **CLAUDE.md Sync** - Template marketplace with 9 project templates
|
|
285
325
|
- **Agents Sync** - 6 pre-built agent templates with version management
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
2
|
import { join } from 'pathe';
|
|
3
|
-
import {
|
|
3
|
+
import { a3 as ZCF_CONFIG_FILE, a2 as ZCF_CONFIG_DIR, cZ as ensureDir, dn as readDefaultTomlConfig, dp as createDefaultTomlConfig, c_ as exists, d4 as readJsonConfig, dq as writeTomlConfig, D as SETTINGS_FILE, dr as clearModelEnv, ds as copyFile } from './simple-config.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:process';
|
|
6
6
|
import 'ansis';
|
|
@@ -13,12 +13,14 @@ import 'node:url';
|
|
|
13
13
|
import 'inquirer-toggle';
|
|
14
14
|
import 'ora';
|
|
15
15
|
import 'tinyexec';
|
|
16
|
+
import 'node:path';
|
|
16
17
|
import 'semver';
|
|
17
18
|
import 'node:fs/promises';
|
|
18
19
|
import 'fs-extra';
|
|
19
20
|
import 'trash';
|
|
20
21
|
import 'i18next';
|
|
21
22
|
import 'i18next-fs-backend';
|
|
23
|
+
import 'node:crypto';
|
|
22
24
|
|
|
23
25
|
class ClaudeCodeConfigManager {
|
|
24
26
|
static CONFIG_FILE = ZCF_CONFIG_FILE;
|
|
@@ -185,15 +187,15 @@ class ClaudeCodeConfigManager {
|
|
|
185
187
|
* Apply profile settings to Claude Code runtime
|
|
186
188
|
*/
|
|
187
189
|
static async applyProfileSettings(profile) {
|
|
188
|
-
const { ensureI18nInitialized, i18n } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
190
|
+
const { ensureI18nInitialized, i18n } = await import('./simple-config.mjs').then(function (n) { return n.dA; });
|
|
189
191
|
ensureI18nInitialized();
|
|
190
192
|
try {
|
|
191
193
|
if (!profile) {
|
|
192
|
-
const { switchToOfficialLogin } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
194
|
+
const { switchToOfficialLogin } = await import('./simple-config.mjs').then(function (n) { return n.dE; });
|
|
193
195
|
switchToOfficialLogin();
|
|
194
196
|
return;
|
|
195
197
|
}
|
|
196
|
-
const { readJsonConfig: readJsonConfig2, writeJsonConfig } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
198
|
+
const { readJsonConfig: readJsonConfig2, writeJsonConfig } = await import('./simple-config.mjs').then(function (n) { return n.dC; });
|
|
197
199
|
const settings = readJsonConfig2(SETTINGS_FILE) || {};
|
|
198
200
|
if (!settings.env)
|
|
199
201
|
settings.env = {};
|
|
@@ -206,7 +208,7 @@ class ClaudeCodeConfigManager {
|
|
|
206
208
|
settings.env.ANTHROPIC_AUTH_TOKEN = profile.apiKey;
|
|
207
209
|
delete settings.env.ANTHROPIC_API_KEY;
|
|
208
210
|
} else if (profile.authType === "ccr_proxy") {
|
|
209
|
-
const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
211
|
+
const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.dF; });
|
|
210
212
|
const ccrConfig = readCcrConfig();
|
|
211
213
|
if (!ccrConfig) {
|
|
212
214
|
throw new Error(i18n.t("ccr:ccrNotConfigured") || "CCR proxy configuration not found");
|
|
@@ -241,7 +243,7 @@ class ClaudeCodeConfigManager {
|
|
|
241
243
|
clearModelEnv(settings.env);
|
|
242
244
|
}
|
|
243
245
|
writeJsonConfig(SETTINGS_FILE, settings);
|
|
244
|
-
const { setPrimaryApiKey, addCompletedOnboarding } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
246
|
+
const { setPrimaryApiKey, addCompletedOnboarding } = await import('./simple-config.mjs').then(function (n) { return n.dD; });
|
|
245
247
|
setPrimaryApiKey();
|
|
246
248
|
addCompletedOnboarding();
|
|
247
249
|
if (shouldRestartCcr) {
|
|
@@ -602,7 +604,7 @@ class ClaudeCodeConfigManager {
|
|
|
602
604
|
*/
|
|
603
605
|
static async syncCcrProfile() {
|
|
604
606
|
try {
|
|
605
|
-
const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
607
|
+
const { readCcrConfig } = await import('./simple-config.mjs').then(function (n) { return n.dF; });
|
|
606
608
|
const ccrConfig = readCcrConfig();
|
|
607
609
|
if (!ccrConfig) {
|
|
608
610
|
await this.ensureCcrProfileExists(ccrConfig);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ansis from 'ansis';
|
|
2
2
|
import inquirer from 'inquirer';
|
|
3
|
-
import {
|
|
3
|
+
import { cJ as ensureI18nInitialized, i as i18n, cV as addNumbersToChoices, dm as validateApiKey, cO as promptBoolean } from './simple-config.mjs';
|
|
4
4
|
import { ClaudeCodeConfigManager } from './claude-code-config-manager.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:process';
|
|
@@ -14,12 +14,14 @@ import 'node:url';
|
|
|
14
14
|
import 'inquirer-toggle';
|
|
15
15
|
import 'ora';
|
|
16
16
|
import 'tinyexec';
|
|
17
|
+
import 'node:path';
|
|
17
18
|
import 'semver';
|
|
18
19
|
import 'node:fs/promises';
|
|
19
20
|
import 'fs-extra';
|
|
20
21
|
import 'trash';
|
|
21
22
|
import 'i18next';
|
|
22
23
|
import 'i18next-fs-backend';
|
|
24
|
+
import 'node:crypto';
|
|
23
25
|
|
|
24
26
|
function getAuthTypeLabel(authType) {
|
|
25
27
|
ensureI18nInitialized();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ansis from 'ansis';
|
|
2
2
|
import inquirer from 'inquirer';
|
|
3
|
-
import {
|
|
3
|
+
import { cJ as ensureI18nInitialized, be as detectConfigManagementMode, i as i18n, cV as addNumbersToChoices, cO as promptBoolean, d4 as readJsonConfig, J as CODEX_AUTH_FILE } from './simple-config.mjs';
|
|
4
4
|
import { deleteProviders, addProviderToExisting, editExistingProvider } from './codex-provider-manager.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:process';
|
|
@@ -14,12 +14,14 @@ import 'node:url';
|
|
|
14
14
|
import 'inquirer-toggle';
|
|
15
15
|
import 'ora';
|
|
16
16
|
import 'tinyexec';
|
|
17
|
+
import 'node:path';
|
|
17
18
|
import 'semver';
|
|
18
19
|
import 'node:fs/promises';
|
|
19
20
|
import 'fs-extra';
|
|
20
21
|
import 'trash';
|
|
21
22
|
import 'i18next';
|
|
22
23
|
import 'i18next-fs-backend';
|
|
24
|
+
import 'node:crypto';
|
|
23
25
|
|
|
24
26
|
async function configureIncrementalManagement() {
|
|
25
27
|
ensureI18nInitialized();
|
|
@@ -168,7 +170,7 @@ async function handleAddProvider() {
|
|
|
168
170
|
defaultValue: true
|
|
169
171
|
});
|
|
170
172
|
if (setAsDefault) {
|
|
171
|
-
const { switchToProvider } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
173
|
+
const { switchToProvider } = await import('./simple-config.mjs').then(function (n) { return n.dH; });
|
|
172
174
|
const switched = await switchToProvider(provider.id);
|
|
173
175
|
if (switched) {
|
|
174
176
|
console.log(ansis.green(i18n.t("multi-config:profileSetAsDefault", { name: provider.name })));
|
|
@@ -363,7 +365,7 @@ ${i18n.t("codex:copyingProvider", { name: provider.name })}`));
|
|
|
363
365
|
defaultValue: false
|
|
364
366
|
});
|
|
365
367
|
if (setAsDefault) {
|
|
366
|
-
const { switchToProvider } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
368
|
+
const { switchToProvider } = await import('./simple-config.mjs').then(function (n) { return n.dH; });
|
|
367
369
|
const switched = await switchToProvider(copiedProvider.id);
|
|
368
370
|
if (switched) {
|
|
369
371
|
console.log(ansis.green(i18n.t("multi-config:profileSetAsDefault", { name: copiedProvider.name })));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cJ as ensureI18nInitialized, b1 as readCodexConfig, i as i18n, aK as backupCodexComplete, bd as writeCodexConfig, bc as writeAuthFile } from './simple-config.mjs';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'ansis';
|
|
@@ -13,12 +13,14 @@ import 'node:url';
|
|
|
13
13
|
import 'inquirer-toggle';
|
|
14
14
|
import 'ora';
|
|
15
15
|
import 'tinyexec';
|
|
16
|
+
import 'node:path';
|
|
16
17
|
import 'semver';
|
|
17
18
|
import 'node:fs/promises';
|
|
18
19
|
import 'fs-extra';
|
|
19
20
|
import 'trash';
|
|
20
21
|
import 'i18next';
|
|
21
22
|
import 'i18next-fs-backend';
|
|
23
|
+
import 'node:crypto';
|
|
22
24
|
|
|
23
25
|
async function addProviderToExisting(provider, apiKey, allowOverwrite = false) {
|
|
24
26
|
ensureI18nInitialized();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pathExists } from 'fs-extra';
|
|
2
2
|
import { join } from 'pathe';
|
|
3
|
-
import {
|
|
3
|
+
import { H as CODEX_DIR, I as CODEX_CONFIG_FILE, d6 as moveToTrash, i as i18n, J as CODEX_AUTH_FILE, K as CODEX_AGENTS_FILE, L as CODEX_PROMPTS_DIR, w as writeFileAtomic } from './simple-config.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:process';
|
|
6
6
|
import 'ansis';
|
|
@@ -14,11 +14,13 @@ import 'node:url';
|
|
|
14
14
|
import 'inquirer-toggle';
|
|
15
15
|
import 'ora';
|
|
16
16
|
import 'tinyexec';
|
|
17
|
+
import 'node:path';
|
|
17
18
|
import 'semver';
|
|
18
19
|
import 'node:fs/promises';
|
|
19
20
|
import 'trash';
|
|
20
21
|
import 'i18next';
|
|
21
22
|
import 'i18next-fs-backend';
|
|
23
|
+
import 'node:crypto';
|
|
22
24
|
|
|
23
25
|
class CodexUninstaller {
|
|
24
26
|
_lang;
|
|
@@ -154,7 +156,7 @@ class CodexUninstaller {
|
|
|
154
156
|
warnings: []
|
|
155
157
|
};
|
|
156
158
|
try {
|
|
157
|
-
const { uninstallCodeTool } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
159
|
+
const { uninstallCodeTool } = await import('./simple-config.mjs').then(function (n) { return n.dI; });
|
|
158
160
|
const success = await uninstallCodeTool("codex");
|
|
159
161
|
if (success) {
|
|
160
162
|
result.removed.push("@openai/codex");
|
|
@@ -185,7 +187,7 @@ class CodexUninstaller {
|
|
|
185
187
|
};
|
|
186
188
|
try {
|
|
187
189
|
if (await pathExists(CODEX_CONFIG_FILE)) {
|
|
188
|
-
const { readFileSync
|
|
190
|
+
const { readFileSync } = await import('node:fs');
|
|
189
191
|
const content = readFileSync(CODEX_CONFIG_FILE, "utf-8");
|
|
190
192
|
const lines = content.split("\n");
|
|
191
193
|
const newLines = [];
|
|
@@ -210,7 +212,7 @@ class CodexUninstaller {
|
|
|
210
212
|
newLines.push(line);
|
|
211
213
|
}
|
|
212
214
|
if (configModified) {
|
|
213
|
-
|
|
215
|
+
writeFileAtomic(CODEX_CONFIG_FILE, newLines.join("\n"));
|
|
214
216
|
result.removedConfigs.push(i18n.t("codex:apiConfigRemoved"));
|
|
215
217
|
}
|
|
216
218
|
result.success = true;
|
|
@@ -264,7 +266,7 @@ class CodexUninstaller {
|
|
|
264
266
|
};
|
|
265
267
|
try {
|
|
266
268
|
if (await pathExists(CODEX_CONFIG_FILE)) {
|
|
267
|
-
const { readFileSync
|
|
269
|
+
const { readFileSync } = await import('node:fs');
|
|
268
270
|
const content = readFileSync(CODEX_CONFIG_FILE, "utf-8");
|
|
269
271
|
const lines = content.split("\n");
|
|
270
272
|
const newLines = [];
|
|
@@ -285,7 +287,7 @@ class CodexUninstaller {
|
|
|
285
287
|
newLines.push(line);
|
|
286
288
|
}
|
|
287
289
|
if (configModified) {
|
|
288
|
-
|
|
290
|
+
writeFileAtomic(CODEX_CONFIG_FILE, newLines.join("\n"));
|
|
289
291
|
result.removedConfigs.push(i18n.t("codex:mcpConfigRemoved"));
|
|
290
292
|
}
|
|
291
293
|
result.success = true;
|
package/dist/chunks/commands.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { exec } from 'node:child_process';
|
|
2
2
|
import { promisify } from 'node:util';
|
|
3
3
|
import ansis from 'ansis';
|
|
4
|
-
import {
|
|
4
|
+
import { cJ as ensureI18nInitialized, i as i18n } from './simple-config.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:process';
|
|
7
7
|
import 'inquirer';
|
|
@@ -13,12 +13,14 @@ import 'node:url';
|
|
|
13
13
|
import 'inquirer-toggle';
|
|
14
14
|
import 'ora';
|
|
15
15
|
import 'tinyexec';
|
|
16
|
+
import 'node:path';
|
|
16
17
|
import 'semver';
|
|
17
18
|
import 'node:fs/promises';
|
|
18
19
|
import 'fs-extra';
|
|
19
20
|
import 'trash';
|
|
20
21
|
import 'i18next';
|
|
21
22
|
import 'i18next-fs-backend';
|
|
23
|
+
import 'node:crypto';
|
|
22
24
|
|
|
23
25
|
const execAsync = promisify(exec);
|
|
24
26
|
async function runCcrUi(apiKey) {
|
package/dist/chunks/features.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ansis from 'ansis';
|
|
2
2
|
import inquirer from 'inquirer';
|
|
3
|
-
import { i as i18n,
|
|
3
|
+
import { i as i18n, cJ as ensureI18nInitialized, ad as SUPPORTED_LANGS, cV as addNumbersToChoices, ae as LANG_LABELS, d7 as updateZcfConfig, dl as changeLanguage, cY as readZcfConfig, cO as promptBoolean, z as openSettingsJson, y as importRecommendedPermissions, x as importRecommendedEnv, bG as applyAiLanguageDirective, du as configureOutputStyle, bE as getExistingModelConfig, bB as updateCustomModel, bC as updateDefaultModel, d1 as isWindows, ay as readMcpConfig, aD as fixWindowsMcpConfig, az as writeMcpConfig, dv as selectMcpServices, aA as backupMcpConfig, dw as getMcpServices, aC as buildMcpServerConfig, aB as mergeMcpServers, cL as isCcrInstalled, cM as installCcr, dx as setupCcrConfiguration, bF as getExistingApiConfig, bI as promptApiConfigurationAction, dy as modifyApiConfigPartially, dm as validateApiKey, bz as configureApi, dz as formatApiKeyDisplay, bH as switchToOfficialLogin } from './simple-config.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:process';
|
|
6
6
|
import 'node:os';
|
|
@@ -13,12 +13,14 @@ import 'node:url';
|
|
|
13
13
|
import 'inquirer-toggle';
|
|
14
14
|
import 'ora';
|
|
15
15
|
import 'tinyexec';
|
|
16
|
+
import 'node:path';
|
|
16
17
|
import 'semver';
|
|
17
18
|
import 'node:fs/promises';
|
|
18
19
|
import 'fs-extra';
|
|
19
20
|
import 'trash';
|
|
20
21
|
import 'i18next';
|
|
21
22
|
import 'i18next-fs-backend';
|
|
23
|
+
import 'node:crypto';
|
|
22
24
|
|
|
23
25
|
async function handleCancellation() {
|
|
24
26
|
ensureI18nInitialized();
|
|
@@ -353,7 +355,7 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
|
|
|
353
355
|
return;
|
|
354
356
|
}
|
|
355
357
|
}
|
|
356
|
-
const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
358
|
+
const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.dG; });
|
|
357
359
|
const aiOutputLang = await selectAiOutputLanguage();
|
|
358
360
|
applyAiLanguageDirective(aiOutputLang);
|
|
359
361
|
updateZcfConfig({ aiOutputLang });
|
|
@@ -386,7 +388,7 @@ async function changeScriptLanguageFeature(currentLang) {
|
|
|
386
388
|
}
|
|
387
389
|
async function configureCodexDefaultModelFeature() {
|
|
388
390
|
ensureI18nInitialized();
|
|
389
|
-
const { readCodexConfig } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
391
|
+
const { readCodexConfig } = await import('./simple-config.mjs').then(function (n) { return n.dH; });
|
|
390
392
|
const existingConfig = readCodexConfig();
|
|
391
393
|
const currentModel = existingConfig?.model;
|
|
392
394
|
if (currentModel) {
|
|
@@ -487,7 +489,7 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
|
|
|
487
489
|
return;
|
|
488
490
|
}
|
|
489
491
|
}
|
|
490
|
-
const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
492
|
+
const { selectAiOutputLanguage } = await import('./simple-config.mjs').then(function (n) { return n.dG; });
|
|
491
493
|
const aiOutputLang = await selectAiOutputLanguage();
|
|
492
494
|
await updateCodexLanguageDirective(aiOutputLang);
|
|
493
495
|
updateZcfConfig({ aiOutputLang });
|
|
@@ -495,14 +497,14 @@ ${ansis.blue(`\u2139 ${i18n.t("configuration:existingLanguageConfig") || "Existi
|
|
|
495
497
|
} else if (option === "systemPrompt") {
|
|
496
498
|
const zcfConfig = readZcfConfig();
|
|
497
499
|
const currentLang = zcfConfig?.aiOutputLang || "English";
|
|
498
|
-
const { runCodexSystemPromptSelection } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
500
|
+
const { runCodexSystemPromptSelection } = await import('./simple-config.mjs').then(function (n) { return n.dH; });
|
|
499
501
|
await runCodexSystemPromptSelection();
|
|
500
502
|
await ensureLanguageDirectiveInAgents(currentLang);
|
|
501
503
|
console.log(ansis.green(`\u2714 ${i18n.t("configuration:systemPromptConfigured")}`));
|
|
502
504
|
}
|
|
503
505
|
}
|
|
504
506
|
async function updateCodexModelProvider(modelProvider) {
|
|
505
|
-
const { readCodexConfig, writeCodexConfig, backupCodexConfig, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
507
|
+
const { readCodexConfig, writeCodexConfig, backupCodexConfig, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.dH; });
|
|
506
508
|
const backupPath = backupCodexConfig();
|
|
507
509
|
if (backupPath) {
|
|
508
510
|
console.log(ansis.gray(getBackupMessage(backupPath)));
|
|
@@ -523,7 +525,7 @@ async function updateCodexModelProvider(modelProvider) {
|
|
|
523
525
|
writeCodexConfig(updatedConfig);
|
|
524
526
|
}
|
|
525
527
|
async function ensureLanguageDirectiveInAgents(aiOutputLang) {
|
|
526
|
-
const { readFile,
|
|
528
|
+
const { readFile, writeFileAtomic, exists } = await import('./simple-config.mjs').then(function (n) { return n.dB; });
|
|
527
529
|
const { homedir } = await import('node:os');
|
|
528
530
|
const { join } = await import('pathe');
|
|
529
531
|
const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
|
|
@@ -541,7 +543,7 @@ async function ensureLanguageDirectiveInAgents(aiOutputLang) {
|
|
|
541
543
|
const langLabel = languageLabels[aiOutputLang] || aiOutputLang;
|
|
542
544
|
const hasLanguageDirective = /\*\*Most Important:\s*Always respond in [^*]+\*\*/i.test(content);
|
|
543
545
|
if (!hasLanguageDirective) {
|
|
544
|
-
const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
546
|
+
const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.dH; });
|
|
545
547
|
const backupPath = backupCodexAgents();
|
|
546
548
|
if (backupPath) {
|
|
547
549
|
console.log(ansis.gray(getBackupMessage(backupPath)));
|
|
@@ -553,13 +555,13 @@ async function ensureLanguageDirectiveInAgents(aiOutputLang) {
|
|
|
553
555
|
updatedContent += `
|
|
554
556
|
**Most Important:Always respond in ${langLabel}**
|
|
555
557
|
`;
|
|
556
|
-
|
|
558
|
+
writeFileAtomic(CODEX_AGENTS_FILE, updatedContent);
|
|
557
559
|
console.log(ansis.gray(` ${i18n.t("configuration:addedLanguageDirective")}: ${langLabel}`));
|
|
558
560
|
}
|
|
559
561
|
}
|
|
560
562
|
async function updateCodexLanguageDirective(aiOutputLang) {
|
|
561
|
-
const { readFile,
|
|
562
|
-
const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.
|
|
563
|
+
const { readFile, writeFileAtomic, exists } = await import('./simple-config.mjs').then(function (n) { return n.dB; });
|
|
564
|
+
const { backupCodexAgents, getBackupMessage } = await import('./simple-config.mjs').then(function (n) { return n.dH; });
|
|
563
565
|
const { homedir } = await import('node:os');
|
|
564
566
|
const { join } = await import('pathe');
|
|
565
567
|
const CODEX_AGENTS_FILE = join(homedir(), ".codex", "AGENTS.md");
|
|
@@ -586,7 +588,7 @@ async function updateCodexLanguageDirective(aiOutputLang) {
|
|
|
586
588
|
content += `
|
|
587
589
|
**Most Important:Always respond in ${langLabel}**
|
|
588
590
|
`;
|
|
589
|
-
|
|
591
|
+
writeFileAtomic(CODEX_AGENTS_FILE, content);
|
|
590
592
|
}
|
|
591
593
|
async function configureEnvPermissionFeature() {
|
|
592
594
|
ensureI18nInitialized();
|
|
@@ -1,6 +1,26 @@
|
|
|
1
|
-
import { existsSync, unlinkSync, readFileSync, mkdirSync
|
|
1
|
+
import { existsSync, unlinkSync, readFileSync, mkdirSync } from 'node:fs';
|
|
2
2
|
import { platform, homedir } from 'node:os';
|
|
3
3
|
import { join } from 'pathe';
|
|
4
|
+
import { w as writeFileAtomic } from './simple-config.mjs';
|
|
5
|
+
import 'node:process';
|
|
6
|
+
import 'ansis';
|
|
7
|
+
import 'inquirer';
|
|
8
|
+
import 'smol-toml';
|
|
9
|
+
import 'dayjs';
|
|
10
|
+
import 'node:child_process';
|
|
11
|
+
import 'node:util';
|
|
12
|
+
import 'node:url';
|
|
13
|
+
import 'inquirer-toggle';
|
|
14
|
+
import 'ora';
|
|
15
|
+
import 'tinyexec';
|
|
16
|
+
import 'node:path';
|
|
17
|
+
import 'semver';
|
|
18
|
+
import 'node:fs/promises';
|
|
19
|
+
import 'fs-extra';
|
|
20
|
+
import 'trash';
|
|
21
|
+
import 'i18next';
|
|
22
|
+
import 'i18next-fs-backend';
|
|
23
|
+
import 'node:crypto';
|
|
4
24
|
|
|
5
25
|
const DEFAULT_TIMEOUT$1 = 3e4;
|
|
6
26
|
const DEFAULT_RETRY_ATTEMPTS = 3;
|
|
@@ -423,7 +443,7 @@ class PluginRecommendationService {
|
|
|
423
443
|
request,
|
|
424
444
|
expiresAt: expiresAt.toISOString()
|
|
425
445
|
};
|
|
426
|
-
|
|
446
|
+
writeFileAtomic(CACHE_FILE, JSON.stringify(cached, null, 2), "utf-8");
|
|
427
447
|
} catch (error) {
|
|
428
448
|
console.warn("Failed to cache recommendations:", error);
|
|
429
449
|
}
|