zcf 3.1.4 → 3.2.1

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.
@@ -6,7 +6,6 @@
6
6
  "apiKeyDesc": "适用于从 Anthropic Console 获取的 API 密钥",
7
7
  "apiKeyValidation.example": "示例格式: sk-abcdef123456_789xyz",
8
8
  "authTokenDesc": "适用于通过 OAuth 或浏览器登录获取的令牌",
9
- "ccrProxyDesc": "通过 Claude Code Router 使用多个 AI 模型",
10
9
  "configureApi": "选择 API 认证方式",
11
10
  "enterApiKey": "请输入 API Key",
12
11
  "enterApiUrl": "请输入 API URL",
@@ -24,7 +23,7 @@
24
23
  "modifyApiUrl": "修改 API URL",
25
24
  "modifyAuthType": "修改认证类型",
26
25
  "modifyPartialConfig": "修改部分配置",
27
- "selectApiAction": "请选择API处理操作",
26
+
28
27
  "selectApiMode": "请选择 API 配置模式",
29
28
  "selectCustomConfigAction": "请选择自定义配置操作",
30
29
  "selectModifyItems": "请选择要修改的项",
@@ -87,7 +87,6 @@
87
87
  "useOfficialLogin": "使用官方登录",
88
88
  "apiConfigSwitchPrompt": "选择要切换的API配置",
89
89
  "agentsFileNotFound": "AGENTS.md 文件未找到,请先配置系统提示词",
90
- "checkingVersion": "检查版本中...",
91
90
  "currentVersion": "当前版本: v{version}",
92
91
  "latestVersion": "最新版本: v{version}",
93
92
  "confirmUpdate": "将 Codex 更新到最新版本?",
@@ -6,7 +6,6 @@
6
6
  "error": "错误",
7
7
  "complete": "🎉 配置完成!使用 'claude' 命令开始体验。",
8
8
  "none": "无",
9
- "notConfigured": "未配置",
10
9
  "enterChoice": "请输入选项,回车确认(不区分大小写)",
11
10
  "invalidChoice": "无效选择。请输入有效选项。",
12
11
  "goodbye": "👋 感谢使用 ZCF!再见!",
@@ -14,5 +13,6 @@
14
13
  "back": "返回",
15
14
  "inputHidden": "(输入会被隐藏)",
16
15
  "operationFailed": "操作失败",
17
- "backupCreated": "📁 已创建配置备份:{{path}}"
16
+ "backupCreated": "📁 已创建配置备份:{{path}}",
17
+ "current": "当前"
18
18
  }
@@ -16,6 +16,8 @@
16
16
  "services.mcp-deepwiki.name": "DeepWiki",
17
17
  "services.spec-workflow.description": "规范化特性开发工作流程,从需求到实现的系统化方法",
18
18
  "services.spec-workflow.name": "Spec 工作流",
19
+ "services.serena.name": "Serena 助手",
20
+ "services.serena.description": "提供类似 IDE 的语义代码检索与编辑,支持符号级实体提取与关系结构利用;与现有编码代理配合可显著提升标记效率",
19
21
  "apiKeyApprovalFailed": "API密钥批准状态管理失败",
20
22
  "apiKeyPrompt": "请输入 API Key",
21
23
  "primaryApiKeySetFailed": "设置 primaryApiKey 失败"
