zcf 2.9.9 β 2.9.11
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 +27 -23
- package/dist/chunks/simple-config.mjs +81 -10
- package/dist/cli.mjs +16 -21
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,8 @@ Menu options include:
|
|
|
27
27
|
- `3-7` Configuration management (API/CCR, MCP, Model settings, AI personality, etc.)
|
|
28
28
|
- `R` Claude Code Router management (enhanced in v2.8.1)
|
|
29
29
|
- `U` ccusage - Claude Code usage analysis
|
|
30
|
-
-
|
|
30
|
+
- `L` CCometixLine - High-performance statusline tool with Git integration and real-time usage tracking (v2.9.9+ new)
|
|
31
|
+
- `+` Check updates - Check and update Claude Code, CCR and CCometixLine versions (v2.9.9+ enhanced)
|
|
31
32
|
- More features...
|
|
32
33
|
|
|
33
34
|
### Or, use direct commands:
|
|
@@ -75,16 +76,6 @@ After installation, use `/bmad-init` to initialize the BMad workflow in your pro
|
|
|
75
76
|
- **Easy Management**: Interactive menu for CCR configuration and service control
|
|
76
77
|
- **Auto Updates**: Automatic version checking and updates for CCR and Claude Code (v2.8.1+)
|
|
77
78
|
|
|
78
|
-
#### π CCometixLine Support (Status Bar Tool) (v2.10.0+ New)
|
|
79
|
-
|
|
80
|
-
[CCometixLine](https://github.com/Haleclipse/CCometixLine) is a high-performance Rust-based statusline tool that provides:
|
|
81
|
-
|
|
82
|
-
- **Real-time Usage Tracking**: Monitor Claude Code API usage in real-time
|
|
83
|
-
- **Git Integration**: Display Git status and branch information
|
|
84
|
-
- **Status Line Display**: Native integration with your terminal statusline
|
|
85
|
-
- **Performance Optimized**: Built with Rust for minimal resource usage
|
|
86
|
-
- **Auto Updates**: Included in ZCF's update checking system
|
|
87
|
-
|
|
88
79
|
To access CCR features:
|
|
89
80
|
|
|
90
81
|
```bash
|
|
@@ -93,14 +84,6 @@ npx zcf ccr # Open CCR management menu
|
|
|
93
84
|
npx zcf β select R
|
|
94
85
|
```
|
|
95
86
|
|
|
96
|
-
Check for updates (v2.8.1+, CCometixLine support v2.10.0+):
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
npx zcf check-updates # Check and update Claude Code, CCR and CCometixLine to latest versions
|
|
100
|
-
# or
|
|
101
|
-
npx zcf β select +
|
|
102
|
-
```
|
|
103
|
-
|
|
104
87
|
CCR menu options:
|
|
105
88
|
|
|
106
89
|
- Initialize CCR - Install and configure CCR with preset providers
|
|
@@ -110,7 +93,27 @@ CCR menu options:
|
|
|
110
93
|
|
|
111
94
|
After CCR setup, ZCF automatically configures Claude Code to use CCR as the API proxy.
|
|
112
95
|
|
|
113
|
-
|
|
96
|
+
**Important Notice for v2.9.9 Users**: If you previously installed CCometixLine using ZCF v2.9.9, please rerun the installation process to ensure that the CCometixLine configuration is correctly added. Run `npx zcf` -> `Select L` -> `Select 1` to add the CCometixLine configuration.
|
|
97
|
+
|
|
98
|
+
#### π CCometixLine Support (Status Bar Tool) (v2.9.9+ New)
|
|
99
|
+
|
|
100
|
+
[CCometixLine](https://github.com/Haleclipse/CCometixLine) is a high-performance Rust-based statusline tool that provides:
|
|
101
|
+
|
|
102
|
+
- **Real-time Usage Tracking**: Monitor Claude Code API usage in real-time
|
|
103
|
+
- **Git Integration**: Display Git status and branch information
|
|
104
|
+
- **Status Line Display**: Native integration with your terminal statusline
|
|
105
|
+
- **Performance Optimized**: Built with Rust for minimal resource usage
|
|
106
|
+
- **Auto Updates**: Included in ZCF's update checking system
|
|
107
|
+
|
|
108
|
+
> **Important Note for v2.9.9 Users**: If you have previously used ZCF v2.9.9 to set up your environment, please re-run the initialization process to ensure CCometixLine configuration is properly added. Run `npx zcf` and select the appropriate setup option to update your configuration with CCometixLine support.
|
|
109
|
+
|
|
110
|
+
#### π Check for updates (v2.8.1+, CCometixLine support v2.9.9+):
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npx zcf check-updates # Check and update Claude Code, CCR and CCometixLine to latest versions
|
|
114
|
+
# or
|
|
115
|
+
npx zcf β select +
|
|
116
|
+
```
|
|
114
117
|
|
|
115
118
|
### Setup Process
|
|
116
119
|
|
|
@@ -205,13 +208,14 @@ Select function:
|
|
|
205
208
|
7. Import recommended environment variables and permissions - Import privacy protection environment variables and system permissions
|
|
206
209
|
|
|
207
210
|
--------- Other Tools ----------
|
|
208
|
-
R. CCR
|
|
209
|
-
U.
|
|
210
|
-
L. CCometixLine - High-performance statusline tool with Git integration and real-time usage tracking
|
|
211
|
+
R. CCR - Claude Code Router management
|
|
212
|
+
U. ccusage - Claude Code usage analysis
|
|
213
|
+
L. CCometixLine - High-performance statusline tool with Git integration and real-time usage tracking
|
|
211
214
|
|
|
212
215
|
------------ ZCF ------------
|
|
213
216
|
0. Select display language / ζ΄ζΉζΎη€Ίθ―θ¨ - Change ZCF interface language
|
|
214
217
|
-. Clear preference cache - Clear preference language and other caches
|
|
218
|
+
+. Check updates - Check and update Claude Code, CCR and CCometixLine versions
|
|
215
219
|
Q. Exit
|
|
216
220
|
|
|
217
221
|
Enter your choice: _
|
|
@@ -15,7 +15,7 @@ import { promisify as promisify$1 } from 'node:util';
|
|
|
15
15
|
import { homedir, platform } from 'node:os';
|
|
16
16
|
import { join as join$1 } from 'node:path';
|
|
17
17
|
|
|
18
|
-
const version = "2.9.
|
|
18
|
+
const version = "2.9.11";
|
|
19
19
|
const homepage = "https://github.com/UfoMiao/zcf";
|
|
20
20
|
|
|
21
21
|
const common$1 = {
|
|
@@ -131,7 +131,9 @@ const configuration$1 = {
|
|
|
131
131
|
currentModel: "\u5F53\u524D\u6A21\u578B",
|
|
132
132
|
modifyModel: "\u662F\u5426\u4FEE\u6539\u6A21\u578B\u914D\u7F6E\uFF1F",
|
|
133
133
|
keepModel: "\u4FDD\u6301\u5F53\u524D\u6A21\u578B\u914D\u7F6E",
|
|
134
|
-
defaultModelOption: "\u9ED8\u8BA4\
|
|
134
|
+
defaultModelOption: "\u9ED8\u8BA4 - \u8BA9 Claude Code \u81EA\u52A8\u9009\u62E9",
|
|
135
|
+
opusModelOption: "Opus - \u53EA\u7528opus\uFF0Ctoken\u6D88\u8017\u9AD8\uFF0C\u614E\u7528",
|
|
136
|
+
opusPlanModelOption: "OpusPlan - Opus\u505A\u8BA1\u5212\uFF0Csonnet\u7F16\u5199\u4EE3\u7801\uFF0C\u63A8\u8350",
|
|
135
137
|
modelConfigured: "\u9ED8\u8BA4\u6A21\u578B\u5DF2\u914D\u7F6E",
|
|
136
138
|
// AI memory configuration
|
|
137
139
|
selectMemoryOption: "\u9009\u62E9\u914D\u7F6E\u9009\u9879",
|
|
@@ -458,6 +460,10 @@ const cometixMessages$1 = {
|
|
|
458
460
|
cometixInstallSuccess: "CCometixLine \u5B89\u88C5\u6210\u529F",
|
|
459
461
|
cometixInstallFailed: "\u5B89\u88C5 CCometixLine \u5931\u8D25",
|
|
460
462
|
cometixAlreadyInstalled: "CCometixLine \u5DF2\u5B89\u88C5",
|
|
463
|
+
statusLineConfigured: "Claude Code \u72B6\u6001\u680F\u914D\u7F6E\u5DF2\u8BBE\u7F6E",
|
|
464
|
+
statusLineConfigFailed: "\u72B6\u6001\u680F\u914D\u7F6E\u5931\u8D25",
|
|
465
|
+
statusLineManualConfig: "\u8BF7\u624B\u52A8\u6DFB\u52A0\u72B6\u6001\u680F\u914D\u7F6E\u5230 Claude Code \u8BBE\u7F6E\u4E2D",
|
|
466
|
+
statusLineAlreadyConfigured: "Claude Code \u72B6\u6001\u680F\u914D\u7F6E\u5DF2\u5B58\u5728",
|
|
461
467
|
// Installation prompt in init
|
|
462
468
|
installCometixPrompt: "\u662F\u5426\u5B89\u88C5 CCometixLine - \u57FA\u4E8E Rust \u7684\u9AD8\u6027\u80FD Claude Code \u72B6\u6001\u680F\u5DE5\u5177\uFF0C\u96C6\u6210 Git \u4FE1\u606F\u548C\u5B9E\u65F6\u4F7F\u7528\u91CF\u8DDF\u8E2A\uFF1F",
|
|
463
469
|
cometixSkipped: "CCometixLine \u5B89\u88C5\u5DF2\u8DF3\u8FC7",
|
|
@@ -633,7 +639,9 @@ const configuration = {
|
|
|
633
639
|
currentModel: "Current model",
|
|
634
640
|
modifyModel: "Modify model configuration?",
|
|
635
641
|
keepModel: "Keeping existing model configuration",
|
|
636
|
-
defaultModelOption: "Default
|
|
642
|
+
defaultModelOption: "Default - Let Claude Code choose",
|
|
643
|
+
opusModelOption: "Opus - Only use opus, high token consumption, use with caution",
|
|
644
|
+
opusPlanModelOption: "OpusPlan - Use Opus for planning, write code with sonnet, recommended",
|
|
637
645
|
modelConfigured: "Default model configured",
|
|
638
646
|
// AI memory configuration
|
|
639
647
|
selectMemoryOption: "Select configuration option",
|
|
@@ -960,6 +968,10 @@ const cometixMessages = {
|
|
|
960
968
|
cometixInstallSuccess: "CCometixLine installed successfully",
|
|
961
969
|
cometixInstallFailed: "Failed to install CCometixLine",
|
|
962
970
|
cometixAlreadyInstalled: "CCometixLine is already installed",
|
|
971
|
+
statusLineConfigured: "Claude Code statusLine configured",
|
|
972
|
+
statusLineConfigFailed: "Failed to configure statusLine",
|
|
973
|
+
statusLineManualConfig: "Please manually add statusLine configuration to Claude Code settings",
|
|
974
|
+
statusLineAlreadyConfigured: "Claude Code statusLine already configured",
|
|
963
975
|
// Installation prompt in init
|
|
964
976
|
installCometixPrompt: "Install CCometixLine - High-performance Claude Code statusline tool with Git integration and real-time usage tracking?",
|
|
965
977
|
cometixSkipped: "CCometixLine installation skipped",
|
|
@@ -2944,14 +2956,14 @@ async function selectCcrPreset(scriptLang) {
|
|
|
2944
2956
|
}
|
|
2945
2957
|
try {
|
|
2946
2958
|
const choices = [
|
|
2947
|
-
...presets.map((p, index) => ({
|
|
2948
|
-
name: `${index + 1}. ${p.name}`,
|
|
2949
|
-
value: p
|
|
2950
|
-
})),
|
|
2951
2959
|
{
|
|
2952
|
-
name:
|
|
2960
|
+
name: `1. ${i18n.ccr.skipOption}`,
|
|
2953
2961
|
value: "skip"
|
|
2954
|
-
}
|
|
2962
|
+
},
|
|
2963
|
+
...presets.map((p, index) => ({
|
|
2964
|
+
name: `${index + 2}. ${p.name}`,
|
|
2965
|
+
value: p
|
|
2966
|
+
}))
|
|
2955
2967
|
];
|
|
2956
2968
|
const { preset } = await inquirer.prompt({
|
|
2957
2969
|
type: "list",
|
|
@@ -3163,6 +3175,41 @@ const COMETIX_COMMANDS = {
|
|
|
3163
3175
|
PRINT_CONFIG: `${COMETIX_COMMAND_NAME} --print`
|
|
3164
3176
|
};
|
|
3165
3177
|
|
|
3178
|
+
function getPlatformStatusLineConfig() {
|
|
3179
|
+
return {
|
|
3180
|
+
type: "command",
|
|
3181
|
+
command: isWindows() ? "%USERPROFILE%\\.claude\\ccline\\ccline.exe" : "~/.claude/ccline/ccline",
|
|
3182
|
+
padding: 0
|
|
3183
|
+
};
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3186
|
+
function addCCometixLineConfig() {
|
|
3187
|
+
try {
|
|
3188
|
+
const statusLineConfig = getPlatformStatusLineConfig();
|
|
3189
|
+
let settings = {};
|
|
3190
|
+
if (exists(SETTINGS_FILE)) {
|
|
3191
|
+
settings = readJsonConfig(SETTINGS_FILE) || {};
|
|
3192
|
+
}
|
|
3193
|
+
settings.statusLine = statusLineConfig;
|
|
3194
|
+
writeJsonConfig(SETTINGS_FILE, settings);
|
|
3195
|
+
return true;
|
|
3196
|
+
} catch (error) {
|
|
3197
|
+
console.error("Failed to add CCometixLine configuration:", error);
|
|
3198
|
+
return false;
|
|
3199
|
+
}
|
|
3200
|
+
}
|
|
3201
|
+
function hasCCometixLineConfig() {
|
|
3202
|
+
try {
|
|
3203
|
+
if (!exists(SETTINGS_FILE)) {
|
|
3204
|
+
return false;
|
|
3205
|
+
}
|
|
3206
|
+
const settings = readJsonConfig(SETTINGS_FILE);
|
|
3207
|
+
return !!settings?.statusLine?.command?.includes("ccline");
|
|
3208
|
+
} catch (error) {
|
|
3209
|
+
return false;
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3166
3213
|
const execAsync = promisify$1(exec$2);
|
|
3167
3214
|
async function isCometixLineInstalled() {
|
|
3168
3215
|
try {
|
|
@@ -3177,12 +3224,36 @@ async function installCometixLine(scriptLang) {
|
|
|
3177
3224
|
const isInstalled = await isCometixLineInstalled();
|
|
3178
3225
|
if (isInstalled) {
|
|
3179
3226
|
console.log(ansis.green(`\u2714 ${i18n.cometix.cometixAlreadyInstalled}`));
|
|
3227
|
+
try {
|
|
3228
|
+
console.log(ansis.blue(`${i18n.cometix.installingOrUpdating}`));
|
|
3229
|
+
await execAsync(COMETIX_COMMANDS.INSTALL);
|
|
3230
|
+
console.log(ansis.green(`\u2714 ${i18n.cometix.installUpdateSuccess}`));
|
|
3231
|
+
} catch (error) {
|
|
3232
|
+
console.warn(ansis.yellow(`\u26A0 ${i18n.cometix.installUpdateFailed}: ${error}`));
|
|
3233
|
+
}
|
|
3234
|
+
if (!hasCCometixLineConfig()) {
|
|
3235
|
+
try {
|
|
3236
|
+
addCCometixLineConfig();
|
|
3237
|
+
console.log(ansis.green(`\u2714 ${i18n.cometix.statusLineConfigured || "Claude Code statusLine configured"}`));
|
|
3238
|
+
} catch (error) {
|
|
3239
|
+
console.warn(ansis.yellow(`\u26A0 ${i18n.cometix.statusLineConfigFailed || "Failed to configure statusLine"}: ${error}`));
|
|
3240
|
+
}
|
|
3241
|
+
} else {
|
|
3242
|
+
console.log(ansis.blue(`\u2139 ${i18n.cometix.statusLineAlreadyConfigured || "Claude Code statusLine already configured"}`));
|
|
3243
|
+
}
|
|
3180
3244
|
return;
|
|
3181
3245
|
}
|
|
3182
3246
|
try {
|
|
3183
3247
|
console.log(ansis.blue(`${i18n.cometix.installingCometix}`));
|
|
3184
3248
|
await execAsync(COMETIX_COMMANDS.INSTALL);
|
|
3185
3249
|
console.log(ansis.green(`\u2714 ${i18n.cometix.cometixInstallSuccess}`));
|
|
3250
|
+
try {
|
|
3251
|
+
addCCometixLineConfig();
|
|
3252
|
+
console.log(ansis.green(`\u2714 ${i18n.cometix.statusLineConfigured || "Claude Code statusLine configured"}`));
|
|
3253
|
+
} catch (configError) {
|
|
3254
|
+
console.warn(ansis.yellow(`\u26A0 ${i18n.cometix.statusLineConfigFailed || "Failed to configure statusLine"}: ${configError}`));
|
|
3255
|
+
console.log(ansis.blue(`\u{1F4A1} ${i18n.cometix.statusLineManualConfig || "Please manually add statusLine configuration to Claude Code settings"}`));
|
|
3256
|
+
}
|
|
3186
3257
|
} catch (error) {
|
|
3187
3258
|
console.error(ansis.red(`\u2717 ${i18n.cometix.cometixInstallFailed}: ${error}`));
|
|
3188
3259
|
throw error;
|
|
@@ -3564,4 +3635,4 @@ async function openSettingsJson() {
|
|
|
3564
3635
|
}
|
|
3565
3636
|
}
|
|
3566
3637
|
|
|
3567
|
-
export { readCcrConfig as $, AI_OUTPUT_LANGUAGES as A, writeMcpConfig as B, CLAUDE_DIR as C, backupMcpConfig as D, mergeMcpServers as E, buildMcpServerConfig as F, fixWindowsMcpConfig as G, addCompletedOnboarding as H, I18N as I, getTranslation as J, addNumbersToChoices as K, LEGACY_ZCF_CONFIG_FILE as L, MCP_SERVICES as M, updateZcfConfig as N, readZcfConfig as O, configureAiPersonality as P, isWindows as Q, selectMcpServices as R, SETTINGS_FILE as S, formatApiKeyDisplay as T, modifyApiConfigPartially as U, isCcrInstalled as V, installCcr as W, setupCcrConfiguration as X, validateApiKey as Y, ZCF_CONFIG_FILE as Z, readZcfConfigAsync as _, importRecommendedEnv as a, configureCcrFeature as a0, handleExitPromptError as a1, handleGeneralError as a2, COMETIX_COMMANDS as a3, COMETIX_COMMAND_NAME as a4,
|
|
3638
|
+
export { readCcrConfig as $, AI_OUTPUT_LANGUAGES as A, writeMcpConfig as B, CLAUDE_DIR as C, backupMcpConfig as D, mergeMcpServers as E, buildMcpServerConfig as F, fixWindowsMcpConfig as G, addCompletedOnboarding as H, I18N as I, getTranslation as J, addNumbersToChoices as K, LEGACY_ZCF_CONFIG_FILE as L, MCP_SERVICES as M, updateZcfConfig as N, readZcfConfig as O, configureAiPersonality as P, isWindows as Q, selectMcpServices as R, SETTINGS_FILE as S, formatApiKeyDisplay as T, modifyApiConfigPartially as U, isCcrInstalled as V, installCcr as W, setupCcrConfiguration as X, validateApiKey as Y, ZCF_CONFIG_FILE as Z, readZcfConfigAsync as _, importRecommendedEnv as a, configureCcrFeature as a0, handleExitPromptError as a1, handleGeneralError as a2, COMETIX_COMMANDS as a3, COMETIX_COMMAND_NAME as a4, installCometixLine as a5, displayBanner as a6, selectScriptLanguage as a7, resolveAiOutputLanguage as a8, updatePromptOnly as a9, selectAndInstallWorkflows as aa, version as ab, checkAndUpdateTools as ac, displayBannerWithInfo as ad, prompts as ae, importRecommendedPermissions as b, commandExists as c, cleanupPermissions as d, CLAUDE_MD_FILE as e, ClAUDE_CONFIG_FILE as f, getPlatform as g, SUPPORTED_LANGS as h, init as i, LANG_LABELS as j, isClaudeCodeInstalled as k, installClaudeCode as l, mergeAndCleanPermissions as m, ensureClaudeDir as n, openSettingsJson as o, backupExistingConfig as p, copyConfigFiles as q, configureApi as r, mergeConfigs as s, mergeSettingsFile as t, updateDefaultModel as u, getExistingModelConfig as v, getExistingApiConfig as w, applyAiLanguageDirective as x, getMcpConfigPath as y, readMcpConfig as z };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import ansis from 'ansis';
|
|
4
|
-
import { J as getTranslation, Z as ZCF_CONFIG_FILE, h as SUPPORTED_LANGS, K as addNumbersToChoices, j as LANG_LABELS, N as updateZcfConfig, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, O as readZcfConfig, x as applyAiLanguageDirective, P as configureAiPersonality, v as getExistingModelConfig, u as updateDefaultModel, Q as isWindows, z as readMcpConfig, G as fixWindowsMcpConfig, B as writeMcpConfig, R as selectMcpServices, D as backupMcpConfig, M as MCP_SERVICES, F as buildMcpServerConfig, E as mergeMcpServers, w as getExistingApiConfig, T as formatApiKeyDisplay, H as addCompletedOnboarding, U as modifyApiConfigPartially, V as isCcrInstalled, W as installCcr, X as setupCcrConfiguration, Y as validateApiKey, r as configureApi, _ as readZcfConfigAsync, I as I18N, $ as readCcrConfig, a0 as configureCcrFeature, a1 as handleExitPromptError, a2 as handleGeneralError, a3 as COMETIX_COMMANDS, a4 as COMETIX_COMMAND_NAME, a5 as
|
|
4
|
+
import { J as getTranslation, Z as ZCF_CONFIG_FILE, h as SUPPORTED_LANGS, K as addNumbersToChoices, j as LANG_LABELS, N as updateZcfConfig, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, O as readZcfConfig, x as applyAiLanguageDirective, P as configureAiPersonality, v as getExistingModelConfig, u as updateDefaultModel, Q as isWindows, z as readMcpConfig, G as fixWindowsMcpConfig, B as writeMcpConfig, R as selectMcpServices, D as backupMcpConfig, M as MCP_SERVICES, F as buildMcpServerConfig, E as mergeMcpServers, w as getExistingApiConfig, T as formatApiKeyDisplay, H as addCompletedOnboarding, U as modifyApiConfigPartially, V as isCcrInstalled, W as installCcr, X as setupCcrConfiguration, Y as validateApiKey, r as configureApi, _ as readZcfConfigAsync, I as I18N, $ as readCcrConfig, a0 as configureCcrFeature, a1 as handleExitPromptError, a2 as handleGeneralError, a3 as COMETIX_COMMANDS, a4 as COMETIX_COMMAND_NAME, a5 as installCometixLine, a6 as displayBanner, a7 as selectScriptLanguage, a8 as resolveAiOutputLanguage, a9 as updatePromptOnly, aa as selectAndInstallWorkflows, ab as version, ac as checkAndUpdateTools, ad as displayBannerWithInfo, i as init } from './chunks/simple-config.mjs';
|
|
5
5
|
import inquirer from 'inquirer';
|
|
6
6
|
import { existsSync, unlinkSync } from 'node:fs';
|
|
7
7
|
import { x } from 'tinyexec';
|
|
@@ -239,13 +239,19 @@ async function configureDefaultModelFeature(scriptLang) {
|
|
|
239
239
|
message: i18n.configuration.selectDefaultModel || "Select default model",
|
|
240
240
|
choices: addNumbersToChoices([
|
|
241
241
|
{
|
|
242
|
-
name: i18n.configuration.defaultModelOption || "Default
|
|
242
|
+
name: i18n.configuration.defaultModelOption || "Default - Let Claude Code choose",
|
|
243
243
|
value: "default"
|
|
244
244
|
},
|
|
245
|
-
{
|
|
246
|
-
|
|
245
|
+
{
|
|
246
|
+
name: i18n.configuration.opusModelOption || "Opus - Only use opus, high token consumption, use with caution",
|
|
247
|
+
value: "opus"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: i18n.configuration.opusPlanModelOption || "OpusPlan - Use Opus for planning, write code with sonnet, recommended",
|
|
251
|
+
value: "opusplan"
|
|
252
|
+
}
|
|
247
253
|
]),
|
|
248
|
-
default: existingModel ? ["
|
|
254
|
+
default: existingModel ? ["default", "opus", "opusplan"].indexOf(existingModel) : 0
|
|
249
255
|
});
|
|
250
256
|
if (!model) {
|
|
251
257
|
handleCancellation(scriptLang);
|
|
@@ -259,7 +265,7 @@ async function configureAiMemoryFeature(scriptLang) {
|
|
|
259
265
|
const { option } = await inquirer.prompt({
|
|
260
266
|
type: "list",
|
|
261
267
|
name: "option",
|
|
262
|
-
message: "Select configuration option",
|
|
268
|
+
message: i18n.configuration.selectMemoryOption || "Select configuration option",
|
|
263
269
|
choices: addNumbersToChoices([
|
|
264
270
|
{
|
|
265
271
|
name: i18n.configuration.configureAiLanguage || "Configure AI output language",
|
|
@@ -294,7 +300,7 @@ async function configureAiMemoryFeature(scriptLang) {
|
|
|
294
300
|
return;
|
|
295
301
|
}
|
|
296
302
|
}
|
|
297
|
-
const { selectAiOutputLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.
|
|
303
|
+
const { selectAiOutputLanguage } = await import('./chunks/simple-config.mjs').then(function (n) { return n.ae; });
|
|
298
304
|
const aiOutputLang = await selectAiOutputLanguage(scriptLang, scriptLang);
|
|
299
305
|
applyAiLanguageDirective(aiOutputLang);
|
|
300
306
|
updateZcfConfig({ aiOutputLang });
|
|
@@ -643,17 +649,6 @@ async function showCcrMenu(scriptLang) {
|
|
|
643
649
|
}
|
|
644
650
|
|
|
645
651
|
const execAsync = promisify$1(exec$1);
|
|
646
|
-
async function runCometixInstallOrUpdate(scriptLang) {
|
|
647
|
-
const i18n = getTranslation(scriptLang);
|
|
648
|
-
try {
|
|
649
|
-
console.log(ansis.blue(`${i18n.cometix.installingOrUpdating}`));
|
|
650
|
-
await execAsync(COMETIX_COMMANDS.INSTALL);
|
|
651
|
-
console.log(ansis.green(`\u2714 ${i18n.cometix.installUpdateSuccess}`));
|
|
652
|
-
} catch (error) {
|
|
653
|
-
console.error(ansis.red(`\u2717 ${i18n.cometix.installUpdateFailed}: ${error}`));
|
|
654
|
-
throw error;
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
652
|
async function runCometixPrintConfig(scriptLang) {
|
|
658
653
|
const i18n = getTranslation(scriptLang);
|
|
659
654
|
try {
|
|
@@ -691,7 +686,7 @@ async function showCometixMenu(scriptLang) {
|
|
|
691
686
|
});
|
|
692
687
|
switch (choice) {
|
|
693
688
|
case "1":
|
|
694
|
-
await
|
|
689
|
+
await installCometixLine(scriptLang);
|
|
695
690
|
break;
|
|
696
691
|
case "2":
|
|
697
692
|
await runCometixPrintConfig(scriptLang);
|
|
@@ -1124,8 +1119,8 @@ function customizeHelp(sections) {
|
|
|
1124
1119
|
` ${ansis.cyan("npx zcf ccu monthly --json")}`,
|
|
1125
1120
|
"",
|
|
1126
1121
|
ansis.gray(" # Check and update tools / \u68C0\u67E5\u5E76\u66F4\u65B0\u5DE5\u5177"),
|
|
1127
|
-
` ${ansis.cyan("npx zcf check-updates")} ${ansis.gray("# Update Claude Code and
|
|
1128
|
-
` ${ansis.cyan("npx zcf check")}
|
|
1122
|
+
` ${ansis.cyan("npx zcf check-updates")} ${ansis.gray("# Update Claude Code, CCR and CCometixLine")}`,
|
|
1123
|
+
` ${ansis.cyan("npx zcf check")}`,
|
|
1129
1124
|
"",
|
|
1130
1125
|
ansis.gray(" # Force overwrite with Chinese config / \u5F3A\u5236\u4F7F\u7528\u4E2D\u6587\u914D\u7F6E\u8986\u76D6"),
|
|
1131
1126
|
` ${ansis.cyan("npx zcf --init -c zh-CN -f")}`,
|
package/dist/index.d.mts
CHANGED
|
@@ -107,7 +107,7 @@ declare function backupExistingConfig(): string | null;
|
|
|
107
107
|
declare function copyConfigFiles(lang: SupportedLang, onlyMd?: boolean): void;
|
|
108
108
|
declare function configureApi(apiConfig: ApiConfig | null): ApiConfig | null;
|
|
109
109
|
declare function mergeConfigs(sourceFile: string, targetFile: string): void;
|
|
110
|
-
declare function updateDefaultModel(model: 'opus' | 'sonnet' | 'default'): void;
|
|
110
|
+
declare function updateDefaultModel(model: 'opus' | 'sonnet' | 'opusplan' | 'default'): void;
|
|
111
111
|
/**
|
|
112
112
|
* Merge settings.json intelligently
|
|
113
113
|
* Preserves user's environment variables and custom configurations
|
|
@@ -116,7 +116,7 @@ declare function mergeSettingsFile(templatePath: string, targetPath: string): vo
|
|
|
116
116
|
/**
|
|
117
117
|
* Get existing model configuration from settings.json
|
|
118
118
|
*/
|
|
119
|
-
declare function getExistingModelConfig(): 'opus' | 'sonnet' | 'default' | null;
|
|
119
|
+
declare function getExistingModelConfig(): 'opus' | 'sonnet' | 'opusplan' | 'default' | null;
|
|
120
120
|
/**
|
|
121
121
|
* Get existing API configuration from settings.json
|
|
122
122
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -107,7 +107,7 @@ declare function backupExistingConfig(): string | null;
|
|
|
107
107
|
declare function copyConfigFiles(lang: SupportedLang, onlyMd?: boolean): void;
|
|
108
108
|
declare function configureApi(apiConfig: ApiConfig | null): ApiConfig | null;
|
|
109
109
|
declare function mergeConfigs(sourceFile: string, targetFile: string): void;
|
|
110
|
-
declare function updateDefaultModel(model: 'opus' | 'sonnet' | 'default'): void;
|
|
110
|
+
declare function updateDefaultModel(model: 'opus' | 'sonnet' | 'opusplan' | 'default'): void;
|
|
111
111
|
/**
|
|
112
112
|
* Merge settings.json intelligently
|
|
113
113
|
* Preserves user's environment variables and custom configurations
|
|
@@ -116,7 +116,7 @@ declare function mergeSettingsFile(templatePath: string, targetPath: string): vo
|
|
|
116
116
|
/**
|
|
117
117
|
* Get existing model configuration from settings.json
|
|
118
118
|
*/
|
|
119
|
-
declare function getExistingModelConfig(): 'opus' | 'sonnet' | 'default' | null;
|
|
119
|
+
declare function getExistingModelConfig(): 'opus' | 'sonnet' | 'opusplan' | 'default' | null;
|
|
120
120
|
/**
|
|
121
121
|
* Get existing API configuration from settings.json
|
|
122
122
|
*/
|
package/package.json
CHANGED