auto-coder 0.1.305__py3-none-any.whl → 0.1.306__py3-none-any.whl

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.

Potentially problematic release.


This version of auto-coder might be problematic. Click here for more details.

Files changed (39) hide show
  1. {auto_coder-0.1.305.dist-info → auto_coder-0.1.306.dist-info}/METADATA +1 -1
  2. {auto_coder-0.1.305.dist-info → auto_coder-0.1.306.dist-info}/RECORD +39 -34
  3. autocoder/agent/auto_learn_from_commit.py +3 -1
  4. autocoder/agent/auto_review_commit.py +3 -1
  5. autocoder/auto_coder.py +3 -2
  6. autocoder/auto_coder_runner.py +116 -3
  7. autocoder/chat_auto_coder.py +9 -1
  8. autocoder/chat_auto_coder_lang.py +552 -278
  9. autocoder/common/__init__.py +4 -0
  10. autocoder/common/auto_coder_lang.py +737 -401
  11. autocoder/common/code_auto_generate.py +104 -16
  12. autocoder/common/code_auto_generate_diff.py +101 -10
  13. autocoder/common/code_auto_generate_editblock.py +103 -9
  14. autocoder/common/code_auto_generate_strict_diff.py +99 -9
  15. autocoder/common/code_auto_merge.py +8 -0
  16. autocoder/common/code_auto_merge_diff.py +8 -0
  17. autocoder/common/code_auto_merge_editblock.py +7 -0
  18. autocoder/common/code_auto_merge_strict_diff.py +5 -0
  19. autocoder/common/code_modification_ranker.py +4 -2
  20. autocoder/common/command_completer.py +12 -0
  21. autocoder/common/command_generator.py +5 -4
  22. autocoder/common/git_utils.py +13 -7
  23. autocoder/common/stream_out_type.py +5 -1
  24. autocoder/common/utils_code_auto_generate.py +29 -3
  25. autocoder/dispacher/__init__.py +18 -19
  26. autocoder/dispacher/actions/action.py +0 -132
  27. autocoder/index/filter/quick_filter.py +6 -3
  28. autocoder/memory/__init__.py +7 -0
  29. autocoder/memory/active_context_manager.py +649 -0
  30. autocoder/memory/active_package.py +469 -0
  31. autocoder/memory/async_processor.py +161 -0
  32. autocoder/memory/directory_mapper.py +67 -0
  33. autocoder/utils/auto_coder_utils/chat_stream_out.py +5 -0
  34. autocoder/utils/project_structure.py +35 -1
  35. autocoder/version.py +1 -1
  36. {auto_coder-0.1.305.dist-info → auto_coder-0.1.306.dist-info}/LICENSE +0 -0
  37. {auto_coder-0.1.305.dist-info → auto_coder-0.1.306.dist-info}/WHEEL +0 -0
  38. {auto_coder-0.1.305.dist-info → auto_coder-0.1.306.dist-info}/entry_points.txt +0 -0
  39. {auto_coder-0.1.305.dist-info → auto_coder-0.1.306.dist-info}/top_level.txt +0 -0
@@ -1,406 +1,740 @@
1
- import locale
2
1
  from byzerllm.utils import format_str_jinja2
2
+ import locale
3
3
 