@@ -0,0 +1,72 @@
1
+ {
2
+ "configsAddedSuccessfully": "API配置添加成功",
3
+ "configsFailed": "API配置添加失败",
4
+ "defaultProfileSet": "已设置默认配置:{{name}}",
5
+ "providerAdded": "已添加提供商:{{name}}",
6
+ "defaultProviderSet": "已设置默认提供商:{{name}}",
7
+ "noClaudeCodeProfilesAvailable": "没有可用的 Claude Code 配置文件",
8
+ "availableClaudeCodeProfiles": "可用的 Claude Code 配置文件",
9
+ "selectClaudeCodeConfiguration": "选择 Claude Code 配置:",
10
+ "cancelled": "已取消操作",
11
+ "successfullySwitchedToOfficial": "成功切换到官方登录",
12
+ "failedToSwitchToOfficial": "切换到官方登录失败:{{error}}",
13
+ "successfullySwitchedToCcr": "成功切换到 CCR 代理",
14
+ "failedToSwitchToCcr": "切换到 CCR 代理失败:{error}",
15
+ "successfullySwitchedToProfile": "成功切换到配置文件:{{name}}",
16
+ "failedToSwitchToProfile": "切换到配置文件失败:{{error}}",
17
+ "incrementalManagementTitle": "📋 Claude Code 配置管理",
18
+ "currentProfileCount": "当前配置数量:{{count}}",
19
+ "currentDefaultProfile": "当前默认配置:{{profile}}",
20
+ "addProfile": "添加配置",
21
+ "editProfile": "编辑配置",
22
+ "deleteProfile": "删除配置",
23
+ "selectAction": "请选择操作",
24
+ "addingNewProfile": "添加新配置",
25
+ "profileNamePrompt": "配置名称(仅限字母、数字、空格、._-)",
26
+ "profileNameRequired": "配置名称不能为空",
27
+ "profileNameInvalid": "配置名称只能包含字母、数字、空格、中划线和下划线",
28
+ "authTypePrompt": "请选择认证类型",
29
+ "apiKeyPrompt": "请输入API密钥",
30
+ "apiKeyRequired": "API密钥不能为空",
31
+ "baseUrlPrompt": "请输入API基础URL",
32
+ "baseUrlRequired": "API基础URL不能为空",
33
+ "baseUrlInvalid": "请输入有效的URL",
34
+ "setAsDefaultPrompt": "是否设为默认配置",
35
+ "authType.api_key": "API Key",
36
+ "authType.auth_token": "Auth Token",
37
+ "authType.ccr_proxy": "CCR 代理",
38
+ "profileAdded": "✔ 已成功添加配置:{{name}}",
39
+ "profileAddFailed": "❌ 添加配置失败:{{error}}",
40
+ "profileDuplicatePrompt": "配置「{{name}}」已经存在于{{source}},是否覆盖?",
41
+ "profileDuplicateSkipped": "已跳过重复的配置",
42
+ "existingConfig": "现有配置",
43
+ "addAnotherProfilePrompt": "是否继续添加 Claude Code 配置?",
44
+ "profileSetAsDefault": "✔ 已将配置 {{name}} 设为默认",
45
+ "profileNotFound": "未找到配置",
46
+ "editingProfile": "编辑配置:{{name}}",
47
+ "profileUpdated": "✔ 已成功更新配置:{{name}}",
48
+ "profileUpdateFailed": "❌ 更新配置失败:{{error}}",
49
+ "selectProfileToEdit": "选择要编辑的配置",
50
+ "selectProfilesToDelete": "选择要删除的配置(多选)",
51
+ "selectAtLeastOne": "请至少选择一个配置",
52
+ "cannotDeleteAll": "不能删除所有配置,至少需要保留一个",
53
+ "cannotDeleteLast": "不能删除最后一个配置",
54
+ "confirmDeleteProfiles": "确认删除以下配置:{{providers}}?",
55
+ "profilesDeleted": "✔ 已成功删除 {{count}} 个配置",
56
+ "profilesDeleteFailed": "❌ 删除配置失败:{{error}}",
57
+ "newDefaultProfile": "ℹ️ 新的默认配置:{{profile}}",
58
+ "settingsApplied": "✔ 设置已生效",
59
+ "failedToApplySettings": "应用设置失败",
60
+ "profileNameNotFound": "未找到名为「{{name}}」的配置",
61
+ "conflictingParams": "不能同时指定 --api-configs 和 --api-configs-file",
62
+ "mustBeArray": "API配置必须是数组格式",
63
+ "mustHaveValidName": "每个配置必须具有有效的名称",
64
+ "invalidAuthType": "无效的认证类型:{{type}}",
65
+ "duplicateName": "重复的配置名称:{{name}}",
66
+ "configApiKeyRequired": "配置 \"{{name}}\" 需要API密钥",
67
+ "ccrProxyReserved": "CCR代理类型为保留类型,不能手动添加(配置:\"{{name}}\")",
68
+ "configProfileAddFailed": "添加配置文件 \"{{name}}\" 失败:{{error}}",
69
+ "providerAddFailed": "添加提供商 \"{{name}}\" 失败:{{error}}",
70
+ "invalidJson": "无效的API配置JSON:{{error}}",
71
+ "fileReadFailed": "读取API配置文件失败:{{error}}"
72
+ }
package/dist/index.d.mts CHANGED
@@ -10,7 +10,11 @@ declare const CODE_TOOL_TYPES: readonly ["claude-code", "codex"];
10
10
  type CodeToolType = (typeof CODE_TOOL_TYPES)[number];
11
11
  declare const DEFAULT_CODE_TOOL_TYPE: CodeToolType;
12
12
  declare const CODE_TOOL_BANNERS: Record<CodeToolType, string>;
13
+ declare const CODE_TOOL_ALIASES: Record<string, CodeToolType>;
13
14
  declare function isCodeToolType(value: any): value is CodeToolType;
15
+ declare const API_DEFAULT_URL = "https://api.anthropic.com";
16
+ declare const API_ENV_KEY = "ANTHROPIC_API_KEY";
17
+ declare function resolveCodeToolType(value: unknown): CodeToolType;
14
18
  declare const SUPPORTED_LANGS: readonly ["zh-CN", "en"];
15
19
  type SupportedLang = (typeof SUPPORTED_LANGS)[number];
16
20
  declare const LANG_LABELS: {
@@ -48,6 +52,8 @@ interface InitOptions {
48
52
  defaultOutputStyle?: string;
49
53
  allLang?: string;
50
54
  installCometixLine?: string | boolean;
55
+ apiConfigs?: string;
56
+ apiConfigsFile?: string;
51
57
  }
52
58
  declare function init(options?: InitOptions): Promise<void>;
53
59
 
@@ -214,5 +220,5 @@ declare function importRecommendedEnv(): Promise<void>;
214
220
  declare function importRecommendedPermissions(): Promise<void>;
215
221
  declare function openSettingsJson(): Promise<void>;
216
222
 
217
- export { AI_OUTPUT_LANGUAGES, CLAUDE_DIR, CLAUDE_MD_FILE, CLAUDE_VSC_CONFIG_FILE, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, cleanupPermissions, commandExists, configureApi, copyConfigFiles, ensureApiKeyApproved, ensureClaudeDir, fixWindowsMcpConfig, getAiOutputLanguageLabel, getExistingApiConfig, getExistingModelConfig, getInstallationStatus, getMcpConfigPath, getPlatform, importRecommendedEnv, importRecommendedPermissions, init, installClaudeCode, isClaudeCodeInstalled, isCodeToolType, isLocalClaudeCodeInstalled, manageApiKeyApproval, mergeAndCleanPermissions, mergeConfigs, mergeMcpServers, mergeSettingsFile, openSettingsJson, promptApiConfigurationAction, readMcpConfig, removeApiKeyFromRejected, removeLocalClaudeCode, setPrimaryApiKey, switchToOfficialLogin, updateCustomModel, updateDefaultModel, writeMcpConfig };
223
+ export { AI_OUTPUT_LANGUAGES, API_DEFAULT_URL, API_ENV_KEY, CLAUDE_DIR, CLAUDE_MD_FILE, CLAUDE_VSC_CONFIG_FILE, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, cleanupPermissions, commandExists, configureApi, copyConfigFiles, ensureApiKeyApproved, ensureClaudeDir, fixWindowsMcpConfig, getAiOutputLanguageLabel, getExistingApiConfig, getExistingModelConfig, getInstallationStatus, getMcpConfigPath, getPlatform, importRecommendedEnv, importRecommendedPermissions, init, installClaudeCode, isClaudeCodeInstalled, isCodeToolType, isLocalClaudeCodeInstalled, manageApiKeyApproval, mergeAndCleanPermissions, mergeConfigs, mergeMcpServers, mergeSettingsFile, openSettingsJson, promptApiConfigurationAction, readMcpConfig, removeApiKeyFromRejected, removeLocalClaudeCode, resolveCodeToolType, setPrimaryApiKey, switchToOfficialLogin, updateCustomModel, updateDefaultModel, writeMcpConfig };
218
224
  export type { AiOutputLanguage, ApiConfig, ClaudeConfiguration, CodeToolType, InstallationStatus, McpServerConfig, McpService, SupportedLang };
package/dist/index.d.ts CHANGED
@@ -10,7 +10,11 @@ declare const CODE_TOOL_TYPES: readonly ["claude-code", "codex"];
10
10
  type CodeToolType = (typeof CODE_TOOL_TYPES)[number];
11
11
  declare const DEFAULT_CODE_TOOL_TYPE: CodeToolType;
12
12
  declare const CODE_TOOL_BANNERS: Record<CodeToolType, string>;
13
+ declare const CODE_TOOL_ALIASES: Record<string, CodeToolType>;
13
14
  declare function isCodeToolType(value: any): value is CodeToolType;
15
+ declare const API_DEFAULT_URL = "https://api.anthropic.com";
16
+ declare const API_ENV_KEY = "ANTHROPIC_API_KEY";
17
+ declare function resolveCodeToolType(value: unknown): CodeToolType;
14
18
  declare const SUPPORTED_LANGS: readonly ["zh-CN", "en"];
15
19
  type SupportedLang = (typeof SUPPORTED_LANGS)[number];
16
20
  declare const LANG_LABELS: {
@@ -48,6 +52,8 @@ interface InitOptions {
48
52
  defaultOutputStyle?: string;
49
53
  allLang?: string;
50
54
  installCometixLine?: string | boolean;
55
+ apiConfigs?: string;
56
+ apiConfigsFile?: string;
51
57
  }
52
58
  declare function init(options?: InitOptions): Promise<void>;
53
59
 
@@ -214,5 +220,5 @@ declare function importRecommendedEnv(): Promise<void>;
214
220
  declare function importRecommendedPermissions(): Promise<void>;
215
221
  declare function openSettingsJson(): Promise<void>;
216
222
 
217
- export { AI_OUTPUT_LANGUAGES, CLAUDE_DIR, CLAUDE_MD_FILE, CLAUDE_VSC_CONFIG_FILE, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, cleanupPermissions, commandExists, configureApi, copyConfigFiles, ensureApiKeyApproved, ensureClaudeDir, fixWindowsMcpConfig, getAiOutputLanguageLabel, getExistingApiConfig, getExistingModelConfig, getInstallationStatus, getMcpConfigPath, getPlatform, importRecommendedEnv, importRecommendedPermissions, init, installClaudeCode, isClaudeCodeInstalled, isCodeToolType, isLocalClaudeCodeInstalled, manageApiKeyApproval, mergeAndCleanPermissions, mergeConfigs, mergeMcpServers, mergeSettingsFile, openSettingsJson, promptApiConfigurationAction, readMcpConfig, removeApiKeyFromRejected, removeLocalClaudeCode, setPrimaryApiKey, switchToOfficialLogin, updateCustomModel, updateDefaultModel, writeMcpConfig };
223
+ export { AI_OUTPUT_LANGUAGES, API_DEFAULT_URL, API_ENV_KEY, CLAUDE_DIR, CLAUDE_MD_FILE, CLAUDE_VSC_CONFIG_FILE, CODE_TOOL_ALIASES, CODE_TOOL_BANNERS, CODE_TOOL_TYPES, ClAUDE_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, LANG_LABELS, LEGACY_ZCF_CONFIG_FILES, SETTINGS_FILE, SUPPORTED_LANGS, ZCF_CONFIG_DIR, ZCF_CONFIG_FILE, addCompletedOnboarding, applyAiLanguageDirective, backupExistingConfig, backupMcpConfig, buildMcpServerConfig, cleanupPermissions, commandExists, configureApi, copyConfigFiles, ensureApiKeyApproved, ensureClaudeDir, fixWindowsMcpConfig, getAiOutputLanguageLabel, getExistingApiConfig, getExistingModelConfig, getInstallationStatus, getMcpConfigPath, getPlatform, importRecommendedEnv, importRecommendedPermissions, init, installClaudeCode, isClaudeCodeInstalled, isCodeToolType, isLocalClaudeCodeInstalled, manageApiKeyApproval, mergeAndCleanPermissions, mergeConfigs, mergeMcpServers, mergeSettingsFile, openSettingsJson, promptApiConfigurationAction, readMcpConfig, removeApiKeyFromRejected, removeLocalClaudeCode, resolveCodeToolType, setPrimaryApiKey, switchToOfficialLogin, updateCustomModel, updateDefaultModel, writeMcpConfig };
218
224
  export type { AiOutputLanguage, ApiConfig, ClaudeConfiguration, CodeToolType, InstallationStatus, McpServerConfig, McpService, SupportedLang };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, h as CLAUDE_VSC_CONFIG_FILE, l as CODE_TOOL_BANNERS, k as CODE_TOOL_TYPES, f as ClAUDE_CONFIG_FILE, D as DEFAULT_CODE_TOOL_TYPE, q as LANG_LABELS, L as LEGACY_ZCF_CONFIG_FILES, S as SETTINGS_FILE, p as SUPPORTED_LANGS, Z as ZCF_CONFIG_DIR, j as ZCF_CONFIG_FILE, z as addCompletedOnboarding, T as applyAiLanguageDirective, I as backupExistingConfig, u as backupMcpConfig, x as buildMcpServerConfig, c as cleanupPermissions, a as commandExists, K as configureApi, J as copyConfigFiles, B as ensureApiKeyApproved, H as ensureClaudeDir, y as fixWindowsMcpConfig, r as getAiOutputLanguageLabel, R as getExistingApiConfig, Q as getExistingModelConfig, _ as getInstallationStatus, s as getMcpConfigPath, g as getPlatform, b as importRecommendedEnv, d as importRecommendedPermissions, i as init, X as installClaudeCode, W as isClaudeCodeInstalled, n as isCodeToolType, Y as isLocalClaudeCodeInstalled, F as manageApiKeyApproval, m as mergeAndCleanPermissions, M as mergeConfigs, v as mergeMcpServers, P as mergeSettingsFile, o as openSettingsJson, V as promptApiConfigurationAction, t as readMcpConfig, E as removeApiKeyFromRejected, $ as removeLocalClaudeCode, G as setPrimaryApiKey, U as switchToOfficialLogin, N as updateCustomModel, O as updateDefaultModel, w as writeMcpConfig } from './chunks/simple-config.mjs';
1
+ export { u as AI_OUTPUT_LANGUAGES, A as API_DEFAULT_URL, q as API_ENV_KEY, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, h as CLAUDE_VSC_CONFIG_FILE, n as CODE_TOOL_ALIASES, l as CODE_TOOL_BANNERS, k as CODE_TOOL_TYPES, f as ClAUDE_CONFIG_FILE, D as DEFAULT_CODE_TOOL_TYPE, t as LANG_LABELS, L as LEGACY_ZCF_CONFIG_FILES, S as SETTINGS_FILE, s as SUPPORTED_LANGS, Z as ZCF_CONFIG_DIR, j as ZCF_CONFIG_FILE, G as addCompletedOnboarding, X as applyAiLanguageDirective, N as backupExistingConfig, z as backupMcpConfig, E as buildMcpServerConfig, c as cleanupPermissions, a as commandExists, P as configureApi, O as copyConfigFiles, H as ensureApiKeyApproved, M as ensureClaudeDir, F as fixWindowsMcpConfig, v as getAiOutputLanguageLabel, W as getExistingApiConfig, V as getExistingModelConfig, a2 as getInstallationStatus, w as getMcpConfigPath, g as getPlatform, b as importRecommendedEnv, d as importRecommendedPermissions, i as init, a0 as installClaudeCode, $ as isClaudeCodeInstalled, p as isCodeToolType, a1 as isLocalClaudeCodeInstalled, J as manageApiKeyApproval, m as mergeAndCleanPermissions, Q as mergeConfigs, B as mergeMcpServers, U as mergeSettingsFile, o as openSettingsJson, _ as promptApiConfigurationAction, x as readMcpConfig, I as removeApiKeyFromRejected, a3 as removeLocalClaudeCode, r as resolveCodeToolType, K as setPrimaryApiKey, Y as switchToOfficialLogin, R as updateCustomModel, T as updateDefaultModel, y as writeMcpConfig } from './chunks/simple-config.mjs';
2
2
  import 'node:fs';
3
3
  import 'node:process';
4
4
  import 'ansis';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zcf",
3
3
  "type": "module",
4
- "version": "3.1.4",
4
+ "version": "3.2.1",
5
5
  "description": "Zero-Config Code Flow - One-click configuration tool for Claude Code",
6
6
  "author": {
7
7
  "name": "Miao Da",
@@ -67,6 +67,7 @@ This command works **without any package manager/build tools**, using only **Git
67
67
  - Auto-infer `type` (`feat`/`fix`/`docs`/`refactor`/`test`/`chore`/`perf`/`style`/`ci`/`revert`...) and optional `scope`.
68
68
  - Generate message header: `[<emoji>] <type>(<scope>)?: <subject>` (first line ≤ 72 chars, imperative mood, emoji included only with `--emoji` flag).
69
69
  - Generate message body: bullet points (motivation, implementation details, impact scope, BREAKING CHANGE if any).
70
+ - Select message language to match the predominant language in Git history. Inspect recent commit subjects (e.g., `git log -n 50 --pretty=%s`) to decide Chinese vs English; if unclear, fall back to the repository's primary locale or English.
70
71
  - Write draft to `.git/COMMIT_EDITMSG` for use with `git commit`.
71
72
 
72
73
  5. **Execute Commit**
@@ -67,6 +67,7 @@ argument-hint: [--no-verify] [--all] [--amend] [--signoff] [--emoji] [--scope <s
67
67
  - 自动推断 `type`(`feat`/`fix`/`docs`/`refactor`/`test`/`chore`/`perf`/`style`/`ci`/`revert` …)与可选 `scope`。
68
68
  - 生成消息头:`[<emoji>] <type>(<scope>)?: <subject>`(首行 ≤ 72 字符,祈使语气,仅在使用 `--emoji` 时包含 emoji)。
69
69
  - 生成消息体:要点列表(动机、实现要点、影响范围、BREAKING CHANGE 如有)。
70
+ - 根据 Git 历史提交的主要语言选择提交信息语言。优先检查最近提交主题(例如 `git log -n 50 --pretty=%s`)判断中文/英文;若无法判断,则回退到仓库主要语言或英文。
70
71
  - 将草稿写入 `.git/COMMIT_EDITMSG`,并用于 `git commit`。
71
72
 
72
73
  5. **执行提交**
@@ -67,6 +67,7 @@ This command works **without any package manager/build tools**, using only **Git
67
67
  - Auto-infer `type` (`feat`/`fix`/`docs`/`refactor`/`test`/`chore`/`perf`/`style`/`ci`/`revert`...) and optional `scope`.
68
68
  - Generate message header: `[<emoji>] <type>(<scope>)?: <subject>` (first line ≤ 72 chars, imperative mood, emoji included only with `--emoji` flag).
69
69
  - Generate message body: bullet points (motivation, implementation details, impact scope, BREAKING CHANGE if any).
70
+ - Select message language to match the predominant language in Git history. Inspect recent commit subjects (e.g., `git log -n 50 --pretty=%s`) to decide Chinese vs English; if unclear, fall back to the repository's primary locale or English.
70
71
  - Write draft to `.git/COMMIT_EDITMSG` for use with `git commit`.
71
72
 
72
73
  5. **Execute Commit**
@@ -67,6 +67,7 @@ argument-hint: [--no-verify] [--all] [--amend] [--signoff] [--emoji] [--scope <s
67
67
  - 自动推断 `type`(`feat`/`fix`/`docs`/`refactor`/`test`/`chore`/`perf`/`style`/`ci`/`revert` …)与可选 `scope`。
68
68
  - 生成消息头:`[<emoji>] <type>(<scope>)?: <subject>`(首行 ≤ 72 字符,祈使语气,仅在使用 `--emoji` 时包含 emoji)。
69
69
  - 生成消息体:要点列表(动机、实现要点、影响范围、BREAKING CHANGE 如有)。
70
+ - 根据 Git 历史提交的主要语言选择提交信息语言。优先检查最近提交主题(例如 `git log -n 50 --pretty=%s`)判断中文/英文;若无法判断,则回退到仓库主要语言或英文。
70
71
  - 将草稿写入 `.git/COMMIT_EDITMSG`,并用于 `git commit`。
71
72
 
72
73
  5. **执行提交**