4
4
  MESSAGES = {
5
- "en": {
6
- "file_scored_message": "File scored: {{file_path}} - Score: {{score}}",
7
- "invalid_file_pattern": "Invalid file pattern: {{file_pattern}}. e.g. regex://.*/package-lock\\.json",
8
- "config_validation_error": "Config validation error: {{error}}",
9
- "invalid_boolean_value": "Value '{{value}}' is not a valid boolean(true/false)",
10
- "invalid_integer_value": "Value '{{value}}' is not a valid integer",
11
- "invalid_float_value": "Value '{{value}}' is not a valid float",
12
- "invalid_type_value": "Value '{{value}}' is not a valid type (expected: {{types}})",
13
- "value_out_of_range": "Value {{value}} is out of allowed range({{min}}~{{max}})",
14
- "invalid_choice": "Value '{{value}}' is not in allowed options({{allowed}})",
15
- "unknown_config_key": "Unknown config key '{{key}}'",
16
- "model_not_found": "Model '{{model}}' is not configured in models.yml",
17
- "required_without_default": "Config key '{{key}}' requires explicit value",
18
- "auto_command_action_break": "Command {{command}} execution failed (got {{action}} result), no result can be obtained, please try again",
19
- "auto_command_break": "Auto command execution failed to execute command: {{command}}",
20
- "auto_command_executing": "\n\n============= Executing command: {{command}} =============\n\n",
21
- "model_provider_select_title": "Select Model Provider",
22
- "auto_config_analyzing": "Analyzing configuration...",
23
- "config_delete_success": "Successfully deleted configuration: {{key}}",
24
- "config_not_found": "Configuration not found: {{key}}",
25
- "config_invalid_format": "Invalid configuration format. Expected 'key:value'",
26
- "config_value_empty": "Configuration value cannot be empty",
27
- "config_set_success": "Successfully set configuration: {{key}} = {{value}}",
28
- "model_provider_select_text": "Please select your model provider:",
29
- "model_provider_volcano": "Volcano Engine",
30
- "model_provider_siliconflow": "SiliconFlow AI",
31
- "model_provider_deepseek": "DeepSeek Official",
32
- "model_provider_api_key_title": "API Key",
33
- "model_provider_volcano_api_key_text": "Please enter your Volcano Engine API key:",
34
- "model_provider_volcano_r1_text": "Please enter your Volcano Engine R1 endpoint (format: ep-20250204215011-vzbsg):",
35
- "model_provider_volcano_v3_text": "Please enter your Volcano Engine V3 endpoint (format: ep-20250204215011-vzbsg):",
36
- "model_provider_siliconflow_api_key_text": "Please enter your SiliconFlow AI API key:",
37
- "model_provider_deepseek_api_key_text": "Please enter your DeepSeek API key:",
38
- "model_provider_selected": "Provider configuration completed successfully! You can use /models command to view, add and modify all models later.",
39
- "model_provider_success_title": "Success",
40
- "index_file_filtered": "File {{file_path}} is filtered by model {{model_name}} restrictions",
41
- "models_no_active": "No active models found",
42
- "models_speed_test_results": "Model Speed Test Results",
43
- "models_testing": "Testing model: {{name}}...",
44
- "models_testing_start": "Starting speed test for all active models...",
45
- "models_testing_progress": "Testing progress: {{ completed }}/{{ total }} models",
46
- "generation_cancelled": "[Interrupted] Generation cancelled",
47
- "model_not_found": "Model {{model_name}} not found",
48
- "generating_shell_script": "Generating Shell Script",
49
- "new_session_started": "New session started. Previous chat history has been archived.",
50
- "memory_save_success": " Saved to your memory(path: {{path}})",
51
- "file_decode_error": "Failed to decode file: {{file_path}}. Tried encodings: {{encodings}}",
52
- "file_write_error": "Failed to write file: {{file_path}}. Error: {{error}}",
53
- "yaml_load_error": "Error loading yaml file {{yaml_file}}: {{error}}",
54
- "git_command_error": "Git command execution error: {{error}}",
55
- "get_commit_diff_error": "Error getting commit diff: {{error}}",
56
- "no_latest_commit": "Unable to get latest commit information",
57
- "code_review_error": "Code review process error: {{error}}",
58
- "index_file_too_large": "⚠️ File {{ file_path }} is too large ({{ file_size }} > {{ max_length }}), splitting into chunks...",
59
- "index_update_success": " {{ model_name }} Successfully updated index for {{ file_path }} (md5: {{ md5 }}) in {{ duration }}s, input_tokens: {{ input_tokens }}, output_tokens: {{ output_tokens }}, input_cost: {{ input_cost }}, output_cost: {{ output_cost }}",
60
- "index_build_error": "❌ {{ model_name }} Error building index for {{ file_path }}: {{ error }}",
61
- "index_build_summary": "📊 Total Files: {{ total_files }}, Need to Build Index: {{ num_files }}",
62
- "building_index_progress": " Building Index: {{ counter }}/{{ num_files }}...",
63
- "index_source_dir_mismatch": "⚠️ Source directory mismatch (file_path: {{ file_path }}, source_dir: {{ source_dir }})",
64
- "index_related_files_fail": "⚠️ Failed to find related files for chunk {{ chunk_count }}",
65
- "index_threads_completed": "✅ Completed {{ completed_threads }}/{{ total_threads }} threads",
66
- "index_related_files_fail": "⚠️ Failed to find related files for chunk {{ chunk_count }}",
67
- "index_file_removed": "🗑️ Removed non-existent file index: {{ file_path }}",
68
- "index_file_saved": "💾 Saved index file, updated {{ updated_files }} files, removed {{ removed_files }} files, input_tokens: {{ input_tokens }}, output_tokens: {{ output_tokens }}, input_cost: {{ input_cost }}, output_cost: {{ output_cost }}",
69
- "task_cancelled_by_user": "Task was cancelled by user",
70
- "cancellation_requested": "Cancellation requested, waiting for thread to terminate...",
71
- "force_terminating_thread": "Force terminating thread after timeout",
72
- "force_raising_keyboard_interrupt": "Force raising KeyboardInterrupt after timeout",
73
- "thread_terminated": "Thread terminated",
74
- "human_as_model_instructions": (
75
- "You are now in Human as Model mode. The content has been copied to your clipboard.\n"
76
- "The system is waiting for your input. When finished, enter 'EOF' on a new line to submit.\n"
77
- "Use '/break' to exit this mode. If you have issues with copy-paste, use '/clear' to clean and paste again."
78
- ),
79
- "clipboard_not_supported": (
80
- "pyperclip not installed or clipboard is not supported, instruction will not be copied to clipboard."
81
- ),
82
- "human_as_model_instructions_no_clipboard": (
83
- "You are now in Human as Model mode. [bold red]The content could not be copied to your clipboard.[/bold red]\n"
84
- "but you can copy prompt from output.txt file.\n"
85
- "The system is waiting for your input. When finished, enter 'EOF' on a new line to submit.\n"
86
- "Use '/break' to exit this mode. If you have issues with copy-paste, use '/clear' to clean and paste again."
87
- ),
88
- "phase1_processing_sources": "Phase 1: Processing REST/RAG/Search sources...",
89
- "phase2_building_index": "Phase 2: Building index for all files...",
90
- "phase6_file_selection": "Phase 6: Processing file selection and limits...",
91
- "phase7_preparing_output": "Phase 7: Preparing final output...",
92
- "chat_human_as_model_instructions": (
93
- "Chat is now in Human as Model mode.\n"
94
- "The question has been copied to your clipboard.\n"
95
- "Please use Web version model to get the answer.\n"
96
- "Or use /conf human_as_model:false to close this mode and get the answer in terminal directly."
97
- "Paste the answer to the input box below, use '/break' to exit, '/clear' to clear the screen, '/eof' to submit."
98
- ),
99
- "code_generation_start": "Auto generate the code...",
100
- "code_generation_complete": "{{ model_names}} Code generation completed in {{ duration }} seconds (sampling_count: {{ sampling_count }}), input_tokens_count: {{ input_tokens }}, generated_tokens_count: {{ output_tokens }}, input_cost: {{ input_cost }}, output_cost: {{ output_cost }}, speed: {{ speed }} tokens/s",
101
- "code_merge_start": "Auto merge the code...",
102
- "code_execution_warning": "Content(send to model) is {{ content_length }} tokens (you may collect too much files), which is larger than the maximum input length {{ max_length }}",
103
- "quick_filter_start": "{{ model_name }} Starting filter context(quick_filter)...",
104
- "normal_filter_start": "{{ model_name }} Starting filter context(normal_filter)...",
105
- "pylint_check_failed": "⚠️ Pylint check failed: {{ error_message }}",
106
- "pylint_error": " Error running pylint: {{ error_message }}",
107
- "unmerged_blocks_warning": "⚠️ Found {{ num_blocks }} unmerged blocks, the changes will not be applied. Please review them manually then try again.",
108
- "pylint_file_check_failed": "⚠️ Pylint check failed for {{ file_path }}. Changes not applied. Error: {{ error_message }}",
109
- "merge_success": "✅ Merged changes in {{ num_files }} files {{ num_changes }}/{{ total_blocks }} blocks.",
110
- "no_changes_made": "⚠️ No changes were made to any files.",
111
- "files_merged": "✅ Merged {{ total }} files into the project.",
112
- "merge_failed": "❌ Merge file {{ path }} failed: {{ error }}",
113
- "files_merged_total": "✅ Merged {{ total }} files into the project.",
114
- "ranking_skip": "Only 1 candidate, skip ranking",
115
- "ranking_start": "Start ranking {{ count }} candidates using model {{ model_name }}",
116
- "ranking_failed_request": "Ranking request failed: {{ error }}",
117
- "ranking_all_failed": "All ranking requests failed",
118
- "ranking_complete": "{{ model_names }} Ranking completed in {{ elapsed }}s, total voters: {{ total_tasks }}, best candidate index: {{ best_candidate }}, scores: {{ scores }}, input_tokens: {{ input_tokens }}, output_tokens: {{ output_tokens }}, input_cost: {{ input_cost }}, output_cost: {{ output_cost }}, speed: {{ speed }} tokens/s",
119
- "ranking_process_failed": "Ranking process failed: {{ error }}",
120
- "ranking_failed": "Ranking failed in {{ elapsed }}s, using original order",
121
- "begin_index_source_code": "🚀 Begin to index source code in {{ source_dir }}",
122
- "stream_out_stats": "Model: {{ model_name }}, Total time: {{ elapsed_time }} seconds, First token time: {{ first_token_time }} seconds, Speed: {{ speed }} tokens/s, Input tokens: {{ input_tokens }}, Output tokens: {{ output_tokens }}, Input cost: {{ input_cost }}, Output cost: {{ output_cost }}",
123
- "quick_filter_stats": "{{ model_names }} Quick filter completed in {{ elapsed_time }} seconds, input tokens: {{ input_tokens }}, output tokens: {{ output_tokens }}, input cost: {{ input_cost }}, output cost: {{ output_cost }} speed: {{ speed }} tokens/s",
124
- "upsert_file": "✅ Updated file: {{ file_path }}",
125
- "unmerged_blocks_title": "Unmerged Blocks",
126
- "merged_blocks_title": "Merged Changes",
127
- "quick_filter_title": "{{ model_name }} is analyzing how to filter context...",
128
- "quick_filter_failed": "❌ Quick filter failed: {{ error }}. ",
129
- "unmerged_file_path": "File: {{file_path}}",
130
- "unmerged_search_block": "Search Block({{similarity}}):",
131
- "unmerged_replace_block": "Replace Block:",
132
- "unmerged_blocks_total": "Total unmerged blocks: {{num_blocks}}",
133
- "git_init_required": "⚠️ auto_merge only applies to git repositories.\n\nPlease try using git init in the source directory:\n\n```shell\ncd {{ source_dir }}\ngit init.\n```\n\nThen run auto - coder again.\nError: {{ error }}",
134
- "quick_filter_reason": "Auto get(quick_filter mode)",
135
- "quick_filter_too_long": "⚠️ index file is too large ({{ tokens_len }}/{{ max_tokens }}). The query will be split into {{ split_size }} chunks.",
136
- "quick_filter_tokens_len": "📊 Current index size: {{ tokens_len }} tokens",
137
- "estimated_chat_input_tokens": "Estimated chat input tokens: {{ estimated_input_tokens }}",
138
- "estimated_input_tokens_in_generate": "Estimated input tokens in generate ({{ generate_mode }}): {{ estimated_input_tokens_in_generate }}",
139
- "model_has_access_restrictions": "{{model_name}} has access restrictions, cannot use the current function",
140
- "auto_command_not_found": "Auto command not found: {{command}}. Please check your input and try again.",
141
- "auto_command_failed": "Auto command failed: {{error}}. Please check your input and try again.",
142
- "command_execution_result": "{{action}} execution result",
143
- "satisfied_prompt": "Requirements satisfied, no further action needed",
144
- "auto_command_analyzed": "Selected command",
145
- "invalid_enum_value": "Value '{{value}}' is not in allowed values ({{allowed}})",
146
- "no_changes_made": "⚠️ no changes made, the reason may be that the text block generated by the coding function has a problem, so it cannot be merged into the project",
147
- "conversation_pruning_start": "⚠️ Conversation pruning started, total tokens: {{total_tokens}}, safe zone: {{safe_zone}}",
148
- "invalid_file_number": "⚠️ Invalid file number {{file_number}}, total files: {{total_files}}",
149
- "all_merge_results_failed": "⚠️ All merge attempts failed, returning first candidate",
150
- "only_one_merge_result_success": " Only one merge result succeeded, returning that candidate",
151
- "conf_import_success": "Successfully imported configuration: {{path}}",
152
- "conf_export_success": "Successfully exported configuration: {{path}}",
153
- "conf_import_error": "Error importing configuration: {{error}}",
154
- "conf_export_error": "Error exporting configuration: {{error}}",
155
- "conf_import_invalid_format": "Invalid import configuration format, expected 'key:value'",
156
- "conf_export_invalid_format": "Invalid export configuration format, expected 'key:value'",
157
- "conf_import_file_not_found": "Import configuration file not found: {{file_path}}",
158
- "conf_export_file_not_found": "Export configuration file not found: {{file_path}}",
159
- "conf_import_file_empty": "Import configuration file is empty: {{file_path}}",
160
- "conf_export_file_empty": "Export configuration file is empty: {{file_path}}",
161
- "generated_shell_script": "Generated Shell Script",
162
- "confirm_execute_shell_script": "Do you want to execute this shell script?",
163
- "shell_script_not_executed": "Shell script was not executed",
164
- "index_export_success": "Index exported successfully: {{path}}",
165
- "index_import_success": "Index imported successfully: {{path}}",
166
- "edits_title": "edits",
167
- "diff_blocks_title":"diff blocks",
168
- "index_exclude_files_error": "index filter exclude files fail: {{ error }}",
169
- "file_sliding_window_processing": "File {{ file_path }} is too large ({{ tokens }} tokens), processing with sliding window...",
170
- "file_snippet_processing": "Processing file {{ file_path }} with code snippet extraction...",
171
- "context_pruning_start": "⚠️ Context pruning started. Total tokens: {{ total_tokens }} (max allowed: {{ max_tokens }}). Applying strategy: {{ strategy }}.",
172
- "context_pruning_reason": "Context length exceeds maximum limit ({{ total_tokens }} > {{ max_tokens }}). Pruning is required to fit within the model's context window.",
173
- "rank_code_modification_title": "{{model_name}} ranking codes",
174
- "sorted_files_message": "Reordered files:\n{% for file in files %}- {{ file }}\n{% endfor %}",
175
- "estimated_input_tokens_in_ranking": "estimate input token {{ estimated_input_tokens }} when ranking",
176
- "file_snippet_procesed": "{{ file_path }} processed with tokens: {{ tokens }} => {{ snippet_tokens }}. Current total tokens: {{ total_tokens }}",
177
- "tool_ask_user": "Your Reply: ",
178
- "tool_ask_user_accept":"Your Response received",
179
- "auto_web_analyzing": "Analyzing web automation task...",
180
- "auto_web_analyzed": "Web automation task analysis completed",
181
- "executing_web_action": "Executing action: {{action}} - {{description}}",
182
- "executing_step": "Executing step {{step}}: {{description}}",
183
- "operation_cancelled": "Operation cancelled",
184
- "element_not_found": "Element not found: {{element}}",
185
- "analyzing_results": "Analyzing execution results...",
186
- "next_steps_determined": "Next steps determined",
187
- "max_iterations_reached": "Max iterations reached ({max_iterations})",
188
- "action_verification_failed": "Action verification failed: {{action}} - {{reason}}",
189
- "action_succeeded": "Action succeeded: {{action}}",
190
- "replanned_actions": "Replanned {{count}} actions",
191
- "web_automation_ask_user": "Your answer: ",
192
- "filter_mode_normal": "Using normal filter mode for index processing...",
193
- "filter_mode_big": "Index file is large ({{ tokens_len }} tokens), using big_filter mode for processing...",
194
- "filter_mode_super_big": "Index file is very large ({{ tokens_len }} tokens), using super_big_filter mode for processing...",
195
- "super_big_filter_failed": " Super big filter failed: {{ error }}.",
196
- "super_big_filter_stats": "{{ model_names }} Super big filter completed in {{ elapsed_time }} seconds, input tokens: {{ input_tokens }}, output tokens: {{ output_tokens }}, input cost: {{ input_cost }}, output cost: {{ output_cost }}, speed: {{ speed }} tokens/s, chunk_index: {{ chunk_index }}",
197
- "super_big_filter_splitting": "⚠️ Index file is extremely large ({{ tokens_len }}/{{ max_tokens }}). The query will be split into {{ split_size }} chunks for processing.",
198
- "super_big_filter_title": "{{ model_name }} is analyzing how to filter extremely large context...",
199
- "mcp_server_info_error": "Error getting MCP server info: {{ error }}",
200
- "mcp_server_info_title": "Connected MCP Server Info",
201
- "no_commit_file_name": "Cannot get the file name of the commit_id in the actions directory: {{commit_id}}",
202
- "yaml_update_success": " Successfully updated YAML file: {{yaml_file}}",
203
- "yaml_save_error": " Error saving YAML file {{yaml_file}}: {{error}}",
204
- },
205
- "zh": {
206
- "file_sliding_window_processing": "文件 {{ file_path }} 过大 ({{ tokens }} tokens),正在使用滑动窗口处理...",
207
- "file_snippet_processing": "正在对文件 {{ file_path }} 进行代码片段提取...",
208
- "context_pruning_start": "⚠️ 开始上下文剪枝。总token数: {{ total_tokens }} (最大允许: {{ max_tokens }})。正在应用策略: {{ strategy }}。",
209
- "context_pruning_reason": "上下文长度超过最大限制 ({{ total_tokens }} > {{ max_tokens }})。需要进行剪枝以适配模型的上下文窗口。",
210
- "file_scored_message": "文件评分: {{file_path}} - 分数: {{score}}",
211
- "invalid_file_pattern": "无效的文件模式: {{file_pattern}}. 例如: regex://.*/package-lock\\.json",
212
- "conf_not_found": "未找到配置文件: {{path}}",
213
- "conf_import_success": "成功导入配置: {{path}}",
214
- "conf_export_success": "成功导出配置: {{path}}",
215
- "conf_import_error": "导入配置出错: {{error}}",
216
- "conf_export_error": "导出配置出错: {{error}}",
217
- "conf_import_invalid_format": "导入配置格式无效, 应为 'key:value' 格式",
218
- "conf_export_invalid_format": "导出配置格式无效, 应为 'key:value' 格式",
219
- "conf_import_file_not_found": "未找到导入配置文件: {{file_path}}",
220
- "conf_export_file_not_found": "未找到导出配置文件: {{file_path}}",
221
- "conf_import_file_empty": "导入配置文件为空: {{file_path}}",
222
- "conf_export_file_empty": "导出配置文件为空: {{file_path}}",
223
- "generated_shell_script": "生成的 Shell 脚本",
224
- "confirm_execute_shell_script": "您要执行此 shell 脚本吗?",
225
- "shell_script_not_executed": "Shell 脚本未执行",
226
- "config_validation_error": "配置验证错误: {{error}}",
227
- "invalid_boolean_value": " '{{value}}' 不是有效的布尔值(true/false)",
228
- "invalid_integer_value": "值 '{{value}}' 不是有效的整数",
229
- "invalid_float_value": "值 '{{value}}' 不是有效的浮点数",
230
- "invalid_type_value": " '{{value}}' 不是有效的类型 (期望: {{types}})",
231
- "value_out_of_range": " {value} 超出允许范围({min}~{max})",
232
- "invalid_choice": "值 '{value}' 不在允许选项中({allowed})",
233
- "unknown_config_key": "未知的配置项 '{key}'",
234
- "model_not_found": "模型 '{model}' 未在 models.yml 中配置",
235
- "required_without_default": "配置项 '{key}' 需要明确设置值",
236
- "auto_command_action_break": "命令 {{command}} 执行失败(获取到了 {{action}} 的结果),无法获得任何结果,请重试",
237
- "auto_command_break": "自动命令执行失败: {{command}}",
238
- "auto_command_executing": "\n\n============= 正在执行指令: {{command}} =============\n\n",
239
- "model_provider_select_title": "选择模型供应商",
240
- "auto_config_analyzing": "正在分析配置...",
241
- "config_delete_success": "成功删除配置: {{key}}",
242
- "config_not_found": "未找到配置: {{key}}",
243
- "config_invalid_format": "配置格式无效,应为'key:value'格式",
244
- "config_value_empty": "配置值不能为空",
245
- "config_set_success": "成功设置配置: {{key}} = {{value}}",
246
- "model_provider_select_text": "请选择您的模型供应商:",
247
- "model_provider_volcano": "火山方舟",
248
- "model_provider_siliconflow": "硅基流动",
249
- "model_provider_deepseek": "DeepSeek官方",
250
- "model_provider_api_key_title": "API密钥",
251
- "model_provider_volcano_api_key_text": "请输入您的火山方舟API密钥:",
252
- "model_provider_volcano_r1_text": "请输入您的火山方舟 R1 推理点(格式如: ep-20250204215011-vzbsg):",
253
- "model_provider_volcano_v3_text": "请输入您的火山方舟 V3 推理点(格式如: ep-20250204215011-vzbsg):",
254
- "model_provider_siliconflow_api_key_text": "请输入您的硅基流动API密钥:",
255
- "model_provider_deepseek_api_key_text": "请输入您的DeepSeek API密钥:",
256
- "model_provider_selected": "供应商配置已成功完成!后续你可以使用 /models 命令,查看,新增和修改所有模型",
257
- "model_provider_success_title": "成功",
258
- "index_file_filtered": "文件 {{file_path}} 被模型 {{model_name}} 的访问限制过滤",
259
- "models_no_active": "未找到激活的模型",
260
- "models_speed_test_results": "模型速度测试结果",
261
- "models_testing": "正在测试模型: {{name}}...",
262
- "models_testing_start": "开始对所有激活的模型进行速度测试...",
263
- "generation_cancelled": "[已中断] 生成已取消",
264
- "model_not_found": "未找到模型: {{model_name}}",
265
- "generating_shell_script": "正在生成 Shell 脚本",
266
- "new_session_started": "新会话已开始。之前的聊天历史已存档。",
267
- "memory_save_success": "✅ 已保存到您的记忆中(路径: {{path}})",
268
- "file_decode_error": "无法解码文件: {{file_path}}。尝试的编码: {{encodings}}",
269
- "file_write_error": "无法写入文件: {{file_path}}. 错误: {{error}}",
270
- "yaml_load_error": "加载YAML文件出错 {{yaml_file}}: {{error}}",
271
- "git_command_error": "Git命令执行错误: {{error}}",
272
- "get_commit_diff_error": "获取commit diff时出错: {{error}}",
273
- "no_latest_commit": "无法获取最新的提交信息",
274
- "code_review_error": "代码审查过程出错: {{error}}",
275
- "index_file_too_large": "⚠️ 文件 {{ file_path }} 过大 ({{ file_size }} > {{ max_length }}), 正在分块处理...",
276
- "index_update_success": "✅ {{ model_name }} 成功更新 {{ file_path }} 的索引 (md5: {{ md5 }}), 耗时 {{ duration }} 秒, 输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}",
277
- "index_build_error": "❌ {{ model_name }} 构建 {{ file_path }} 索引时出错: {{ error }}",
278
- "index_build_summary": "📊 总文件数: {{ total_files }}, 需要构建索引: {{ num_files }}",
279
- "building_index_progress": "⏳ 正在构建索引: {{ counter }}/{{ num_files }}...",
280
- "index_source_dir_mismatch": "⚠️ 源目录不匹配 (文件路径: {{ file_path }}, 源目录: {{ source_dir }})",
281
- "index_related_files_fail": "⚠️ 无法为块 {{ chunk_count }} 找到相关文件",
282
- "index_threads_completed": " 已完成 {{ completed_threads }}/{{ total_threads }} 个线程",
283
- "index_related_files_fail": "⚠️ 无法为块 {{ chunk_count }} 找到相关文件",
284
- "index_file_removed": "🗑️ 已移除不存在的文件索引:{{ file_path }}",
285
- "index_file_saved": "💾 已保存索引文件,更新了 {{ updated_files }} 个文件,移除了 {{ removed_files }} 个文件,输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}",
286
- "task_cancelled_by_user": "任务被用户取消",
287
- "cancellation_requested": "已请求取消,正在等待线程终止...",
288
- "force_terminating_thread": "线程超时强制终止",
289
- "force_raising_keyboard_interrupt": "超时强制抛出键盘中断异常",
290
- "thread_terminated": "线程已终止",
291
- "human_as_model_instructions": (
292
- "您现在处于人类作为模型模式。内容已复制到您的剪贴板。\n"
293
- "系统正在等待您的输入。完成后,在新行输入'EOF'提交。\n"
294
- "使用'/break'退出此模式。如果复制粘贴有问题,使用'/clear'清理并重新粘贴。"
295
- ),
296
- "clipboard_not_supported": (
297
- "未安装pyperclip或不支持剪贴板,指令将不会被复制到剪贴板。"
298
- ),
299
- "human_as_model_instructions_no_clipboard": (
300
- "您现在处于人类作为模型模式。[bold red]内容无法复制到您的剪贴板。[/bold red]\n"
301
- "但您可以从output.txt文件复制提示。\n"
302
- "系统正在等待您的输入。完成后,在新行输入'EOF'提交。\n"
303
- "使用'/break'退出此模式。如果复制粘贴有问题,使用'/clear'清理并重新粘贴。"
304
- ),
305
- "phase1_processing_sources": "阶段 1: 正在处理 REST/RAG/Search 源...",
306
- "phase2_building_index": "阶段 2: 正在为所有文件构建索引...",
307
- "phase6_file_selection": "阶段 6: 正在处理文件选择和限制...",
308
- "phase7_preparing_output": "阶段 7: 正在准备最终输出...",
309
- "chat_human_as_model_instructions": (
310
- "\n============= Chat 处于 Human as Model 模式 =============\n"
311
- "问题已复制到剪贴板\n"
312
- "请使用Web版本模型获取答案\n"
313
- "或者使用 /conf human_as_model:false 关闭该模式直接在终端获得答案。"
314
- "将获得答案黏贴到下面的输入框,换行后,使用 '/break' 退出,'/clear' 清屏,'/eof' 提交。"
315
- ),
316
- "code_generation_start": "正在自动生成代码...",
317
- "code_generation_complete": "{{ model_names}} 代码生成完成,耗时 {{ duration }} 秒 (采样数: {{ sampling_count }}), 输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}, 速度: {{ speed }} tokens/秒",
318
- "code_merge_start": "正在自动合并代码...",
319
- "code_execution_warning": "发送给模型的内容长度为 {{ content_length }} tokens(您可能收集了太多文件),超过了最大输入长度 {{ max_length }}",
320
- "quick_filter_start": "{{ model_name }} 开始查找上下文(quick_filter)...",
321
- "normal_filter_start": "{{ model_name }} 开始查找上下文(normal_filter)...",
322
- "pylint_check_failed": "⚠️ Pylint 检查失败: {{ error_message }}",
323
- "pylint_error": " 运行 Pylint 时出错: {{ error_message }}",
324
- "begin_index_source_code": "🚀 开始为 {{ source_dir }} 中的源代码建立索引",
325
- "unmerged_blocks_warning": "⚠️ 发现 {{ num_blocks }} 个未合并的代码块,更改将不会被应用。请手动检查后重试。",
326
- "pylint_file_check_failed": "⚠️ {{ file_path }} Pylint 检查失败。更改未应用。错误: {{ error_message }}",
327
- "merge_success": "✅ 成功合并了 {{ num_files }} 个文件中的更改 {{ num_changes }}/{{ total_blocks }} 个代码块。",
328
- "no_changes_made": "⚠️ 未对任何文件进行更改。这个原因可能是因为coding函数生成的文本块格式有问题,导致无法合并进项目",
329
- "unmerged_blocks_title": "未合并代码块",
330
- "merged_blocks_title": "合并的更改",
331
- "unmerged_file_path": "文件: {{file_path}}",
332
- "unmerged_search_block": "Search Block({{similarity}}):",
333
- "unmerged_replace_block": "Replace Block:",
334
- "unmerged_blocks_total": "未合并代码块数量: {{num_blocks}}",
335
- "git_init_required": "⚠️ auto_merge 仅适用于 git 仓库。\n\n请尝试在源目录中使用 git init:\n\n```shell\ncd {{ source_dir }}\ngit init.\n```\n\n然后再次运行 auto-coder。\n错误: {{ error }}",
336
- "quick_filter_reason": "自动获取(quick_filter模式)",
337
- "quick_filter_too_long": "⚠️ 索引文件过大 ({{ tokens_len }}/{{ max_tokens }})。查询将被分成 {{ split_size }} 个部分执行。",
338
- "quick_filter_tokens_len": "📊 当前索引大小: {{ tokens_len }} tokens",
339
- "upsert_file": " 更新文件: {{ file_path }}",
340
- "files_merged": "✅ 成功合并了 {{ total }} 个文件到项目中。",
341
- "merge_failed": "❌ 合并文件 {{ path }} 失败: {{ error }}",
342
- "files_merged_total": " 合并了 {{ total }} 个文件到项目中。",
343
- "ranking_skip": "只有1个候选项,跳过排序",
344
- "ranking_start": "开始对 {{ count }} 个候选项进行排序,使用模型 {{ model_name }} 打分",
345
- "ranking_failed_request": "排序请求失败: {{ error }}",
346
- "ranking_all_failed": "所有排序请求都失败",
347
- "ranking_complete": "{{ model_names }} 排序完成,耗时 {{ elapsed }} 秒,总投票数: {{ total_tasks }},最佳候选索引: {{ best_candidate }},得分: {{ scores }},输入token数: {{ input_tokens }},输出token数: {{ output_tokens }},输入成本: {{ input_cost }}, 输出成本: {{ output_cost }},速度: {{ speed }} tokens/秒",
348
- "ranking_process_failed": "排序过程失败: {{ error }}",
349
- "ranking_failed": "排序失败,耗时 {{ elapsed }} 秒,使用原始顺序",
350
- "stream_out_stats": "模型: {{ model_name }},总耗时 {{ elapsed_time }} 秒,首token时间: {{ first_token_time }} 秒, 速度: {{ speed }} tokens/秒, 输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}",
351
- "quick_filter_stats": "{{ model_names }} Quick Filter 完成耗时 {{ elapsed_time }} 秒,输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }} 速度: {{ speed }} tokens/秒",
352
- "quick_filter_title": "{{ model_name }} 正在分析如何筛选上下文...",
353
- "quick_filter_failed": "❌ 快速过滤器失败: {{ error }}. ",
354
- "estimated_chat_input_tokens": "对话输入token预估为: {{ estimated_input_tokens }}",
355
- "estimated_input_tokens_in_generate": "生成代码({{ generate_mode }})预计输入token数: {{ estimated_input_tokens_in_generate }}",
356
- "model_has_access_restrictions": "{{model_name}} 有访问限制,无法使用当前功能",
357
- "auto_command_not_found": "未找到自动命令: {{command}}。请检查您的输入并重试。",
358
- "auto_command_failed": "自动命令执行失败: {{error}}。请检查您的输入并重试。",
359
- "command_execution_result": "{{action}} 执行结果",
360
- "satisfied_prompt": "已满足需求,无需进一步操作",
361
- "auto_command_analyzed": "被选择指令",
362
- "invalid_enum_value": " '{{value}}' 不在允许的值列表中 ({{allowed}})",
363
- "conversation_pruning_start": "⚠️ 对话长度 {{total_tokens}} tokens 超过安全阈值 {{safe_zone}},开始修剪对话。",
364
- "invalid_file_number": "⚠️ 无效的文件编号 {{file_number}},总文件数为 {{total_files}}",
365
- "all_merge_results_failed": "⚠️ 所有合并尝试都失败,返回第一个候选",
366
- "only_one_merge_result_success": "✅ 只有一个合并结果成功,返回该候选",
367
- "index_export_success": "索引导出成功: {{path}}",
368
- "index_import_success": "索引导入成功: {{path}}",
369
- "edits_title": "编辑块",
370
- "diff_blocks_title": "差异块",
371
- "index_exclude_files_error": "索引排除文件时出错: {{error}}",
372
- "rank_code_modification_title": "模型{{model_name}}对代码打分",
373
- "sorted_files_message": "重新排序后的文件路径:\n{% for file in files %}- {{ file }}\n{% endfor %}",
374
- "estimated_input_tokens_in_ranking": "排序预计输入token数: {{ estimated_input_tokens }}",
375
- "file_snippet_procesed": "文件 {{ file_path }} 处理后token数: {{ tokens }} => {{ snippet_tokens }} 当前总token数: {{ total_tokens }}",
376
- "tool_ask_user": "您的回复: ",
377
- "tool_ask_user_accept":"收到您的回复",
378
- "auto_web_analyzing": "正在分析网页自动化任务...",
379
- "auto_web_analyzed": "网页自动化任务分析完成",
380
- "executing_web_action": "执行操作: {{action}} - {{description}}",
381
- "executing_step": "执行步骤 {{step}}: {{description}}",
382
- "operation_cancelled": "操作已取消",
383
- "element_not_found": "未找到元素: {{element}}",
384
- "analyzing_results": "分析执行结果...",
385
- "next_steps_determined": "已确定下一步操作",
386
- "max_iterations_reached": "已达到最大迭代次数 {{max_iterations}}",
387
- "action_verification_failed": "操作验证失败: {{action}} - {{reason}}",
388
- "action_succeeded": "操作成功: {{action}}",
389
- "replanned_actions": "已重新规划 {{count}} 个操作",
390
- "web_automation_ask_user": "您的回答: ",
391
- "filter_mode_normal": "正在使用普通过滤模式处理索引...",
392
- "filter_mode_big": "索引文件较大 ({{ tokens_len }} tokens),正在使用 big_filter 模式处理...",
393
- "filter_mode_super_big": "索引文件非常大 ({{ tokens_len }} tokens),正在使用 super_big_filter 模式处理...",
394
- "super_big_filter_failed": " 超大过滤器失败: {{ error }}.",
395
- "super_big_filter_stats": "{{ model_names }} 超大过滤器完成耗时 {{ elapsed_time }} 秒,输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}, 速度: {{ speed }} tokens/秒, 块索引: {{ chunk_index }}",
396
- "super_big_filter_splitting": "⚠️ 索引文件极其庞大 ({{ tokens_len }}/{{ max_tokens }})。查询将被分成 {{ split_size }} 个部分进行处理。",
397
- "super_big_filter_title": "{{ model_name }} 正在分析如何过滤极大规模上下文...",
398
- "mcp_server_info_error": "获取MCP服务器信息时出错: {{ error }}",
399
- "mcp_server_info_title": "已连接的MCP服务器信息",
400
- "no_commit_file_name": "无法获取commit_id关联的actions 目录下的文件名: {{commit_id}}",
401
- "yaml_update_success": "✅ 成功更新YAML文件: {{yaml_file}}",
402
- "yaml_save_error": " 保存YAML文件出错 {{yaml_file}}: {{error}}",
403
- }}
5
+ "file_scored_message": {
6
+ "en": "File scored: {{file_path}} - Score: {{score}}",
7
+ "zh": "文件评分: {{file_path}} - 分数: {{score}}"
8
+ },
9
+ "invalid_file_pattern": {
10
+ "en": "Invalid file pattern: {{file_pattern}}. e.g. regex://.*/package-lock\\.json",
11
+ "zh": "无效的文件模式: {{file_pattern}}. 例如: regex://.*/package-lock\\.json"
12
+ },
13
+ "config_validation_error": {
14
+ "en": "Config validation error: {{error}}",
15
+ "zh": "配置验证错误: {{error}}"
16
+ },
17
+ "invalid_boolean_value": {
18
+ "en": "Value '{{value}}' is not a valid boolean(true/false)",
19
+ "zh": " '{{value}}' 不是有效的布尔值(true/false)"
20
+ },
21
+ "invalid_integer_value": {
22
+ "en": "Value '{{value}}' is not a valid integer",
23
+ "zh": " '{{value}}' 不是有效的整数"
24
+ },
25
+ "invalid_float_value": {
26
+ "en": "Value '{{value}}' is not a valid float",
27
+ "zh": " '{{value}}' 不是有效的浮点数"
28
+ },
29
+ "invalid_type_value": {
30
+ "en": "Value '{{value}}' is not a valid type (expected: {{types}})",
31
+ "zh": " '{{value}}' 不是有效的类型 (期望: {{types}})"
32
+ },
33
+ "value_out_of_range": {
34
+ "en": "Value {{value}} is out of allowed range({{min}}~{{max}})",
35
+ "zh": " {value} 超出允许范围({min}~{max})"
36
+ },
37
+ "invalid_choice": {
38
+ "en": "Value '{{value}}' is not in allowed options({{allowed}})",
39
+ "zh": "值 '{value}' 不在允许选项中({allowed})"
40
+ },
41
+ "unknown_config_key": {
42
+ "en": "Unknown config key '{{key}}'",
43
+ "zh": "未知的配置项 '{key}'"
44
+ },
45
+ "model_not_found": {
46
+ "en": "Model '{{model}}' is not configured in models.yml",
47
+ "zh": "模型 '{model}' 未在 models.yml 中配置"
48
+ },
49
+ "required_without_default": {
50
+ "en": "Config key '{{key}}' requires explicit value",
51
+ "zh": "配置项 '{key}' 需要明确设置值"
52
+ },
53
+ "auto_command_action_break": {
54
+ "en": "Command {{command}} execution failed (got {{action}} result), no result can be obtained, please try again",
55
+ "zh": "命令 {{command}} 执行失败(获取到了 {{action}} 的结果),无法获得任何结果,请重试"
56
+ },
57
+ "auto_command_break": {
58
+ "en": "Auto command execution failed to execute command: {{command}}",
59
+ "zh": "自动命令执行失败: {{command}}"
60
+ },
61
+ "auto_command_executing": {
62
+ "en": "\n\n============= Executing command: {{command}} =============\n\n",
63
+ "zh": "\n\n============= 正在执行指令: {{command}} =============\n\n"
64
+ },
65
+ "model_provider_select_title": {
66
+ "en": "Select Model Provider",
67
+ "zh": "选择模型供应商"
68
+ },
69
+ "auto_config_analyzing": {
70
+ "en": "Analyzing configuration...",
71
+ "zh": "正在分析配置..."
72
+ },
73
+ "config_delete_success": {
74
+ "en": "Successfully deleted configuration: {{key}}",
75
+ "zh": "成功删除配置: {{key}}"
76
+ },
77
+ "config_not_found": {
78
+ "en": "Configuration not found: {{key}}",
79
+ "zh": "未找到配置: {{key}}"
80
+ },
81
+ "config_invalid_format": {
82
+ "en": "Invalid configuration format. Expected 'key:value'",
83
+ "zh": "配置格式无效,应为'key:value'格式"
84
+ },
85
+ "config_value_empty": {
86
+ "en": "Configuration value cannot be empty",
87
+ "zh": "配置值不能为空"
88
+ },
89
+ "config_set_success": {
90
+ "en": "Successfully set configuration: {{key}} = {{value}}",
91
+ "zh": "成功设置配置: {{key}} = {{value}}"
92
+ },
93
+ "model_provider_select_text": {
94
+ "en": "Please select your model provider:",
95
+ "zh": "请选择您的模型供应商:"
96
+ },
97
+ "model_provider_volcano": {
98
+ "en": "Volcano Engine",
99
+ "zh": "火山方舟"
100
+ },
101
+ "model_provider_siliconflow": {
102
+ "en": "SiliconFlow AI",
103
+ "zh": "硅基流动"
104
+ },
105
+ "model_provider_deepseek": {
106
+ "en": "DeepSeek Official",
107
+ "zh": "DeepSeek官方"
108
+ },
109
+ "model_provider_api_key_title": {
110
+ "en": "API Key",
111
+ "zh": "API密钥"
112
+ },
113
+ "model_provider_volcano_api_key_text": {
114
+ "en": "Please enter your Volcano Engine API key:",
115
+ "zh": "请输入您的火山方舟API密钥:"
116
+ },
117
+ "model_provider_volcano_r1_text": {
118
+ "en": "Please enter your Volcano Engine R1 endpoint (format: ep-20250204215011-vzbsg):",
119
+ "zh": "请输入您的火山方舟 R1 推理点(格式如: ep-20250204215011-vzbsg):"
120
+ },
121
+ "model_provider_volcano_v3_text": {
122
+ "en": "Please enter your Volcano Engine V3 endpoint (format: ep-20250204215011-vzbsg):",
123
+ "zh": "请输入您的火山方舟 V3 推理点(格式如: ep-20250204215011-vzbsg):"
124
+ },
125
+ "model_provider_siliconflow_api_key_text": {
126
+ "en": "Please enter your SiliconFlow AI API key:",
127
+ "zh": "请输入您的硅基流动API密钥:"
128
+ },
129
+ "model_provider_deepseek_api_key_text": {
130
+ "en": "Please enter your DeepSeek API key:",
131
+ "zh": "请输入您的DeepSeek API密钥:"
132
+ },
133
+ "model_provider_selected": {
134
+ "en": "Provider configuration completed successfully! You can use /models command to view, add and modify all models later.",
135
+ "zh": "供应商配置已成功完成!后续你可以使用 /models 命令,查看,新增和修改所有模型"
136
+ },
137
+ "model_provider_success_title": {
138
+ "en": "Success",
139
+ "zh": "成功"
140
+ },
141
+ "index_file_filtered": {
142
+ "en": "File {{file_path}} is filtered by model {{model_name}} restrictions",
143
+ "zh": "文件 {{file_path}} 被模型 {{model_name}} 的访问限制过滤"
144
+ },
145
+ "models_no_active": {
146
+ "en": "No active models found",
147
+ "zh": "未找到激活的模型"
148
+ },
149
+ "models_speed_test_results": {
150
+ "en": "Model Speed Test Results",
151
+ "zh": "模型速度测试结果"
152
+ },
153
+ "models_testing": {
154
+ "en": "Testing model: {{name}}...",
155
+ "zh": "正在测试模型: {{name}}..."
156
+ },
157
+ "models_testing_start": {
158
+ "en": "Starting speed test for all active models...",
159
+ "zh": "开始对所有激活的模型进行速度测试..."
160
+ },
161
+ "models_testing_progress": {
162
+ "en": "Testing progress: {{ completed }}/{{ total }} models",
163
+ "zh": "测试进度: {{ completed }}/{{ total }} 个模型"
164
+ },
165
+ "generation_cancelled": {
166
+ "en": "[Interrupted] Generation cancelled",
167
+ "zh": "[已中断] 生成已取消"
168
+ },
169
+ "model_not_found": {
170
+ "en": "Model {{model_name}} not found",
171
+ "zh": "未找到模型: {{model_name}}"
172
+ },
173
+ "generating_shell_script": {
174
+ "en": "Generating Shell Script",
175
+ "zh": "正在生成 Shell 脚本"
176
+ },
177
+ "new_session_started": {
178
+ "en": "New session started. Previous chat history has been archived.",
179
+ "zh": "新会话已开始。之前的聊天历史已存档。"
180
+ },
181
+ "memory_save_success": {
182
+ "en": " Saved to your memory(path: {{path}})",
183
+ "zh": " 已保存到您的记忆中(路径: {{path}})"
184
+ },
185
+ "file_decode_error": {
186
+ "en": "Failed to decode file: {{file_path}}. Tried encodings: {{encodings}}",
187
+ "zh": "无法解码文件: {{file_path}}。尝试的编码: {{encodings}}"
188
+ },
189
+ "file_write_error": {
190
+ "en": "Failed to write file: {{file_path}}. Error: {{error}}",
191
+ "zh": "无法写入文件: {{file_path}}. 错误: {{error}}"
192
+ },
193
+ "yaml_load_error": {
194
+ "en": "Error loading yaml file {{yaml_file}}: {{error}}",
195
+ "zh": "加载YAML文件出错 {{yaml_file}}: {{error}}"
196
+ },
197
+ "git_command_error": {
198
+ "en": "Git command execution error: {{error}}",
199
+ "zh": "Git命令执行错误: {{error}}"
200
+ },
201
+ "get_commit_diff_error": {
202
+ "en": "Error getting commit diff: {{error}}",
203
+ "zh": "获取commit diff时出错: {{error}}"
204
+ },
205
+ "no_latest_commit": {
206
+ "en": "Unable to get latest commit information",
207
+ "zh": "无法获取最新的提交信息"
208
+ },
209
+ "code_review_error": {
210
+ "en": "Code review process error: {{error}}",
211
+ "zh": "代码审查过程出错: {{error}}"
212
+ },
213
+ "index_file_too_large": {
214
+ "en": "⚠️ File {{ file_path }} is too large ({{ file_size }} > {{ max_length }}), splitting into chunks...",
215
+ "zh": "⚠️ 文件 {{ file_path }} 过大 ({{ file_size }} > {{ max_length }}), 正在分块处理..."
216
+ },
217
+ "index_update_success": {
218
+ "en": " {{ model_name }} Successfully updated index for {{ file_path }} (md5: {{ md5 }}) in {{ duration }}s, input_tokens: {{ input_tokens }}, output_tokens: {{ output_tokens }}, input_cost: {{ input_cost }}, output_cost: {{ output_cost }}",
219
+ "zh": " {{ model_name }} 成功更新 {{ file_path }} 的索引 (md5: {{ md5 }}), 耗时 {{ duration }} 秒, 输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}"
220
+ },
221
+ "index_build_error": {
222
+ "en": " {{ model_name }} Error building index for {{ file_path }}: {{ error }}",
223
+ "zh": " {{ model_name }} 构建 {{ file_path }} 索引时出错: {{ error }}"
224
+ },
225
+ "index_build_summary": {
226
+ "en": "📊 Total Files: {{ total_files }}, Need to Build Index: {{ num_files }}",
227
+ "zh": "📊 总文件数: {{ total_files }}, 需要构建索引: {{ num_files }}"
228
+ },
229
+ "building_index_progress": {
230
+ "en": " Building Index: {{ counter }}/{{ num_files }}...",
231
+ "zh": " 正在构建索引: {{ counter }}/{{ num_files }}..."
232
+ },
233
+ "index_source_dir_mismatch": {
234
+ "en": "⚠️ Source directory mismatch (file_path: {{ file_path }}, source_dir: {{ source_dir }})",
235
+ "zh": "⚠️ 源目录不匹配 (文件路径: {{ file_path }}, 源目录: {{ source_dir }})"
236
+ },
237
+ "index_related_files_fail": {
238
+ "en": "⚠️ Failed to find related files for chunk {{ chunk_count }}",
239
+ "zh": "⚠️ 无法为块 {{ chunk_count }} 找到相关文件"
240
+ },
241
+ "index_threads_completed": {
242
+ "en": " Completed {{ completed_threads }}/{{ total_threads }} threads",
243
+ "zh": "✅ 已完成 {{ completed_threads }}/{{ total_threads }} 个线程"
244
+ },
245
+ "index_file_removed": {
246
+ "en": "🗑️ Removed non-existent file index: {{ file_path }}",
247
+ "zh": "🗑️ 已移除不存在的文件索引:{{ file_path }}"
248
+ },
249
+ "index_file_saved": {
250
+ "en": "💾 Saved index file, updated {{ updated_files }} files, removed {{ removed_files }} files, input_tokens: {{ input_tokens }}, output_tokens: {{ output_tokens }}, input_cost: {{ input_cost }}, output_cost: {{ output_cost }}",
251
+ "zh": "💾 已保存索引文件,更新了 {{ updated_files }} 个文件,移除了 {{ removed_files }} 个文件,输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}"
252
+ },
253
+ "task_cancelled_by_user": {
254
+ "en": "Task was cancelled by user",
255
+ "zh": "任务被用户取消"
256
+ },
257
+ "cancellation_requested": {
258
+ "en": "Cancellation requested, waiting for thread to terminate...",
259
+ "zh": "已请求取消,正在等待线程终止..."
260
+ },
261
+ "force_terminating_thread": {
262
+ "en": "Force terminating thread after timeout",
263
+ "zh": "线程超时强制终止"
264
+ },
265
+ "force_raising_keyboard_interrupt": {
266
+ "en": "Force raising KeyboardInterrupt after timeout",
267
+ "zh": "超时强制抛出键盘中断异常"
268
+ },
269
+ "thread_terminated": {
270
+ "en": "Thread terminated",
271
+ "zh": "线程已终止"
272
+ },
273
+ "human_as_model_instructions": {
274
+ "en": "You are now in Human as Model mode. The content has been copied to your clipboard.\nThe system is waiting for your input. When finished, enter 'EOF' on a new line to submit.\nUse '/break' to exit this mode. If you have issues with copy-paste, use '/clear' to clean and paste again.",
275
+ "zh": "您现在处于人类作为模型模式。内容已复制到您的剪贴板。\n系统正在等待您的输入。完成后,在新行输入'EOF'提交。\n使用'/break'退出此模式。如果复制粘贴有问题,使用'/clear'清理并重新粘贴。"
276
+ },
277
+ "clipboard_not_supported": {
278
+ "en": "pyperclip not installed or clipboard is not supported, instruction will not be copied to clipboard.",
279
+ "zh": "未安装pyperclip或不支持剪贴板,指令将不会被复制到剪贴板。"
280
+ },
281
+ "human_as_model_instructions_no_clipboard": {
282
+ "en": "You are now in Human as Model mode. [bold red]The content could not be copied to your clipboard.[/bold red]\nbut you can copy prompt from output.txt file.\nThe system is waiting for your input. When finished, enter 'EOF' on a new line to submit.\nUse '/break' to exit this mode. If you have issues with copy-paste, use '/clear' to clean and paste again.",
283
+ "zh": "您现在处于人类作为模型模式。[bold red]内容无法复制到您的剪贴板。[/bold red]\n但您可以从output.txt文件复制提示。\n系统正在等待您的输入。完成后,在新行输入'EOF'提交。\n使用'/break'退出此模式。如果复制粘贴有问题,使用'/clear'清理并重新粘贴。"
284
+ },
285
+ "phase1_processing_sources": {
286
+ "en": "Phase 1: Processing REST/RAG/Search sources...",
287
+ "zh": "阶段 1: 正在处理 REST/RAG/Search 源..."
288
+ },
289
+ "phase2_building_index": {
290
+ "en": "Phase 2: Building index for all files...",
291
+ "zh": "阶段 2: 正在为所有文件构建索引..."
292
+ },
293
+ "phase6_file_selection": {
294
+ "en": "Phase 6: Processing file selection and limits...",
295
+ "zh": "阶段 6: 正在处理文件选择和限制..."
296
+ },
297
+ "phase7_preparing_output": {
298
+ "en": "Phase 7: Preparing final output...",
299
+ "zh": "阶段 7: 正在准备最终输出..."
300
+ },
301
+ "chat_human_as_model_instructions": {
302
+ "en": "Chat is now in Human as Model mode.\nThe question has been copied to your clipboard.\nPlease use Web version model to get the answer.\nOr use /conf human_as_model:false to close this mode and get the answer in terminal directlyPaste the answer to the input box below, use '/break' to exit, '/clear' to clear the screen, '/eof' to submit.",
303
+ "zh": "\n============= Chat 处于 Human as Model 模式 =============\n问题已复制到剪贴板\n请使用Web版本模型获取答案\n或者使用 /conf human_as_model:false 关闭该模式直接在终端获得答案。将获得答案黏贴到下面的输入框,换行后,使用 '/break' 退出,'/clear' 清屏,'/eof' 提交。"
304
+ },
305
+ "code_generation_start": {
306
+ "en": "Auto generate the code...",
307
+ "zh": "正在自动生成代码..."
308
+ },
309
+ "code_generation_complete": {
310
+ "en": "{{ model_names}} Code generation completed in {{ duration }} seconds (sampling_count: {{ sampling_count }}), input_tokens_count: {{ input_tokens }}, generated_tokens_count: {{ output_tokens }}, input_cost: {{ input_cost }}, output_cost: {{ output_cost }}, speed: {{ speed }} tokens/s",
311
+ "zh": "{{ model_names}} 代码生成完成,耗时 {{ duration }} 秒 (采样数: {{ sampling_count }}), 输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}, 速度: {{ speed }} tokens/秒"
312
+ },
313
+ "generate_max_rounds_reached": {
314
+ "en": "⚠️ Generation stopped after reaching the maximum allowed rounds ({{ count }}/{{ max_rounds }}). Current generated content length: {{ generated_tokens }}. If the output is incomplete, consider increasing 'generate_max_rounds' in configuration.",
315
+ "zh": "⚠️ 生成已停止,因为达到了最大允许轮数 ({{ count }}/{{ max_rounds }})。当前生成内容长度: {{ generated_tokens }} tokens。如果输出不完整,请考虑在配置中增加 'generate_max_rounds'。"
316
+ },
317
+ "code_merge_start": {
318
+ "en": "Auto merge the code...",
319
+ "zh": "正在自动合并代码..."
320
+ },
321
+ "code_execution_warning": {
322
+ "en": "Content(send to model) is {{ content_length }} tokens (you may collect too much files), which is larger than the maximum input length {{ max_length }}",
323
+ "zh": "发送给模型的内容长度为 {{ content_length }} tokens(您可能收集了太多文件),超过了最大输入长度 {{ max_length }}"
324
+ },
325
+ "quick_filter_start": {
326
+ "en": "{{ model_name }} Starting filter context(quick_filter)...",
327
+ "zh": "{{ model_name }} 开始查找上下文(quick_filter)..."
328
+ },
329
+ "normal_filter_start": {
330
+ "en": "{{ model_name }} Starting filter context(normal_filter)...",
331
+ "zh": "{{ model_name }} 开始查找上下文(normal_filter)..."
332
+ },
333
+ "pylint_check_failed": {
334
+ "en": "⚠️ Pylint check failed: {{ error_message }}",
335
+ "zh": "⚠️ Pylint 检查失败: {{ error_message }}"
336
+ },
337
+ "pylint_error": {
338
+ "en": " Error running pylint: {{ error_message }}",
339
+ "zh": " 运行 Pylint 时出错: {{ error_message }}"
340
+ },
341
+ "unmerged_blocks_warning": {
342
+ "en": "⚠️ Found {{ num_blocks }} unmerged blocks, the changes will not be applied. Please review them manually then try again.",
343
+ "zh": "⚠️ 发现 {{ num_blocks }} 个未合并的代码块,更改将不会被应用。请手动检查后重试。"
344
+ },
345
+ "pylint_file_check_failed": {
346
+ "en": "⚠️ Pylint check failed for {{ file_path }}. Changes not applied. Error: {{ error_message }}",
347
+ "zh": "⚠️ {{ file_path }} Pylint 检查失败。更改未应用。错误: {{ error_message }}"
348
+ },
349
+ "merge_success": {
350
+ "en": " Merged changes in {{ num_files }} files {{ num_changes }}/{{ total_blocks }} blocks.",
351
+ "zh": " 成功合并了 {{ num_files }} 个文件中的更改 {{ num_changes }}/{{ total_blocks }} 个代码块。"
352
+ },
353
+ "no_changes_made": {
354
+ "en": "⚠️ No changes were made to any files.",
355
+ "zh": "⚠️ 未对任何文件进行更改。这个原因可能是因为coding函数生成的文本块格式有问题,导致无法合并进项目"
356
+ },
357
+ "files_merged": {
358
+ "en": " Merged {{ total }} files into the project.",
359
+ "zh": "✅ 成功合并了 {{ total }} 个文件到项目中。"
360
+ },
361
+ "merge_failed": {
362
+ "en": " Merge file {{ path }} failed: {{ error }}",
363
+ "zh": " 合并文件 {{ path }} 失败: {{ error }}"
364
+ },
365
+ "files_merged_total": {
366
+ "en": "✅ Merged {{ total }} files into the project.",
367
+ "zh": " 合并了 {{ total }} 个文件到项目中。"
368
+ },
369
+ "ranking_skip": {
370
+ "en": "Only 1 candidate, skip ranking",
371
+ "zh": "只有1个候选项,跳过排序"
372
+ },
373
+ "ranking_start": {
374
+ "en": "Start ranking {{ count }} candidates using model {{ model_name }}",
375
+ "zh": "开始对 {{ count }} 个候选项进行排序,使用模型 {{ model_name }} 打分"
376
+ },
377
+ "ranking_failed_request": {
378
+ "en": "Ranking request failed: {{ error }}",
379
+ "zh": "排序请求失败: {{ error }}"
380
+ },
381
+ "ranking_all_failed": {
382
+ "en": "All ranking requests failed",
383
+ "zh": "所有排序请求都失败"
384
+ },
385
+ "ranking_complete": {
386
+ "en": "{{ model_names }} Ranking completed in {{ elapsed }}s, total voters: {{ total_tasks }}, best candidate index: {{ best_candidate }}, scores: {{ scores }}, input_tokens: {{ input_tokens }}, output_tokens: {{ output_tokens }}, input_cost: {{ input_cost }}, output_cost: {{ output_cost }}, speed: {{ speed }} tokens/s",
387
+ "zh": "{{ model_names }} 排序完成,耗时 {{ elapsed }} 秒,总投票数: {{ total_tasks }},最佳候选索引: {{ best_candidate }},得分: {{ scores }},输入token数: {{ input_tokens }},输出token数: {{ output_tokens }},输入成本: {{ input_cost }}, 输出成本: {{ output_cost }},速度: {{ speed }} tokens/秒"
388
+ },
389
+ "ranking_process_failed": {
390
+ "en": "Ranking process failed: {{ error }}",
391
+ "zh": "排序过程失败: {{ error }}"
392
+ },
393
+ "ranking_failed": {
394
+ "en": "Ranking failed in {{ elapsed }}s, using original order",
395
+ "zh": "排序失败,耗时 {{ elapsed }} 秒,使用原始顺序"
396
+ },
397
+ "begin_index_source_code": {
398
+ "en": "🚀 Begin to index source code in {{ source_dir }}",
399
+ "zh": "🚀 开始为 {{ source_dir }} 中的源代码建立索引"
400
+ },
401
+ "stream_out_stats": {
402
+ "en": "Model: {{ model_name }}, Total time: {{ elapsed_time }} seconds, First token time: {{ first_token_time }} seconds, Speed: {{ speed }} tokens/s, Input tokens: {{ input_tokens }}, Output tokens: {{ output_tokens }}, Input cost: {{ input_cost }}, Output cost: {{ output_cost }}",
403
+ "zh": "模型: {{ model_name }},总耗时 {{ elapsed_time }} 秒,首token时间: {{ first_token_time }} 秒, 速度: {{ speed }} tokens/秒, 输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}"
404
+ },
405
+ "quick_filter_stats": {
406
+ "en": "{{ model_names }} Quick filter completed in {{ elapsed_time }} seconds, input tokens: {{ input_tokens }}, output tokens: {{ output_tokens }}, input cost: {{ input_cost }}, output cost: {{ output_cost }} speed: {{ speed }} tokens/s",
407
+ "zh": "{{ model_names }} Quick Filter 完成耗时 {{ elapsed_time }} 秒,输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }} 速度: {{ speed }} tokens/秒"
408
+ },
409
+ "upsert_file": {
410
+ "en": "✅ Updated file: {{ file_path }}",
411
+ "zh": "✅ 更新文件: {{ file_path }}"
412
+ },
413
+ "unmerged_blocks_title": {
414
+ "en": "Unmerged Blocks",
415
+ "zh": "未合并代码块"
416
+ },
417
+ "merged_blocks_title": {
418
+ "en": "Merged Changes",
419
+ "zh": "合并的更改"
420
+ },
421
+ "quick_filter_title": {
422
+ "en": "{{ model_name }} is analyzing how to filter context...",
423
+ "zh": "{{ model_name }} 正在分析如何筛选上下文..."
424
+ },
425
+ "quick_filter_failed": {
426
+ "en": "❌ Quick filter failed: {{ error }}. ",
427
+ "zh": "❌ 快速过滤器失败: {{ error }}. "
428
+ },
429
+ "unmerged_file_path": {
430
+ "en": "File: {{file_path}}",
431
+ "zh": "文件: {{file_path}}"
432
+ },
433
+ "unmerged_search_block": {
434
+ "en": "Search Block({{similarity}}):",
435
+ "zh": "Search Block({{similarity}}):"
436
+ },
437
+ "unmerged_replace_block": {
438
+ "en": "Replace Block:",
439
+ "zh": "Replace Block:"
440
+ },
441
+ "unmerged_blocks_total": {
442
+ "en": "Total unmerged blocks: {{num_blocks}}",
443
+ "zh": "未合并代码块数量: {{num_blocks}}"
444
+ },
445
+ "git_init_required": {
446
+ "en": "⚠️ auto_merge only applies to git repositories.\n\nPlease try using git init in the source directory:\n\n```shell\ncd {{ source_dir }}\ngit init.\n```\n\nThen run auto - coder again.\nError: {{ error }}",
447
+ "zh": "⚠️ auto_merge 仅适用于 git 仓库。\n\n请尝试在源目录中使用 git init:\n\n```shell\ncd {{ source_dir }}\ngit init.\n```\n\n然后再次运行 auto-coder。\n错误: {{ error }}"
448
+ },
449
+ "quick_filter_reason": {
450
+ "en": "Auto get(quick_filter mode)",
451
+ "zh": "自动获取(quick_filter模式)"
452
+ },
453
+ "quick_filter_too_long": {
454
+ "en": "⚠️ index file is too large ({{ tokens_len }}/{{ max_tokens }}). The query will be split into {{ split_size }} chunks.",
455
+ "zh": "⚠️ 索引文件过大 ({{ tokens_len }}/{{ max_tokens }})。查询将被分成 {{ split_size }} 个部分执行。"
456
+ },
457
+ "quick_filter_tokens_len": {
458
+ "en": "📊 Current index size: {{ tokens_len }} tokens",
459
+ "zh": "📊 当前索引大小: {{ tokens_len }} tokens"
460
+ },
461
+ "estimated_chat_input_tokens": {
462
+ "en": "Estimated chat input tokens: {{ estimated_input_tokens }}",
463
+ "zh": "对话输入token预估为: {{ estimated_input_tokens }}"
464
+ },
465
+ "estimated_input_tokens_in_generate": {
466
+ "en": "Estimated input tokens in generate ({{ generate_mode }}): {{ estimated_input_tokens_in_generate }}",
467
+ "zh": "生成代码({{ generate_mode }})预计输入token数: {{ estimated_input_tokens_in_generate }}"
468
+ },
469
+ "model_has_access_restrictions": {
470
+ "en": "{{model_name}} has access restrictions, cannot use the current function",
471
+ "zh": "{{model_name}} 有访问限制,无法使用当前功能"
472
+ },
473
+ "auto_command_not_found": {
474
+ "en": "Auto command not found: {{command}}. Please check your input and try again.",
475
+ "zh": "未找到自动命令: {{command}}。请检查您的输入并重试。"
476
+ },
477
+ "auto_command_failed": {
478
+ "en": "Auto command failed: {{error}}. Please check your input and try again.",
479
+ "zh": "自动命令执行失败: {{error}}。请检查您的输入并重试。"
480
+ },
481
+ "command_execution_result": {
482
+ "en": "{{action}} execution result",
483
+ "zh": "{{action}} 执行结果"
484
+ },
485
+ "satisfied_prompt": {
486
+ "en": "Requirements satisfied, no further action needed",
487
+ "zh": "已满足需求,无需进一步操作"
488
+ },
489
+ "auto_command_analyzed": {
490
+ "en": "Selected command",
491
+ "zh": "被选择指令"
492
+ },
493
+ "invalid_enum_value": {
494
+ "en": "Value '{{value}}' is not in allowed values ({{allowed}})",
495
+ "zh": "值 '{{value}}' 不在允许的值列表中 ({{allowed}})"
496
+ },
497
+ "conversation_pruning_start": {
498
+ "en": "⚠️ Conversation pruning started, total tokens: {{total_tokens}}, safe zone: {{safe_zone}}",
499
+ "zh": "⚠️ 对话长度 {{total_tokens}} tokens 超过安全阈值 {{safe_zone}},开始修剪对话。"
500
+ },
501
+ "invalid_file_number": {
502
+ "en": "⚠️ Invalid file number {{file_number}}, total files: {{total_files}}",
503
+ "zh": "⚠️ 无效的文件编号 {{file_number}},总文件数为 {{total_files}}"
504
+ },
505
+ "all_merge_results_failed": {
506
+ "en": "⚠️ All merge attempts failed, returning first candidate",
507
+ "zh": "⚠️ 所有合并尝试都失败,返回第一个候选"
508
+ },
509
+ "only_one_merge_result_success": {
510
+ "en": "✅ Only one merge result succeeded, returning that candidate",
511
+ "zh": "✅ 只有一个合并结果成功,返回该候选"
512
+ },
513
+ "conf_import_success": {
514
+ "en": "Successfully imported configuration: {{path}}",
515
+ "zh": "成功导入配置: {{path}}"
516
+ },
517
+ "conf_export_success": {
518
+ "en": "Successfully exported configuration: {{path}}",
519
+ "zh": "成功导出配置: {{path}}"
520
+ },
521
+ "conf_import_error": {
522
+ "en": "Error importing configuration: {{error}}",
523
+ "zh": "导入配置出错: {{error}}"
524
+ },
525
+ "conf_export_error": {
526
+ "en": "Error exporting configuration: {{error}}",
527
+ "zh": "导出配置出错: {{error}}"
528
+ },
529
+ "conf_import_invalid_format": {
530
+ "en": "Invalid import configuration format, expected 'key:value'",
531
+ "zh": "导入配置格式无效, 应为 'key:value' 格式"
532
+ },
533
+ "conf_export_invalid_format": {
534
+ "en": "Invalid export configuration format, expected 'key:value'",
535
+ "zh": "导出配置格式无效, 应为 'key:value' 格式"
536
+ },
537
+ "conf_import_file_not_found": {
538
+ "en": "Import configuration file not found: {{file_path}}",
539
+ "zh": "未找到导入配置文件: {{file_path}}"
540
+ },
541
+ "conf_export_file_not_found": {
542
+ "en": "Export configuration file not found: {{file_path}}",
543
+ "zh": "未找到导出配置文件: {{file_path}}"
544
+ },
545
+ "conf_import_file_empty": {
546
+ "en": "Import configuration file is empty: {{file_path}}",
547
+ "zh": "导入配置文件为空: {{file_path}}"
548
+ },
549
+ "conf_export_file_empty": {
550
+ "en": "Export configuration file is empty: {{file_path}}",
551
+ "zh": "导出配置文件为空: {{file_path}}"
552
+ },
553
+ "generated_shell_script": {
554
+ "en": "Generated Shell Script",
555
+ "zh": "生成的 Shell 脚本"
556
+ },
557
+ "confirm_execute_shell_script": {
558
+ "en": "Do you want to execute this shell script?",
559
+ "zh": "您要执行此 shell 脚本吗?"
560
+ },
561
+ "shell_script_not_executed": {
562
+ "en": "Shell script was not executed",
563
+ "zh": "Shell 脚本未执行"
564
+ },
565
+ "index_export_success": {
566
+ "en": "Index exported successfully: {{path}}",
567
+ "zh": "索引导出成功: {{path}}"
568
+ },
569
+ "index_import_success": {
570
+ "en": "Index imported successfully: {{path}}",
571
+ "zh": "索引导入成功: {{path}}"
572
+ },
573
+ "edits_title": {
574
+ "en": "edits",
575
+ "zh": "编辑块"
576
+ },
577
+ "diff_blocks_title": {
578
+ "en": "diff blocks",
579
+ "zh": "差异块"
580
+ },
581
+ "index_exclude_files_error": {
582
+ "en": "index filter exclude files fail: {{ error }}",
583
+ "zh": "索引排除文件时出错: {{error}}"
584
+ },
585
+ "file_sliding_window_processing": {
586
+ "en": "File {{ file_path }} is too large ({{ tokens }} tokens), processing with sliding window...",
587
+ "zh": "文件 {{ file_path }} 过大 ({{ tokens }} tokens),正在使用滑动窗口处理..."
588
+ },
589
+ "file_snippet_processing": {
590
+ "en": "Processing file {{ file_path }} with code snippet extraction...",
591
+ "zh": "正在对文件 {{ file_path }} 进行代码片段提取..."
592
+ },
593
+ "context_pruning_start": {
594
+ "en": "⚠️ Context pruning started. Total tokens: {{ total_tokens }} (max allowed: {{ max_tokens }}). Applying strategy: {{ strategy }}.",
595
+ "zh": "⚠️ 开始上下文剪枝。总token数: {{ total_tokens }} (最大允许: {{ max_tokens }})。正在应用策略: {{ strategy }}。"
596
+ },
597
+ "context_pruning_reason": {
598
+ "en": "Context length exceeds maximum limit ({{ total_tokens }} > {{ max_tokens }}). Pruning is required to fit within the model's context window.",
599
+ "zh": "上下文长度超过最大限制 ({{ total_tokens }} > {{ max_tokens }})。需要进行剪枝以适配模型的上下文窗口。"
600
+ },
601
+ "rank_code_modification_title": {
602
+ "en": "{{model_name}} ranking codes",
603
+ "zh": "模型{{model_name}}对代码打分"
604
+ },
605
+ "sorted_files_message": {
606
+ "en": "Reordered files:\n{% for file in files %}- {{ file }}\n{% endfor %}",
607
+ "zh": "重新排序后的文件路径:\n{% for file in files %}- {{ file }}\n{% endfor %}"
608
+ },
609
+ "estimated_input_tokens_in_ranking": {
610
+ "en": "estimate input token {{ estimated_input_tokens }} when ranking",
611
+ "zh": "排序预计输入token数: {{ estimated_input_tokens }}"
612
+ },
613
+ "file_snippet_procesed": {
614
+ "en": "{{ file_path }} processed with tokens: {{ tokens }} => {{ snippet_tokens }}. Current total tokens: {{ total_tokens }}",
615
+ "zh": "文件 {{ file_path }} 处理后token数: {{ tokens }} => {{ snippet_tokens }} 当前总token数: {{ total_tokens }}"
616
+ },
617
+ "tool_ask_user": {
618
+ "en": "Your Reply: ",
619
+ "zh": "您的回复: "
620
+ },
621
+ "tool_ask_user_accept": {
622
+ "en": "Your Response received",
623
+ "zh": "收到您的回复"
624
+ },
625
+ "auto_web_analyzing": {
626
+ "en": "Analyzing web automation task...",
627
+ "zh": "正在分析网页自动化任务..."
628
+ },
629
+ "auto_web_analyzed": {
630
+ "en": "Web automation task analysis completed",
631
+ "zh": "网页自动化任务分析完成"
632
+ },
633
+ "executing_web_action": {
634
+ "en": "Executing action: {{action}} - {{description}}",
635
+ "zh": "执行操作: {{action}} - {{description}}"
636
+ },
637
+ "executing_step": {
638
+ "en": "Executing step {{step}}: {{description}}",
639
+ "zh": "执行步骤 {{step}}: {{description}}"
640
+ },
641
+ "operation_cancelled": {
642
+ "en": "Operation cancelled",
643
+ "zh": "操作已取消"
644
+ },
645
+ "element_not_found": {
646
+ "en": "Element not found: {{element}}",
647
+ "zh": "未找到元素: {{element}}"
648
+ },
649
+ "analyzing_results": {
650
+ "en": "Analyzing execution results...",
651
+ "zh": "分析执行结果..."
652
+ },
653
+ "next_steps_determined": {
654
+ "en": "Next steps determined",
655
+ "zh": "已确定下一步操作"
656
+ },
657
+ "max_iterations_reached": {
658
+ "en": "Max iterations reached ({max_iterations})",
659
+ "zh": "已达到最大迭代次数 {{max_iterations}}"
660
+ },
661
+ "action_verification_failed": {
662
+ "en": "Action verification failed: {{action}} - {{reason}}",
663
+ "zh": "操作验证失败: {{action}} - {{reason}}"
664
+ },
665
+ "action_succeeded": {
666
+ "en": "Action succeeded: {{action}}",
667
+ "zh": "操作成功: {{action}}"
668
+ },
669
+ "replanned_actions": {
670
+ "en": "Replanned {{count}} actions",
671
+ "zh": "已重新规划 {{count}} 个操作"
672
+ },
673
+ "web_automation_ask_user": {
674
+ "en": "Your answer: ",
675
+ "zh": "您的回答: "
676
+ },
677
+ "filter_mode_normal": {
678
+ "en": "Using normal filter mode for index processing...",
679
+ "zh": "正在使用普通过滤模式处理索引..."
680
+ },
681
+ "filter_mode_big": {
682
+ "en": "Index file is large ({{ tokens_len }} tokens), using big_filter mode for processing...",
683
+ "zh": "索引文件较大 ({{ tokens_len }} tokens),正在使用 big_filter 模式处理..."
684
+ },
685
+ "filter_mode_super_big": {
686
+ "en": "Index file is very large ({{ tokens_len }} tokens), using super_big_filter mode for processing...",
687
+ "zh": "索引文件非常大 ({{ tokens_len }} tokens),正在使用 super_big_filter 模式处理..."
688
+ },
689
+ "super_big_filter_failed": {
690
+ "en": "❌ Super big filter failed: {{ error }}.",
691
+ "zh": "❌ 超大过滤器失败: {{ error }}."
692
+ },
693
+ "super_big_filter_stats": {
694
+ "en": "{{ model_names }} Super big filter completed in {{ elapsed_time }} seconds, input tokens: {{ input_tokens }}, output tokens: {{ output_tokens }}, input cost: {{ input_cost }}, output cost: {{ output_cost }}, speed: {{ speed }} tokens/s, chunk_index: {{ chunk_index }}",
695
+ "zh": "{{ model_names }} 超大过滤器完成耗时 {{ elapsed_time }} 秒,输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}, 速度: {{ speed }} tokens/秒, 块索引: {{ chunk_index }}"
696
+ },
697
+ "super_big_filter_splitting": {
698
+ "en": "⚠️ Index file is extremely large ({{ tokens_len }}/{{ max_tokens }}). The query will be split into {{ split_size }} chunks for processing.",
699
+ "zh": "⚠️ 索引文件极其庞大 ({{ tokens_len }}/{{ max_tokens }})。查询将被分成 {{ split_size }} 个部分进行处理。"
700
+ },
701
+ "super_big_filter_title": {
702
+ "en": "{{ model_name }} is analyzing how to filter extremely large context...",
703
+ "zh": "{{ model_name }} 正在分析如何过滤极大规模上下文..."
704
+ },
705
+ "mcp_server_info_error": {
706
+ "en": "Error getting MCP server info: {{ error }}",
707
+ "zh": "获取MCP服务器信息时出错: {{ error }}"
708
+ },
709
+ "mcp_server_info_title": {
710
+ "en": "Connected MCP Server Info",
711
+ "zh": "已连接的MCP服务器信息"
712
+ },
713
+ "no_commit_file_name": {
714
+ "en": "Cannot get the file name of the commit_id in the actions directory: {{commit_id}}",
715
+ "zh": "无法获取commit_id关联的actions 目录下的文件名: {{commit_id}}"
716
+ },
717
+ "yaml_update_success": {
718
+ "en": "✅ Successfully updated YAML file: {{yaml_file}}",
719
+ "zh": "✅ 成功更新YAML文件: {{yaml_file}}"
720
+ },
721
+ "yaml_save_error": {
722
+ "en": "❌ Error saving YAML file {{yaml_file}}: {{error}}",
723
+ "zh": "❌ 保存YAML文件出错 {{yaml_file}}: {{error}}"
724
+ },
725
+ "active_context_background_task": {
726
+ "en": "🔄 Active context generation started in background (task ID: {{task_id}})",
727
+ "zh": "🔄 正在后台生成活动上下文 (任务ID: {{task_id}})"
728
+ },
729
+ "conf_not_found": {
730
+ "en": "Configuration not found: {{path}}",
731
+ "zh": "未找到配置文件: {{path}}"
732
+ },
733
+ "code_generate_title": {
734
+ "en": "{{model_name}} is generating code",
735
+ "zh": "{{model_name}}正在生成代码"
736
+ }
737
+ }
404
738
 
405
739
 
406
740
  def get_system_language():
@@ -412,7 +746,9 @@ def get_system_language():
412
746
 
413
747
  def get_message(key):
414
748
  lang = get_system_language()
415
- return MESSAGES.get(lang, MESSAGES['en']).get(key, MESSAGES['en'][key])
749
+ if key in MESSAGES:
750
+ return MESSAGES[key].get(lang, MESSAGES[key].get("en", ""))
751
+ return ""
416
752
 
417
753
 
418
754
  def get_message_with_format(msg_key: str, **kwargs):