auto-coder 1.0.0__py3-none-any.whl → 2.0.1__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 (574) hide show
  1. auto_coder-2.0.1.dist-info/LICENSE +158 -0
  2. auto_coder-2.0.1.dist-info/METADATA +558 -0
  3. auto_coder-2.0.1.dist-info/RECORD +795 -0
  4. {auto_coder-1.0.0.dist-info → auto_coder-2.0.1.dist-info}/WHEEL +1 -1
  5. {auto_coder-1.0.0.dist-info → auto_coder-2.0.1.dist-info}/entry_points.txt +3 -3
  6. autocoder/__init__.py +31 -0
  7. autocoder/agent/auto_filegroup.py +32 -13
  8. autocoder/agent/auto_learn_from_commit.py +9 -1
  9. autocoder/agent/base_agentic/__init__.py +3 -0
  10. autocoder/agent/base_agentic/agent_hub.py +1 -1
  11. autocoder/agent/base_agentic/base_agent.py +235 -136
  12. autocoder/agent/base_agentic/default_tools.py +119 -118
  13. autocoder/agent/base_agentic/test_base_agent.py +1 -1
  14. autocoder/agent/base_agentic/tool_registry.py +32 -20
  15. autocoder/agent/base_agentic/tools/read_file_tool_resolver.py +24 -3
  16. autocoder/agent/base_agentic/tools/write_to_file_tool_resolver.py +24 -11
  17. autocoder/agent/base_agentic/types.py +42 -0
  18. autocoder/agent/entry_command_agent/chat.py +77 -73
  19. autocoder/auto_coder.py +31 -40
  20. autocoder/auto_coder_rag.py +11 -1084
  21. autocoder/auto_coder_runner.py +962 -2345
  22. autocoder/auto_coder_terminal.py +26 -0
  23. autocoder/auto_coder_terminal_v3.py +190 -0
  24. autocoder/chat/conf_command.py +224 -124
  25. autocoder/chat/models_command.py +361 -299
  26. autocoder/chat/rules_command.py +79 -31
  27. autocoder/chat_auto_coder.py +988 -398
  28. autocoder/chat_auto_coder_lang.py +23 -732
  29. autocoder/commands/auto_command.py +25 -8
  30. autocoder/commands/auto_web.py +1 -1
  31. autocoder/commands/tools.py +44 -44
  32. autocoder/common/__init__.py +150 -128
  33. autocoder/common/ac_style_command_parser/__init__.py +39 -2
  34. autocoder/common/ac_style_command_parser/config.py +422 -0
  35. autocoder/common/ac_style_command_parser/parser.py +292 -78
  36. autocoder/common/ac_style_command_parser/test_parser.py +241 -16
  37. autocoder/common/ac_style_command_parser/test_typed_parser.py +342 -0
  38. autocoder/common/ac_style_command_parser/typed_parser.py +653 -0
  39. autocoder/common/action_yml_file_manager.py +25 -13
  40. autocoder/common/agent_events/__init__.py +52 -0
  41. autocoder/common/agent_events/agent_event_emitter.py +193 -0
  42. autocoder/common/agent_events/event_factory.py +177 -0
  43. autocoder/common/agent_events/examples.py +307 -0
  44. autocoder/common/agent_events/types.py +113 -0
  45. autocoder/common/agent_events/utils.py +68 -0
  46. autocoder/common/agent_hooks/__init__.py +44 -0
  47. autocoder/common/agent_hooks/examples.py +582 -0
  48. autocoder/common/agent_hooks/hook_executor.py +217 -0
  49. autocoder/common/agent_hooks/hook_manager.py +288 -0
  50. autocoder/common/agent_hooks/types.py +133 -0
  51. autocoder/common/agent_hooks/utils.py +99 -0
  52. autocoder/common/agent_query_queue/queue_executor.py +324 -0
  53. autocoder/common/agent_query_queue/queue_manager.py +325 -0
  54. autocoder/common/agents/__init__.py +11 -0
  55. autocoder/common/agents/agent_manager.py +323 -0
  56. autocoder/common/agents/agent_parser.py +189 -0
  57. autocoder/common/agents/example_usage.py +344 -0
  58. autocoder/common/agents/integration_example.py +330 -0
  59. autocoder/common/agents/test_agent_parser.py +545 -0
  60. autocoder/common/async_utils.py +101 -0
  61. autocoder/common/auto_coder_lang.py +23 -972
  62. autocoder/common/autocoderargs_parser/__init__.py +14 -0
  63. autocoder/common/autocoderargs_parser/parser.py +184 -0
  64. autocoder/common/autocoderargs_parser/tests/__init__.py +1 -0
  65. autocoder/common/autocoderargs_parser/tests/test_args_parser.py +235 -0
  66. autocoder/common/autocoderargs_parser/tests/test_token_parser.py +195 -0
  67. autocoder/common/autocoderargs_parser/token_parser.py +290 -0
  68. autocoder/common/buildin_tokenizer.py +2 -4
  69. autocoder/common/code_auto_generate.py +149 -74
  70. autocoder/common/code_auto_generate_diff.py +163 -70
  71. autocoder/common/code_auto_generate_editblock.py +179 -89
  72. autocoder/common/code_auto_generate_strict_diff.py +167 -72
  73. autocoder/common/code_auto_merge_editblock.py +13 -6
  74. autocoder/common/code_modification_ranker.py +1 -1
  75. autocoder/common/command_completer.py +3 -3
  76. autocoder/common/command_file_manager/manager.py +183 -47
  77. autocoder/common/command_file_manager/test_command_file_manager.py +507 -0
  78. autocoder/common/command_templates.py +1 -1
  79. autocoder/common/conf_utils.py +2 -4
  80. autocoder/common/conversations/config.py +11 -3
  81. autocoder/common/conversations/get_conversation_manager.py +100 -2
  82. autocoder/common/conversations/llm_stats_models.py +264 -0
  83. autocoder/common/conversations/manager.py +112 -28
  84. autocoder/common/conversations/models.py +16 -2
  85. autocoder/common/conversations/storage/index_manager.py +134 -10
  86. autocoder/common/core_config/__init__.py +63 -0
  87. autocoder/common/core_config/agentic_mode_manager.py +109 -0
  88. autocoder/common/core_config/base_manager.py +123 -0
  89. autocoder/common/core_config/compatibility.py +151 -0
  90. autocoder/common/core_config/config_manager.py +156 -0
  91. autocoder/common/core_config/conversation_manager.py +31 -0
  92. autocoder/common/core_config/exclude_manager.py +72 -0
  93. autocoder/common/core_config/file_manager.py +177 -0
  94. autocoder/common/core_config/human_as_model_manager.py +129 -0
  95. autocoder/common/core_config/lib_manager.py +54 -0
  96. autocoder/common/core_config/main_manager.py +81 -0
  97. autocoder/common/core_config/mode_manager.py +126 -0
  98. autocoder/common/core_config/models.py +70 -0
  99. autocoder/common/core_config/test_memory_manager.py +1056 -0
  100. autocoder/common/env_manager.py +282 -0
  101. autocoder/common/env_manager_usage_example.py +211 -0
  102. autocoder/common/file_checkpoint/conversation_checkpoint.py +19 -19
  103. autocoder/common/file_checkpoint/manager.py +264 -48
  104. autocoder/common/file_checkpoint/test_backup.py +1 -18
  105. autocoder/common/file_checkpoint/test_manager.py +270 -1
  106. autocoder/common/file_checkpoint/test_store.py +1 -17
  107. autocoder/common/file_handler/__init__.py +23 -0
  108. autocoder/common/file_handler/active_context_handler.py +159 -0
  109. autocoder/common/file_handler/add_files_handler.py +409 -0
  110. autocoder/common/file_handler/chat_handler.py +180 -0
  111. autocoder/common/file_handler/coding_handler.py +409 -0
  112. autocoder/common/file_handler/commit_handler.py +200 -0
  113. autocoder/common/file_handler/lib_handler.py +156 -0
  114. autocoder/common/file_handler/list_files_handler.py +111 -0
  115. autocoder/common/file_handler/mcp_handler.py +268 -0
  116. autocoder/common/file_handler/models_handler.py +493 -0
  117. autocoder/common/file_handler/remove_files_handler.py +172 -0
  118. autocoder/common/git_utils.py +44 -8
  119. autocoder/common/global_cancel.py +15 -6
  120. autocoder/common/ignorefiles/test_ignore_file_utils.py +1 -1
  121. autocoder/common/international/__init__.py +31 -0
  122. autocoder/common/international/demo_international.py +92 -0
  123. autocoder/common/international/message_manager.py +157 -0
  124. autocoder/common/international/messages/__init__.py +56 -0
  125. autocoder/common/international/messages/async_command_messages.py +507 -0
  126. autocoder/common/international/messages/auto_coder_messages.py +2208 -0
  127. autocoder/common/international/messages/chat_auto_coder_messages.py +1547 -0
  128. autocoder/common/international/messages/command_help_messages.py +986 -0
  129. autocoder/common/international/messages/conversation_command_messages.py +191 -0
  130. autocoder/common/international/messages/git_helper_plugin_messages.py +159 -0
  131. autocoder/common/international/messages/queue_command_messages.py +751 -0
  132. autocoder/common/international/messages/rules_command_messages.py +77 -0
  133. autocoder/common/international/messages/sdk_messages.py +1707 -0
  134. autocoder/common/international/messages/token_helper_plugin_messages.py +361 -0
  135. autocoder/common/international/messages/tool_display_messages.py +1212 -0
  136. autocoder/common/international/messages/workflow_exception_messages.py +473 -0
  137. autocoder/common/international/test_international.py +612 -0
  138. autocoder/common/linter_core/__init__.py +28 -0
  139. autocoder/common/linter_core/base_linter.py +61 -0
  140. autocoder/common/linter_core/config_loader.py +271 -0
  141. autocoder/common/linter_core/formatters/__init__.py +0 -0
  142. autocoder/common/linter_core/formatters/base_formatter.py +38 -0
  143. autocoder/common/linter_core/formatters/raw_formatter.py +17 -0
  144. autocoder/common/linter_core/linter.py +166 -0
  145. autocoder/common/linter_core/linter_factory.py +216 -0
  146. autocoder/common/linter_core/linter_manager.py +333 -0
  147. autocoder/common/linter_core/linters/__init__.py +9 -0
  148. autocoder/common/linter_core/linters/java_linter.py +342 -0
  149. autocoder/common/linter_core/linters/python_linter.py +115 -0
  150. autocoder/common/linter_core/linters/typescript_linter.py +119 -0
  151. autocoder/common/linter_core/models/__init__.py +7 -0
  152. autocoder/common/linter_core/models/lint_result.py +91 -0
  153. autocoder/common/linter_core/models.py +33 -0
  154. autocoder/common/linter_core/tests/__init__.py +3 -0
  155. autocoder/common/linter_core/tests/test_config_loader.py +323 -0
  156. autocoder/common/linter_core/tests/test_config_loading.py +308 -0
  157. autocoder/common/linter_core/tests/test_factory_manager.py +234 -0
  158. autocoder/common/linter_core/tests/test_formatters.py +147 -0
  159. autocoder/common/linter_core/tests/test_integration.py +317 -0
  160. autocoder/common/linter_core/tests/test_java_linter.py +496 -0
  161. autocoder/common/linter_core/tests/test_linters.py +265 -0
  162. autocoder/common/linter_core/tests/test_models.py +81 -0
  163. autocoder/common/linter_core/tests/verify_config_loading.py +296 -0
  164. autocoder/common/linter_core/tests/verify_fixes.py +183 -0
  165. autocoder/common/llm_friendly_package/__init__.py +31 -0
  166. autocoder/common/llm_friendly_package/base_manager.py +102 -0
  167. autocoder/common/llm_friendly_package/docs_manager.py +121 -0
  168. autocoder/common/llm_friendly_package/library_manager.py +171 -0
  169. autocoder/common/{llm_friendly_package.py → llm_friendly_package/main_manager.py} +204 -231
  170. autocoder/common/llm_friendly_package/models.py +40 -0
  171. autocoder/common/llm_friendly_package/test_llm_friendly_package.py +536 -0
  172. autocoder/common/llms/__init__.py +15 -0
  173. autocoder/common/llms/demo_error_handling.py +85 -0
  174. autocoder/common/llms/factory.py +142 -0
  175. autocoder/common/llms/manager.py +264 -0
  176. autocoder/common/llms/pricing.py +121 -0
  177. autocoder/common/llms/registry.py +316 -0
  178. autocoder/common/llms/schema.py +77 -0
  179. autocoder/common/llms/simple_demo.py +45 -0
  180. autocoder/common/llms/test_quick_model.py +116 -0
  181. autocoder/common/llms/test_remove_functionality.py +182 -0
  182. autocoder/common/llms/tests/__init__.py +1 -0
  183. autocoder/common/llms/tests/test_manager.py +330 -0
  184. autocoder/common/llms/tests/test_registry.py +364 -0
  185. autocoder/common/mcp_tools/__init__.py +62 -0
  186. autocoder/common/{mcp_tools.py → mcp_tools/executor.py} +49 -40
  187. autocoder/common/{mcp_hub.py → mcp_tools/hub.py} +42 -68
  188. autocoder/common/{mcp_server_install.py → mcp_tools/installer.py} +16 -28
  189. autocoder/common/{mcp_server.py → mcp_tools/server.py} +176 -48
  190. autocoder/common/mcp_tools/test_keyboard_interrupt.py +93 -0
  191. autocoder/common/mcp_tools/test_mcp_tools.py +391 -0
  192. autocoder/common/{mcp_server_types.py → mcp_tools/types.py} +121 -48
  193. autocoder/common/mcp_tools/verify_functionality.py +202 -0
  194. autocoder/common/model_speed_tester.py +32 -26
  195. autocoder/common/priority_directory_finder/__init__.py +142 -0
  196. autocoder/common/priority_directory_finder/examples.py +230 -0
  197. autocoder/common/priority_directory_finder/finder.py +283 -0
  198. autocoder/common/priority_directory_finder/models.py +236 -0
  199. autocoder/common/priority_directory_finder/test_priority_directory_finder.py +431 -0
  200. autocoder/common/project_scanner/__init__.py +18 -0
  201. autocoder/common/project_scanner/compat.py +77 -0
  202. autocoder/common/project_scanner/scanner.py +436 -0
  203. autocoder/common/project_tracker/__init__.py +27 -0
  204. autocoder/common/project_tracker/api.py +228 -0
  205. autocoder/common/project_tracker/demo.py +272 -0
  206. autocoder/common/project_tracker/tracker.py +487 -0
  207. autocoder/common/project_tracker/types.py +53 -0
  208. autocoder/common/pruner/__init__.py +67 -0
  209. autocoder/common/pruner/agentic_conversation_pruner.py +651 -102
  210. autocoder/common/pruner/conversation_message_ids_api.py +386 -0
  211. autocoder/common/pruner/conversation_message_ids_manager.py +347 -0
  212. autocoder/common/pruner/conversation_message_ids_pruner.py +473 -0
  213. autocoder/common/pruner/conversation_normalizer.py +347 -0
  214. autocoder/common/pruner/conversation_pruner.py +26 -6
  215. autocoder/common/pruner/test_agentic_conversation_pruner.py +554 -112
  216. autocoder/common/pruner/test_conversation_normalizer.py +502 -0
  217. autocoder/common/pruner/test_tool_content_detector.py +324 -0
  218. autocoder/common/pruner/tool_content_detector.py +227 -0
  219. autocoder/common/pruner/tools/__init__.py +18 -0
  220. autocoder/common/pruner/tools/query_message_ids.py +264 -0
  221. autocoder/common/pruner/tools/test_agentic_pruning_logic.py +432 -0
  222. autocoder/common/pruner/tools/test_message_ids_pruning_only.py +192 -0
  223. autocoder/common/pull_requests/__init__.py +9 -1
  224. autocoder/common/pull_requests/utils.py +122 -1
  225. autocoder/common/rag_manager/rag_manager.py +36 -40
  226. autocoder/common/rulefiles/__init__.py +53 -1
  227. autocoder/common/rulefiles/api.py +250 -0
  228. autocoder/common/rulefiles/core/__init__.py +14 -0
  229. autocoder/common/rulefiles/core/manager.py +241 -0
  230. autocoder/common/rulefiles/core/selector.py +805 -0
  231. autocoder/common/rulefiles/models/__init__.py +20 -0
  232. autocoder/common/rulefiles/models/index.py +16 -0
  233. autocoder/common/rulefiles/models/init_rule.py +18 -0
  234. autocoder/common/rulefiles/models/rule_file.py +18 -0
  235. autocoder/common/rulefiles/models/rule_relevance.py +14 -0
  236. autocoder/common/rulefiles/models/summary.py +16 -0
  237. autocoder/common/rulefiles/test_rulefiles.py +776 -0
  238. autocoder/common/rulefiles/utils/__init__.py +34 -0
  239. autocoder/common/rulefiles/utils/monitor.py +86 -0
  240. autocoder/common/rulefiles/utils/parser.py +230 -0
  241. autocoder/common/save_formatted_log.py +67 -10
  242. autocoder/common/search_replace.py +8 -1
  243. autocoder/common/search_replace_patch/__init__.py +24 -0
  244. autocoder/common/search_replace_patch/base.py +115 -0
  245. autocoder/common/search_replace_patch/manager.py +248 -0
  246. autocoder/common/search_replace_patch/patch_replacer.py +304 -0
  247. autocoder/common/search_replace_patch/similarity_replacer.py +306 -0
  248. autocoder/common/search_replace_patch/string_replacer.py +181 -0
  249. autocoder/common/search_replace_patch/tests/__init__.py +3 -0
  250. autocoder/common/search_replace_patch/tests/run_tests.py +126 -0
  251. autocoder/common/search_replace_patch/tests/test_base.py +188 -0
  252. autocoder/common/search_replace_patch/tests/test_empty_line_insert.py +233 -0
  253. autocoder/common/search_replace_patch/tests/test_integration.py +389 -0
  254. autocoder/common/search_replace_patch/tests/test_manager.py +351 -0
  255. autocoder/common/search_replace_patch/tests/test_patch_replacer.py +316 -0
  256. autocoder/common/search_replace_patch/tests/test_regex_replacer.py +306 -0
  257. autocoder/common/search_replace_patch/tests/test_similarity_replacer.py +384 -0
  258. autocoder/common/shell_commands/__init__.py +197 -0
  259. autocoder/common/shell_commands/background_process_notifier.py +346 -0
  260. autocoder/common/shell_commands/command_executor.py +1127 -0
  261. autocoder/common/shell_commands/error_recovery.py +541 -0
  262. autocoder/common/shell_commands/exceptions.py +120 -0
  263. autocoder/common/shell_commands/interactive_executor.py +476 -0
  264. autocoder/common/shell_commands/interactive_pexpect_process.py +623 -0
  265. autocoder/common/shell_commands/interactive_process.py +744 -0
  266. autocoder/common/shell_commands/interactive_session_manager.py +1014 -0
  267. autocoder/common/shell_commands/monitoring.py +529 -0
  268. autocoder/common/shell_commands/process_cleanup.py +386 -0
  269. autocoder/common/shell_commands/process_manager.py +606 -0
  270. autocoder/common/shell_commands/test_interactive_pexpect_process.py +281 -0
  271. autocoder/common/shell_commands/tests/__init__.py +6 -0
  272. autocoder/common/shell_commands/tests/conftest.py +118 -0
  273. autocoder/common/shell_commands/tests/test_background_process_notifier.py +703 -0
  274. autocoder/common/shell_commands/tests/test_command_executor.py +448 -0
  275. autocoder/common/shell_commands/tests/test_error_recovery.py +305 -0
  276. autocoder/common/shell_commands/tests/test_exceptions.py +299 -0
  277. autocoder/common/shell_commands/tests/test_execute_batch.py +588 -0
  278. autocoder/common/shell_commands/tests/test_indented_batch_commands.py +244 -0
  279. autocoder/common/shell_commands/tests/test_integration.py +664 -0
  280. autocoder/common/shell_commands/tests/test_monitoring.py +546 -0
  281. autocoder/common/shell_commands/tests/test_performance.py +632 -0
  282. autocoder/common/shell_commands/tests/test_process_cleanup.py +397 -0
  283. autocoder/common/shell_commands/tests/test_process_manager.py +606 -0
  284. autocoder/common/shell_commands/tests/test_timeout_config.py +343 -0
  285. autocoder/common/shell_commands/tests/test_timeout_manager.py +520 -0
  286. autocoder/common/shell_commands/timeout_config.py +315 -0
  287. autocoder/common/shell_commands/timeout_manager.py +352 -0
  288. autocoder/common/terminal_paste/__init__.py +14 -0
  289. autocoder/common/terminal_paste/demo.py +145 -0
  290. autocoder/common/terminal_paste/demo_paste_functionality.py +95 -0
  291. autocoder/common/terminal_paste/paste_handler.py +200 -0
  292. autocoder/common/terminal_paste/paste_manager.py +118 -0
  293. autocoder/common/terminal_paste/tests/__init__.py +1 -0
  294. autocoder/common/terminal_paste/tests/test_paste_handler.py +182 -0
  295. autocoder/common/terminal_paste/tests/test_paste_manager.py +126 -0
  296. autocoder/common/terminal_paste/utils.py +163 -0
  297. autocoder/common/test_autocoder_args.py +232 -0
  298. autocoder/common/test_env_manager.py +173 -0
  299. autocoder/common/test_env_manager_integration.py +159 -0
  300. autocoder/common/text_similarity/__init__.py +9 -0
  301. autocoder/common/text_similarity/demo.py +216 -0
  302. autocoder/common/text_similarity/examples.py +266 -0
  303. autocoder/common/text_similarity/test_text_similarity.py +306 -0
  304. autocoder/common/text_similarity/text_similarity.py +194 -0
  305. autocoder/common/text_similarity/utils.py +125 -0
  306. autocoder/common/todos/__init__.py +61 -0
  307. autocoder/common/todos/cache/__init__.py +16 -0
  308. autocoder/common/todos/cache/base_cache.py +89 -0
  309. autocoder/common/todos/cache/cache_manager.py +228 -0
  310. autocoder/common/todos/cache/memory_cache.py +225 -0
  311. autocoder/common/todos/config.py +155 -0
  312. autocoder/common/todos/exceptions.py +35 -0
  313. autocoder/common/todos/get_todo_manager.py +161 -0
  314. autocoder/common/todos/manager.py +537 -0
  315. autocoder/common/todos/models.py +239 -0
  316. autocoder/common/todos/storage/__init__.py +14 -0
  317. autocoder/common/todos/storage/base_storage.py +76 -0
  318. autocoder/common/todos/storage/file_storage.py +278 -0
  319. autocoder/common/tokens/counter.py +24 -2
  320. autocoder/common/tools_manager/__init__.py +17 -0
  321. autocoder/common/tools_manager/examples.py +162 -0
  322. autocoder/common/tools_manager/manager.py +385 -0
  323. autocoder/common/tools_manager/models.py +39 -0
  324. autocoder/common/tools_manager/test_tools_manager.py +303 -0
  325. autocoder/common/tools_manager/utils.py +191 -0
  326. autocoder/common/v2/agent/agentic_callbacks.py +270 -0
  327. autocoder/common/v2/agent/agentic_edit.py +2699 -1856
  328. autocoder/common/v2/agent/agentic_edit_change_manager.py +474 -0
  329. autocoder/common/v2/agent/agentic_edit_tools/__init__.py +35 -1
  330. autocoder/common/v2/agent/agentic_edit_tools/ac_mod_list_tool_resolver.py +279 -0
  331. autocoder/common/v2/agent/agentic_edit_tools/ac_mod_write_tool_resolver.py +10 -1
  332. autocoder/common/v2/agent/agentic_edit_tools/background_task_tool_resolver.py +1167 -0
  333. autocoder/common/v2/agent/agentic_edit_tools/base_tool_resolver.py +2 -2
  334. autocoder/common/v2/agent/agentic_edit_tools/conversation_message_ids_read_tool_resolver.py +214 -0
  335. autocoder/common/v2/agent/agentic_edit_tools/conversation_message_ids_write_tool_resolver.py +299 -0
  336. autocoder/common/v2/agent/agentic_edit_tools/count_tokens_tool_resolver.py +290 -0
  337. autocoder/common/v2/agent/agentic_edit_tools/execute_command_tool_resolver.py +564 -29
  338. autocoder/common/v2/agent/agentic_edit_tools/execute_workflow_tool_resolver.py +485 -0
  339. autocoder/common/v2/agent/agentic_edit_tools/extract_to_text_tool_resolver.py +225 -0
  340. autocoder/common/v2/agent/agentic_edit_tools/lint_report.py +79 -0
  341. autocoder/common/v2/agent/agentic_edit_tools/linter_config_models.py +343 -0
  342. autocoder/common/v2/agent/agentic_edit_tools/linter_enabled_tool_resolver.py +189 -0
  343. autocoder/common/v2/agent/agentic_edit_tools/list_files_tool_resolver.py +169 -101
  344. autocoder/common/v2/agent/agentic_edit_tools/load_extra_document_tool_resolver.py +356 -0
  345. autocoder/common/v2/agent/agentic_edit_tools/read_file_tool_resolver.py +243 -50
  346. autocoder/common/v2/agent/agentic_edit_tools/replace_in_file_tool_resolver.py +667 -147
  347. autocoder/common/v2/agent/agentic_edit_tools/run_named_subagents_tool_resolver.py +691 -0
  348. autocoder/common/v2/agent/agentic_edit_tools/search_files_tool_resolver.py +410 -86
  349. autocoder/common/v2/agent/agentic_edit_tools/session_interactive_tool_resolver.py +115 -0
  350. autocoder/common/v2/agent/agentic_edit_tools/session_start_tool_resolver.py +190 -0
  351. autocoder/common/v2/agent/agentic_edit_tools/session_stop_tool_resolver.py +76 -0
  352. autocoder/common/v2/agent/agentic_edit_tools/test_write_to_file_tool_resolver.py +207 -192
  353. autocoder/common/v2/agent/agentic_edit_tools/todo_read_tool_resolver.py +80 -63
  354. autocoder/common/v2/agent/agentic_edit_tools/todo_write_tool_resolver.py +237 -233
  355. autocoder/common/v2/agent/agentic_edit_tools/use_mcp_tool_resolver.py +2 -2
  356. autocoder/common/v2/agent/agentic_edit_tools/web_crawl_tool_resolver.py +557 -0
  357. autocoder/common/v2/agent/agentic_edit_tools/web_search_tool_resolver.py +600 -0
  358. autocoder/common/v2/agent/agentic_edit_tools/write_to_file_tool_resolver.py +56 -121
  359. autocoder/common/v2/agent/agentic_edit_types.py +343 -9
  360. autocoder/common/v2/agent/runner/__init__.py +3 -3
  361. autocoder/common/v2/agent/runner/base_runner.py +12 -26
  362. autocoder/common/v2/agent/runner/{event_runner.py → file_based_event_runner.py} +3 -2
  363. autocoder/common/v2/agent/runner/sdk_runner.py +150 -8
  364. autocoder/common/v2/agent/runner/terminal_runner.py +170 -57
  365. autocoder/common/v2/agent/runner/tool_display.py +557 -159
  366. autocoder/common/v2/agent/test_agentic_callbacks.py +265 -0
  367. autocoder/common/v2/agent/test_agentic_edit.py +194 -0
  368. autocoder/common/v2/agent/tool_caller/__init__.py +24 -0
  369. autocoder/common/v2/agent/tool_caller/default_tool_resolver_map.py +135 -0
  370. autocoder/common/v2/agent/tool_caller/integration_test.py +172 -0
  371. autocoder/common/v2/agent/tool_caller/plugins/__init__.py +14 -0
  372. autocoder/common/v2/agent/tool_caller/plugins/base_plugin.py +126 -0
  373. autocoder/common/v2/agent/tool_caller/plugins/examples/__init__.py +13 -0
  374. autocoder/common/v2/agent/tool_caller/plugins/examples/logging_plugin.py +164 -0
  375. autocoder/common/v2/agent/tool_caller/plugins/examples/security_filter_plugin.py +198 -0
  376. autocoder/common/v2/agent/tool_caller/plugins/plugin_interface.py +141 -0
  377. autocoder/common/v2/agent/tool_caller/test_tool_caller.py +278 -0
  378. autocoder/common/v2/agent/tool_caller/tool_call_plugin_manager.py +331 -0
  379. autocoder/common/v2/agent/tool_caller/tool_caller.py +337 -0
  380. autocoder/common/v2/agent/tool_caller/usage_example.py +193 -0
  381. autocoder/common/v2/code_agentic_editblock_manager.py +4 -4
  382. autocoder/common/v2/code_auto_generate.py +136 -78
  383. autocoder/common/v2/code_auto_generate_diff.py +135 -79
  384. autocoder/common/v2/code_auto_generate_editblock.py +174 -99
  385. autocoder/common/v2/code_auto_generate_strict_diff.py +151 -71
  386. autocoder/common/v2/code_auto_merge.py +1 -1
  387. autocoder/common/v2/code_auto_merge_editblock.py +13 -1
  388. autocoder/common/v2/code_diff_manager.py +3 -3
  389. autocoder/common/v2/code_editblock_manager.py +4 -14
  390. autocoder/common/v2/code_manager.py +1 -1
  391. autocoder/common/v2/code_strict_diff_manager.py +2 -2
  392. autocoder/common/wrap_llm_hint/__init__.py +10 -0
  393. autocoder/common/wrap_llm_hint/test_wrap_llm_hint.py +1067 -0
  394. autocoder/common/wrap_llm_hint/utils.py +432 -0
  395. autocoder/common/wrap_llm_hint/wrap_llm_hint.py +323 -0
  396. autocoder/completer/__init__.py +8 -0
  397. autocoder/completer/command_completer_v2.py +1094 -0
  398. autocoder/default_project/__init__.py +501 -0
  399. autocoder/dispacher/__init__.py +4 -12
  400. autocoder/dispacher/actions/action.py +400 -129
  401. autocoder/dispacher/actions/plugins/action_regex_project.py +2 -2
  402. autocoder/index/entry.py +117 -125
  403. autocoder/{agent → index/filter}/agentic_filter.py +322 -333
  404. autocoder/index/filter/normal_filter.py +5 -11
  405. autocoder/index/filter/quick_filter.py +1 -1
  406. autocoder/index/index.py +36 -9
  407. autocoder/index/tests/__init__.py +1 -0
  408. autocoder/index/tests/run_tests.py +195 -0
  409. autocoder/index/tests/test_entry.py +303 -0
  410. autocoder/index/tests/test_index_manager.py +314 -0
  411. autocoder/index/tests/test_module_integration.py +300 -0
  412. autocoder/index/tests/test_symbols_utils.py +183 -0
  413. autocoder/inner/__init__.py +4 -0
  414. autocoder/inner/agentic.py +923 -0
  415. autocoder/inner/async_command_handler.py +992 -0
  416. autocoder/inner/conversation_command_handlers.py +623 -0
  417. autocoder/inner/merge_command_handler.py +213 -0
  418. autocoder/inner/queue_command_handler.py +684 -0
  419. autocoder/models.py +95 -266
  420. autocoder/plugins/git_helper_plugin.py +31 -29
  421. autocoder/plugins/token_helper_plugin.py +65 -46
  422. autocoder/pyproject/__init__.py +32 -29
  423. autocoder/rag/agentic_rag.py +215 -75
  424. autocoder/rag/cache/simple_cache.py +1 -2
  425. autocoder/rag/loaders/image_loader.py +1 -1
  426. autocoder/rag/long_context_rag.py +42 -26
  427. autocoder/rag/qa_conversation_strategy.py +1 -1
  428. autocoder/rag/terminal/__init__.py +17 -0
  429. autocoder/rag/terminal/args.py +581 -0
  430. autocoder/rag/terminal/bootstrap.py +61 -0
  431. autocoder/rag/terminal/command_handlers.py +653 -0
  432. autocoder/rag/terminal/formatters/__init__.py +20 -0
  433. autocoder/rag/terminal/formatters/base.py +70 -0
  434. autocoder/rag/terminal/formatters/json_format.py +66 -0
  435. autocoder/rag/terminal/formatters/stream_json.py +95 -0
  436. autocoder/rag/terminal/formatters/text.py +28 -0
  437. autocoder/rag/terminal/init.py +120 -0
  438. autocoder/rag/terminal/utils.py +106 -0
  439. autocoder/rag/test_agentic_rag.py +389 -0
  440. autocoder/rag/test_doc_filter.py +3 -3
  441. autocoder/rag/test_long_context_rag.py +1 -1
  442. autocoder/rag/test_token_limiter.py +517 -10
  443. autocoder/rag/token_counter.py +3 -0
  444. autocoder/rag/token_limiter.py +19 -15
  445. autocoder/rag/tools/__init__.py +26 -2
  446. autocoder/rag/tools/bochaai_example.py +343 -0
  447. autocoder/rag/tools/bochaai_sdk.py +541 -0
  448. autocoder/rag/tools/metaso_example.py +268 -0
  449. autocoder/rag/tools/metaso_sdk.py +417 -0
  450. autocoder/rag/tools/recall_tool.py +28 -7
  451. autocoder/rag/tools/run_integration_tests.py +204 -0
  452. autocoder/rag/tools/test_all_providers.py +318 -0
  453. autocoder/rag/tools/test_bochaai_integration.py +482 -0
  454. autocoder/rag/tools/test_final_integration.py +215 -0
  455. autocoder/rag/tools/test_metaso_integration.py +424 -0
  456. autocoder/rag/tools/test_metaso_real.py +171 -0
  457. autocoder/rag/tools/test_web_crawl_tool.py +639 -0
  458. autocoder/rag/tools/test_web_search_tool.py +509 -0
  459. autocoder/rag/tools/todo_read_tool.py +202 -0
  460. autocoder/rag/tools/todo_write_tool.py +412 -0
  461. autocoder/rag/tools/web_crawl_tool.py +634 -0
  462. autocoder/rag/tools/web_search_tool.py +558 -0
  463. autocoder/rag/tools/web_tools_example.py +119 -0
  464. autocoder/rag/types.py +16 -0
  465. autocoder/rag/variable_holder.py +4 -2
  466. autocoder/rags.py +86 -79
  467. autocoder/regexproject/__init__.py +23 -21
  468. autocoder/sdk/__init__.py +46 -190
  469. autocoder/sdk/api.py +370 -0
  470. autocoder/sdk/async_runner/__init__.py +26 -0
  471. autocoder/sdk/async_runner/async_executor.py +650 -0
  472. autocoder/sdk/async_runner/async_handler.py +356 -0
  473. autocoder/sdk/async_runner/markdown_processor.py +595 -0
  474. autocoder/sdk/async_runner/task_metadata.py +284 -0
  475. autocoder/sdk/async_runner/worktree_manager.py +438 -0
  476. autocoder/sdk/cli/__init__.py +2 -5
  477. autocoder/sdk/cli/formatters.py +28 -204
  478. autocoder/sdk/cli/handlers.py +77 -44
  479. autocoder/sdk/cli/main.py +154 -171
  480. autocoder/sdk/cli/options.py +95 -22
  481. autocoder/sdk/constants.py +139 -51
  482. autocoder/sdk/core/auto_coder_core.py +484 -109
  483. autocoder/sdk/core/bridge.py +297 -115
  484. autocoder/sdk/exceptions.py +18 -12
  485. autocoder/sdk/formatters/__init__.py +19 -0
  486. autocoder/sdk/formatters/input.py +64 -0
  487. autocoder/sdk/formatters/output.py +247 -0
  488. autocoder/sdk/formatters/stream.py +54 -0
  489. autocoder/sdk/models/__init__.py +6 -5
  490. autocoder/sdk/models/options.py +55 -18
  491. autocoder/sdk/utils/formatters.py +27 -195
  492. autocoder/suffixproject/__init__.py +28 -25
  493. autocoder/terminal/__init__.py +14 -0
  494. autocoder/terminal/app.py +454 -0
  495. autocoder/terminal/args.py +32 -0
  496. autocoder/terminal/bootstrap.py +178 -0
  497. autocoder/terminal/command_processor.py +521 -0
  498. autocoder/terminal/command_registry.py +57 -0
  499. autocoder/terminal/help.py +97 -0
  500. autocoder/terminal/tasks/__init__.py +5 -0
  501. autocoder/terminal/tasks/background.py +77 -0
  502. autocoder/terminal/tasks/task_event.py +70 -0
  503. autocoder/terminal/ui/__init__.py +13 -0
  504. autocoder/terminal/ui/completer.py +268 -0
  505. autocoder/terminal/ui/keybindings.py +75 -0
  506. autocoder/terminal/ui/session.py +41 -0
  507. autocoder/terminal/ui/toolbar.py +64 -0
  508. autocoder/terminal/utils/__init__.py +13 -0
  509. autocoder/terminal/utils/errors.py +18 -0
  510. autocoder/terminal/utils/paths.py +19 -0
  511. autocoder/terminal/utils/shell.py +43 -0
  512. autocoder/terminal_v3/__init__.py +10 -0
  513. autocoder/terminal_v3/app.py +201 -0
  514. autocoder/terminal_v3/handlers/__init__.py +5 -0
  515. autocoder/terminal_v3/handlers/command_handler.py +131 -0
  516. autocoder/terminal_v3/models/__init__.py +6 -0
  517. autocoder/terminal_v3/models/conversation_buffer.py +214 -0
  518. autocoder/terminal_v3/models/message.py +50 -0
  519. autocoder/terminal_v3/models/tool_display.py +247 -0
  520. autocoder/terminal_v3/ui/__init__.py +7 -0
  521. autocoder/terminal_v3/ui/keybindings.py +56 -0
  522. autocoder/terminal_v3/ui/layout.py +141 -0
  523. autocoder/terminal_v3/ui/styles.py +43 -0
  524. autocoder/tsproject/__init__.py +23 -23
  525. autocoder/utils/auto_coder_utils/chat_stream_out.py +1 -1
  526. autocoder/utils/llms.py +88 -80
  527. autocoder/utils/math_utils.py +101 -0
  528. autocoder/utils/model_provider_selector.py +16 -4
  529. autocoder/utils/operate_config_api.py +33 -5
  530. autocoder/utils/thread_utils.py +2 -2
  531. autocoder/version.py +4 -2
  532. autocoder/workflow_agents/__init__.py +84 -0
  533. autocoder/workflow_agents/agent.py +143 -0
  534. autocoder/workflow_agents/exceptions.py +573 -0
  535. autocoder/workflow_agents/executor.py +665 -0
  536. autocoder/workflow_agents/loader.py +749 -0
  537. autocoder/workflow_agents/runner.py +267 -0
  538. autocoder/workflow_agents/types.py +173 -0
  539. autocoder/workflow_agents/utils.py +434 -0
  540. autocoder/workflow_agents/workflow_manager.py +211 -0
  541. auto_coder-1.0.0.dist-info/METADATA +0 -396
  542. auto_coder-1.0.0.dist-info/RECORD +0 -442
  543. auto_coder-1.0.0.dist-info/licenses/LICENSE +0 -201
  544. autocoder/auto_coder_server.py +0 -672
  545. autocoder/benchmark.py +0 -138
  546. autocoder/common/ac_style_command_parser/example.py +0 -7
  547. autocoder/common/cleaner.py +0 -31
  548. autocoder/common/command_completer_v2.py +0 -615
  549. autocoder/common/context_pruner.py +0 -477
  550. autocoder/common/conversation_pruner.py +0 -132
  551. autocoder/common/directory_cache/__init__.py +0 -1
  552. autocoder/common/directory_cache/cache.py +0 -192
  553. autocoder/common/directory_cache/test_cache.py +0 -190
  554. autocoder/common/file_checkpoint/examples.py +0 -217
  555. autocoder/common/llm_friendly_package_example.py +0 -138
  556. autocoder/common/llm_friendly_package_test.py +0 -63
  557. autocoder/common/pull_requests/test_module.py +0 -1
  558. autocoder/common/rulefiles/autocoderrules_utils.py +0 -484
  559. autocoder/common/text.py +0 -30
  560. autocoder/common/v2/agent/agentic_edit_tools/list_package_info_tool_resolver.py +0 -42
  561. autocoder/common/v2/agent/agentic_edit_tools/test_execute_command_tool_resolver.py +0 -70
  562. autocoder/common/v2/agent/agentic_edit_tools/test_search_files_tool_resolver.py +0 -163
  563. autocoder/common/v2/agent/agentic_tool_display.py +0 -183
  564. autocoder/plugins/dynamic_completion_example.py +0 -148
  565. autocoder/plugins/sample_plugin.py +0 -160
  566. autocoder/sdk/cli/__main__.py +0 -26
  567. autocoder/sdk/cli/completion_wrapper.py +0 -38
  568. autocoder/sdk/cli/install_completion.py +0 -301
  569. autocoder/sdk/models/messages.py +0 -209
  570. autocoder/sdk/session/__init__.py +0 -32
  571. autocoder/sdk/session/session.py +0 -106
  572. autocoder/sdk/session/session_manager.py +0 -56
  573. {auto_coder-1.0.0.dist-info → auto_coder-2.0.1.dist-info}/top_level.txt +0 -0
  574. /autocoder/{sdk/example.py → common/agent_query_queue/__init__.py} +0 -0
@@ -1,985 +1,36 @@
1
1
  from byzerllm.utils import format_str_jinja2
2
2
  import locale
3
+ from .international import (
4
+ get_system_language as _get_system_language,
5
+ get_message as _get_message,
6
+ get_message_with_format as _get_message_with_format
7
+ )
3
8
 
4
- MESSAGES = {
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_openrouter": {
110
- "en": "OpenRouter",
111
- "zh": "OpenRouter"
112
- },
113
- "model_provider_api_key_title": {
114
- "en": "API Key",
115
- "zh": "API密钥"
116
- },
117
- "model_provider_volcano_api_key_text": {
118
- "en": "Please enter your Volcano Engine API key:",
119
- "zh": "请输入您的火山方舟API密钥:"
120
- },
121
- "model_provider_openrouter_api_key_text": {
122
- "en": "Please enter your OpenRouter API key:",
123
- "zh": "请输入您的OpenRouter API密钥:"
124
- },
125
- "model_provider_volcano_r1_text": {
126
- "en": "Please enter your Volcano Engine R1 endpoint (format: ep-20250204215011-vzbsg):",
127
- "zh": "请输入您的火山方舟 R1 推理点(格式如: ep-20250204215011-vzbsg):"
128
- },
129
- "model_provider_volcano_v3_text": {
130
- "en": "Please enter your Volcano Engine V3 endpoint (format: ep-20250204215011-vzbsg):",
131
- "zh": "请输入您的火山方舟 V3 推理点(格式如: ep-20250204215011-vzbsg):"
132
- },
133
- "model_provider_siliconflow_api_key_text": {
134
- "en": "Please enter your SiliconFlow AI API key:",
135
- "zh": "请输入您的硅基流动API密钥:"
136
- },
137
- "model_provider_deepseek_api_key_text": {
138
- "en": "Please enter your DeepSeek API key:",
139
- "zh": "请输入您的DeepSeek API密钥:"
140
- },
141
- "model_provider_selected": {
142
- "en": "Provider configuration completed successfully! You can use /models command to view, add and modify all models later.",
143
- "zh": "供应商配置已成功完成!后续你可以使用 /models 命令,查看,新增和修改所有模型"
144
- },
145
- "model_provider_success_title": {
146
- "en": "Success",
147
- "zh": "成功"
148
- },
149
- "index_file_filtered": {
150
- "en": "File {{file_path}} is filtered by model {{model_name}} restrictions",
151
- "zh": "文件 {{file_path}} 被模型 {{model_name}} 的访问限制过滤"
152
- },
153
- "models_no_active": {
154
- "en": "No active models found",
155
- "zh": "未找到激活的模型"
156
- },
157
- "models_speed_test_results": {
158
- "en": "Model Speed Test Results",
159
- "zh": "模型速度测试结果"
160
- },
161
- "models_testing": {
162
- "en": "Testing model: {{name}}...",
163
- "zh": "正在测试模型: {{name}}..."
164
- },
165
- "models_testing_start": {
166
- "en": "Starting speed test for all active models...",
167
- "zh": "开始对所有激活的模型进行速度测试..."
168
- },
169
- "models_testing_progress": {
170
- "en": "Testing progress: {{ completed }}/{{ total }} models",
171
- "zh": "测试进度: {{ completed }}/{{ total }} 个模型"
172
- },
173
- "generation_cancelled": {
174
- "en": "[Interrupted] Generation cancelled",
175
- "zh": "[已中断] 生成已取消"
176
- },
177
- "model_not_found": {
178
- "en": "Model {{model_name}} not found",
179
- "zh": "未找到模型: {{model_name}}"
180
- },
181
- "generating_shell_script": {
182
- "en": "Generating Shell Script",
183
- "zh": "正在生成 Shell 脚本"
184
- },
185
- "new_session_started": {
186
- "en": "New session started. Previous chat history has been archived.",
187
- "zh": "新会话已开始。之前的聊天历史已存档。"
188
- },
189
- "memory_save_success": {
190
- "en": "✅ Saved to your memory(path: {{path}})",
191
- "zh": "✅ 已保存到您的记忆中(路径: {{path}})"
192
- },
193
- "file_decode_error": {
194
- "en": "Failed to decode file: {{file_path}}. Tried encodings: {{encodings}}",
195
- "zh": "无法解码文件: {{file_path}}。尝试的编码: {{encodings}}"
196
- },
197
- "file_write_error": {
198
- "en": "Failed to write file: {{file_path}}. Error: {{error}}",
199
- "zh": "无法写入文件: {{file_path}}. 错误: {{error}}"
200
- },
201
- "yaml_load_error": {
202
- "en": "Error loading yaml file {{yaml_file}}: {{error}}",
203
- "zh": "加载YAML文件出错 {{yaml_file}}: {{error}}"
204
- },
205
- "git_command_error": {
206
- "en": "Git command execution error: {{error}}",
207
- "zh": "Git命令执行错误: {{error}}"
208
- },
209
- "get_commit_diff_error": {
210
- "en": "Error getting commit diff: {{error}}",
211
- "zh": "获取commit diff时出错: {{error}}"
212
- },
213
- "no_latest_commit": {
214
- "en": "Unable to get latest commit information",
215
- "zh": "无法获取最新的提交信息"
216
- },
217
- "code_review_error": {
218
- "en": "Code review process error: {{error}}",
219
- "zh": "代码审查过程出错: {{error}}"
220
- },
221
- "index_file_too_large": {
222
- "en": "⚠️ File {{ file_path }} is too large ({{ file_size }} > {{ max_length }}), splitting into chunks...",
223
- "zh": "⚠️ 文件 {{ file_path }} 过大 ({{ file_size }} > {{ max_length }}), 正在分块处理..."
224
- },
225
- "index_update_success": {
226
- "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 }}",
227
- "zh": "✅ {{ model_name }} 成功更新 {{ file_path }} 的索引 (md5: {{ md5 }}), 耗时 {{ duration }} 秒, 输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}"
228
- },
229
- "index_build_error": {
230
- "en": "❌ {{ model_name }} Error building index for {{ file_path }}: {{ error }}",
231
- "zh": "❌ {{ model_name }} 构建 {{ file_path }} 索引时出错: {{ error }}"
232
- },
233
- "index_build_summary": {
234
- "en": "📊 Total Files: {{ total_files }}, Need to Build Index: {{ num_files }}",
235
- "zh": "📊 总文件数: {{ total_files }}, 需要构建索引: {{ num_files }}"
236
- },
237
- "building_index_progress": {
238
- "en": "⏳ Building Index: {{ counter }}/{{ num_files }}...",
239
- "zh": "⏳ 正在构建索引: {{ counter }}/{{ num_files }}..."
240
- },
241
- "index_source_dir_mismatch": {
242
- "en": "⚠️ Source directory mismatch (file_path: {{ file_path }}, source_dir: {{ source_dir }})",
243
- "zh": "⚠️ 源目录不匹配 (文件路径: {{ file_path }}, 源目录: {{ source_dir }})"
244
- },
245
- "index_related_files_fail": {
246
- "en": "⚠️ Failed to find related files for chunk {{ chunk_count }}",
247
- "zh": "⚠️ 无法为块 {{ chunk_count }} 找到相关文件"
248
- },
249
- "index_threads_completed": {
250
- "en": "✅ Completed {{ completed_threads }}/{{ total_threads }} threads",
251
- "zh": "✅ 已完成 {{ completed_threads }}/{{ total_threads }} 个线程"
252
- },
253
- "index_file_removed": {
254
- "en": "🗑️ Removed non-existent file index: {{ file_path }}",
255
- "zh": "🗑️ 已移除不存在的文件索引:{{ file_path }}"
256
- },
257
- "index_file_saved": {
258
- "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 }}",
259
- "zh": "💾 已保存索引文件,更新了 {{ updated_files }} 个文件,移除了 {{ removed_files }} 个文件,输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}"
260
- },
261
- "task_cancelled_by_user": {
262
- "en": "Task was cancelled by user",
263
- "zh": "任务被用户取消"
264
- },
265
- "cancellation_requested": {
266
- "en": "Cancellation requested, waiting for thread to terminate...",
267
- "zh": "已请求取消,正在等待线程终止..."
268
- },
269
- "force_terminating_thread": {
270
- "en": "Force terminating thread after timeout",
271
- "zh": "线程超时强制终止"
272
- },
273
- "force_raising_keyboard_interrupt": {
274
- "en": "Force raising KeyboardInterrupt after timeout",
275
- "zh": "超时强制抛出键盘中断异常"
276
- },
277
- "thread_terminated": {
278
- "en": "Thread terminated",
279
- "zh": "线程已终止"
280
- },
281
- "human_as_model_instructions": {
282
- "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.",
283
- "zh": "您现在处于人类作为模型模式。内容已复制到您的剪贴板。\n系统正在等待您的输入。完成后,在新行输入'EOF'提交。\n使用'/break'退出此模式。如果复制粘贴有问题,使用'/clear'清理并重新粘贴。"
284
- },
285
- "clipboard_not_supported": {
286
- "en": "pyperclip not installed or clipboard is not supported, instruction will not be copied to clipboard.",
287
- "zh": "未安装pyperclip或不支持剪贴板,指令将不会被复制到剪贴板。"
288
- },
289
- "human_as_model_instructions_no_clipboard": {
290
- "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.",
291
- "zh": "您现在处于人类作为模型模式。[bold red]内容无法复制到您的剪贴板。[/bold red]\n但您可以从output.txt文件复制提示。\n系统正在等待您的输入。完成后,在新行输入'EOF'提交。\n使用'/break'退出此模式。如果复制粘贴有问题,使用'/clear'清理并重新粘贴。"
292
- },
293
- "phase1_processing_sources": {
294
- "en": "Phase 1: Processing REST/RAG/Search sources...",
295
- "zh": "阶段 1: 正在处理 REST/RAG/Search 源..."
296
- },
297
- "phase2_building_index": {
298
- "en": "Phase 2: Building index for all files...",
299
- "zh": "阶段 2: 正在为所有文件构建索引..."
300
- },
301
- "phase6_file_selection": {
302
- "en": "Phase 6: Processing file selection and limits...",
303
- "zh": "阶段 6: 正在处理文件选择和限制..."
304
- },
305
- "phase7_preparing_output": {
306
- "en": "Phase 7: Preparing final output...",
307
- "zh": "阶段 7: 正在准备最终输出..."
308
- },
309
- "chat_human_as_model_instructions": {
310
- "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.",
311
- "zh": "\n============= Chat 处于 Human as Model 模式 =============\n问题已复制到剪贴板\n请使用Web版本模型获取答案\n或者使用 /conf human_as_model:false 关闭该模式直接在终端获得答案。将获得答案黏贴到下面的输入框,换行后,使用 '/break' 退出,'/clear' 清屏,'/eof' 提交。"
312
- },
313
- "code_generation_start": {
314
- "en": "Auto generate the code...",
315
- "zh": "正在自动生成代码..."
316
- },
317
- "code_generation_complete": {
318
- "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",
319
- "zh": "{{ model_names}} 代码生成完成,耗时 {{ duration }} 秒 (采样数: {{ sampling_count }}), 输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}, 速度: {{ speed }} tokens/秒"
320
- },
321
- "generate_max_rounds_reached": {
322
- "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.",
323
- "zh": "⚠️ 生成已停止,因为达到了最大允许轮数 ({{ count }}/{{ max_rounds }})。当前生成内容长度: {{ generated_tokens }} tokens。如果输出不完整,请考虑在配置中增加 'generate_max_rounds'。"
324
- },
325
- "code_merge_start": {
326
- "en": "Auto merge the code...",
327
- "zh": "正在自动合并代码..."
328
- },
329
- "code_execution_warning": {
330
- "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 }}",
331
- "zh": "发送给模型的内容长度为 {{ content_length }} tokens(您可能收集了太多文件),超过了最大输入长度 {{ max_length }}"
332
- },
333
- "quick_filter_start": {
334
- "en": "{{ model_name }} Starting filter context(quick_filter)...",
335
- "zh": "{{ model_name }} 开始查找上下文(quick_filter)..."
336
- },
337
- "normal_filter_start": {
338
- "en": "{{ model_name }} Starting filter context(normal_filter)...",
339
- "zh": "{{ model_name }} 开始查找上下文(normal_filter)..."
340
- },
341
- "pylint_check_failed": {
342
- "en": "⚠️ Pylint check failed: {{ error_message }}",
343
- "zh": "⚠️ Pylint 检查失败: {{ error_message }}"
344
- },
345
- "pylint_error": {
346
- "en": "❌ Error running pylint: {{ error_message }}",
347
- "zh": "❌ 运行 Pylint 时出错: {{ error_message }}"
348
- },
349
- "unmerged_blocks_warning": {
350
- "en": "⚠️ Found {{ num_blocks }} unmerged blocks, the changes will not be applied. Please review them manually then try again.",
351
- "zh": "⚠️ 发现 {{ num_blocks }} 个未合并的代码块,更改将不会被应用。请手动检查后重试。"
352
- },
353
- "pylint_file_check_failed": {
354
- "en": "⚠️ Pylint check failed for {{ file_path }}. Changes not applied. Error: {{ error_message }}",
355
- "zh": "⚠️ {{ file_path }} 的 Pylint 检查失败。更改未应用。错误: {{ error_message }}"
356
- },
357
- "merge_success": {
358
- "en": "✅ Merged changes in {{ num_files }} files {{ num_changes }}/{{ total_blocks }} blocks.",
359
- "zh": "✅ 成功合并了 {{ num_files }} 个文件中的更改 {{ num_changes }}/{{ total_blocks }} 个代码块。"
360
- },
361
- "no_changes_made": {
362
- "en": "⚠️ No changes were made to any files.",
363
- "zh": "⚠️ 未对任何文件进行更改。这个原因可能是因为coding函数生成的文本块格式有问题,导致无法合并进项目"
364
- },
365
- "files_merged": {
366
- "en": "✅ Merged {{ total }} files into the project.",
367
- "zh": "✅ 成功合并了 {{ total }} 个文件到项目中。"
368
- },
369
- "merge_failed": {
370
- "en": "❌ Merge file {{ path }} failed: {{ error }}",
371
- "zh": "❌ 合并文件 {{ path }} 失败: {{ error }}"
372
- },
373
- "files_merged_total": {
374
- "en": "✅ Merged {{ total }} files into the project.",
375
- "zh": "✅ 合并了 {{ total }} 个文件到项目中。"
376
- },
377
- "ranking_skip": {
378
- "en": "Only 1 candidate, skip ranking",
379
- "zh": "只有1个候选项,跳过排序"
380
- },
381
- "ranking_start": {
382
- "en": "Start ranking {{ count }} candidates using model {{ model_name }}",
383
- "zh": "开始对 {{ count }} 个候选项进行排序,使用模型 {{ model_name }} 打分"
384
- },
385
- "ranking_failed_request": {
386
- "en": "Ranking request failed: {{ error }}",
387
- "zh": "排序请求失败: {{ error }}"
388
- },
389
- "ranking_all_failed": {
390
- "en": "All ranking requests failed",
391
- "zh": "所有排序请求都失败"
392
- },
393
- "ranking_complete": {
394
- "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",
395
- "zh": "{{ model_names }} 排序完成,耗时 {{ elapsed }} 秒,总投票数: {{ total_tasks }},最佳候选索引: {{ best_candidate }},得分: {{ scores }},输入token数: {{ input_tokens }},输出token数: {{ output_tokens }},输入成本: {{ input_cost }}, 输出成本: {{ output_cost }},速度: {{ speed }} tokens/秒"
396
- },
397
- "ranking_process_failed": {
398
- "en": "Ranking process failed: {{ error }}",
399
- "zh": "排序过程失败: {{ error }}"
400
- },
401
- "ranking_failed": {
402
- "en": "Ranking failed in {{ elapsed }}s, using original order",
403
- "zh": "排序失败,耗时 {{ elapsed }} 秒,使用原始顺序"
404
- },
405
- "begin_index_source_code": {
406
- "en": "🚀 Begin to index source code in {{ source_dir }}",
407
- "zh": "🚀 开始为 {{ source_dir }} 中的源代码建立索引"
408
- },
409
- "stream_out_stats": {
410
- "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 }}",
411
- "zh": "模型: {{ model_name }},总耗时 {{ elapsed_time }} 秒,首token时间: {{ first_token_time }} 秒, 速度: {{ speed }} tokens/秒, 输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}"
412
- },
413
- "quick_filter_stats": {
414
- "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",
415
- "zh": "{{ model_names }} Quick Filter 完成耗时 {{ elapsed_time }} 秒,输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }} 速度: {{ speed }} tokens/秒"
416
- },
417
- "upsert_file": {
418
- "en": "✅ Updated file: {{ file_path }}",
419
- "zh": "✅ 更新文件: {{ file_path }}"
420
- },
421
- "unmerged_blocks_title": {
422
- "en": "Unmerged Blocks",
423
- "zh": "未合并代码块"
424
- },
425
- "merged_blocks_title": {
426
- "en": "Merged Changes",
427
- "zh": "合并的更改"
428
- },
429
- "quick_filter_title": {
430
- "en": "{{ model_name }} is analyzing how to filter context...",
431
- "zh": "{{ model_name }} 正在分析如何筛选上下文..."
432
- },
433
- "quick_filter_failed": {
434
- "en": "❌ Quick filter failed: {{ error }}. ",
435
- "zh": "❌ 快速过滤器失败: {{ error }}. "
436
- },
437
- "unmerged_file_path": {
438
- "en": "File: {{file_path}}",
439
- "zh": "文件: {{file_path}}"
440
- },
441
- "unmerged_search_block": {
442
- "en": "Search Block({{similarity}}):",
443
- "zh": "Search Block({{similarity}}):"
444
- },
445
- "unmerged_replace_block": {
446
- "en": "Replace Block:",
447
- "zh": "Replace Block:"
448
- },
449
- "unmerged_blocks_total": {
450
- "en": "Total unmerged blocks: {{num_blocks}}",
451
- "zh": "未合并代码块数量: {{num_blocks}}"
452
- },
453
- "git_init_required": {
454
- "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 }}",
455
- "zh": "⚠️ auto_merge 仅适用于 git 仓库。\n\n请尝试在源目录中使用 git init:\n\n```shell\ncd {{ source_dir }}\ngit init.\n```\n\n然后再次运行 auto-coder。\n错误: {{ error }}"
456
- },
457
- "quick_filter_reason": {
458
- "en": "Auto get(quick_filter mode)",
459
- "zh": "自动获取(quick_filter模式)"
460
- },
461
- "quick_filter_too_long": {
462
- "en": "⚠️ index file is too large ({{ tokens_len }}/{{ max_tokens }}). The query will be split into {{ split_size }} chunks.",
463
- "zh": "⚠️ 索引文件过大 ({{ tokens_len }}/{{ max_tokens }})。查询将被分成 {{ split_size }} 个部分执行。"
464
- },
465
- "quick_filter_tokens_len": {
466
- "en": "📊 Current index size: {{ tokens_len }} tokens",
467
- "zh": "📊 当前索引大小: {{ tokens_len }} tokens"
468
- },
469
- "estimated_chat_input_tokens": {
470
- "en": "Estimated chat input tokens: {{ estimated_input_tokens }}",
471
- "zh": "对话输入token预估为: {{ estimated_input_tokens }}"
472
- },
473
- "estimated_input_tokens_in_generate": {
474
- "en": "Estimated input tokens in generate ({{ generate_mode }}): {{ estimated_input_tokens_in_generate }}",
475
- "zh": "生成代码({{ generate_mode }})预计输入token数: {{ estimated_input_tokens_in_generate }}"
476
- },
477
- "model_has_access_restrictions": {
478
- "en": "{{model_name}} has access restrictions, cannot use the current function",
479
- "zh": "{{model_name}} 有访问限制,无法使用当前功能"
480
- },
481
- "auto_command_not_found": {
482
- "en": "Auto command not found: {{command}}. Please check your input and try again.",
483
- "zh": "未找到自动命令: {{command}}。请检查您的输入并重试。"
484
- },
485
- "auto_command_failed": {
486
- "en": "Auto command failed: {{error}}. Please check your input and try again.",
487
- "zh": "自动命令执行失败: {{error}}。请检查您的输入并重试。"
488
- },
489
- "command_execution_result": {
490
- "en": "{{action}} execution result",
491
- "zh": "{{action}} 执行结果"
492
- },
493
- "satisfied_prompt": {
494
- "en": "Requirements satisfied, no further action needed",
495
- "zh": "已满足需求,无需进一步操作"
496
- },
497
- "auto_command_analyzed": {
498
- "en": "Selected command",
499
- "zh": "被选择指令"
500
- },
501
- "invalid_enum_value": {
502
- "en": "Value '{{value}}' is not in allowed values ({{allowed}})",
503
- "zh": "值 '{{value}}' 不在允许的值列表中 ({{allowed}})"
504
- },
505
- "conversation_pruning_start": {
506
- "en": "⚠️ Conversation pruning started, total tokens: {{total_tokens}}, safe zone: {{safe_zone}}",
507
- "zh": "⚠️ 对话长度 {{total_tokens}} tokens 超过安全阈值 {{safe_zone}},开始修剪对话。"
508
- },
509
- "invalid_file_number": {
510
- "en": "⚠️ Invalid file number {{file_number}}, total files: {{total_files}}",
511
- "zh": "⚠️ 无效的文件编号 {{file_number}},总文件数为 {{total_files}}"
512
- },
513
- "all_merge_results_failed": {
514
- "en": "⚠️ All merge attempts failed, returning first candidate",
515
- "zh": "⚠️ 所有合并尝试都失败,返回第一个候选"
516
- },
517
- "only_one_merge_result_success": {
518
- "en": "✅ Only one merge result succeeded, returning that candidate",
519
- "zh": "✅ 只有一个合并结果成功,返回该候选"
520
- },
521
- "conf_import_success": {
522
- "en": "Successfully imported configuration: {{path}}",
523
- "zh": "成功导入配置: {{path}}"
524
- },
525
- "conf_export_success": {
526
- "en": "Successfully exported configuration: {{path}}",
527
- "zh": "成功导出配置: {{path}}"
528
- },
529
- "conf_import_error": {
530
- "en": "Error importing configuration: {{error}}",
531
- "zh": "导入配置出错: {{error}}"
532
- },
533
- "conf_export_error": {
534
- "en": "Error exporting configuration: {{error}}",
535
- "zh": "导出配置出错: {{error}}"
536
- },
537
- "conf_import_invalid_format": {
538
- "en": "Invalid import configuration format, expected 'key:value'",
539
- "zh": "导入配置格式无效, 应为 'key:value' 格式"
540
- },
541
- "conf_export_invalid_format": {
542
- "en": "Invalid export configuration format, expected 'key:value'",
543
- "zh": "导出配置格式无效, 应为 'key:value' 格式"
544
- },
545
- "conf_import_file_not_found": {
546
- "en": "Import configuration file not found: {{file_path}}",
547
- "zh": "未找到导入配置文件: {{file_path}}"
548
- },
549
- "conf_export_file_not_found": {
550
- "en": "Export configuration file not found: {{file_path}}",
551
- "zh": "未找到导出配置文件: {{file_path}}"
552
- },
553
- "conf_import_file_empty": {
554
- "en": "Import configuration file is empty: {{file_path}}",
555
- "zh": "导入配置文件为空: {{file_path}}"
556
- },
557
- "conf_export_file_empty": {
558
- "en": "Export configuration file is empty: {{file_path}}",
559
- "zh": "导出配置文件为空: {{file_path}}"
560
- },
561
- "generated_shell_script": {
562
- "en": "Generated Shell Script",
563
- "zh": "生成的 Shell 脚本"
564
- },
565
- "confirm_execute_shell_script": {
566
- "en": "Do you want to execute this shell script?",
567
- "zh": "您要执行此 shell 脚本吗?"
568
- },
569
- "shell_script_not_executed": {
570
- "en": "Shell script was not executed",
571
- "zh": "Shell 脚本未执行"
572
- },
573
- "index_export_success": {
574
- "en": "Index exported successfully: {{path}}",
575
- "zh": "索引导出成功: {{path}}"
576
- },
577
- "index_import_success": {
578
- "en": "Index imported successfully: {{path}}",
579
- "zh": "索引导入成功: {{path}}"
580
- },
581
- "edits_title": {
582
- "en": "edits",
583
- "zh": "编辑块"
584
- },
585
- "diff_blocks_title": {
586
- "en": "diff blocks",
587
- "zh": "差异块"
588
- },
589
- "index_exclude_files_error": {
590
- "en": "index filter exclude files fail: {{ error }}",
591
- "zh": "索引排除文件时出错: {{error}}"
592
- },
593
- "file_sliding_window_processing": {
594
- "en": "File {{ file_path }} is too large ({{ tokens }} tokens), processing with sliding window...",
595
- "zh": "文件 {{ file_path }} 过大 ({{ tokens }} tokens),正在使用滑动窗口处理..."
596
- },
597
- "file_snippet_processing": {
598
- "en": "Processing file {{ file_path }} with code snippet extraction...",
599
- "zh": "正在对文件 {{ file_path }} 进行代码片段提取..."
600
- },
601
- "context_pruning_start": {
602
- "en": "⚠️ Context pruning started. Total tokens: {{ total_tokens }} (max allowed: {{ max_tokens }}). Applying strategy: {{ strategy }}.",
603
- "zh": "⚠️ 开始上下文剪枝。总token数: {{ total_tokens }} (最大允许: {{ max_tokens }})。正在应用策略: {{ strategy }}。"
604
- },
605
- "context_pruning_reason": {
606
- "en": "Context length exceeds maximum limit ({{ total_tokens }} > {{ max_tokens }}). Pruning is required to fit within the model's context window.",
607
- "zh": "上下文长度超过最大限制 ({{ total_tokens }} > {{ max_tokens }})。需要进行剪枝以适配模型的上下文窗口。"
608
- },
609
- "rank_code_modification_title": {
610
- "en": "{{model_name}} ranking codes",
611
- "zh": "模型{{model_name}}对代码打分"
612
- },
613
- "sorted_files_message": {
614
- "en": "Reordered files:\n{% for file in files %}- {{ file }}\n{% endfor %}",
615
- "zh": "重新排序后的文件路径:\n{% for file in files %}- {{ file }}\n{% endfor %}"
616
- },
617
- "estimated_input_tokens_in_ranking": {
618
- "en": "estimate input token {{ estimated_input_tokens }} when ranking",
619
- "zh": "排序预计输入token数: {{ estimated_input_tokens }}"
620
- },
621
- "file_snippet_procesed": {
622
- "en": "{{ file_path }} processed with tokens: {{ tokens }} => {{ snippet_tokens }}. Current total tokens: {{ total_tokens }}",
623
- "zh": "文件 {{ file_path }} 处理后token数: {{ tokens }} => {{ snippet_tokens }} 当前总token数: {{ total_tokens }}"
624
- },
625
- "tool_ask_user": {
626
- "en": "Your Reply: ",
627
- "zh": "您的回复: "
628
- },
629
- "tool_ask_user_accept": {
630
- "en": "Your Response received",
631
- "zh": "收到您的回复"
632
- },
633
- "auto_web_analyzing": {
634
- "en": "Analyzing web automation task...",
635
- "zh": "正在分析网页自动化任务..."
636
- },
637
- "auto_web_analyzed": {
638
- "en": "Web automation task analysis completed",
639
- "zh": "网页自动化任务分析完成"
640
- },
641
- "executing_web_action": {
642
- "en": "Executing action: {{action}} - {{description}}",
643
- "zh": "执行操作: {{action}} - {{description}}"
644
- },
645
- "executing_step": {
646
- "en": "Executing step {{step}}: {{description}}",
647
- "zh": "执行步骤 {{step}}: {{description}}"
648
- },
649
- "operation_cancelled": {
650
- "en": "Operation cancelled",
651
- "zh": "操作已取消"
652
- },
653
- "element_not_found": {
654
- "en": "Element not found: {{element}}",
655
- "zh": "未找到元素: {{element}}"
656
- },
657
- "analyzing_results": {
658
- "en": "Analyzing execution results...",
659
- "zh": "分析执行结果..."
660
- },
661
- "next_steps_determined": {
662
- "en": "Next steps determined",
663
- "zh": "已确定下一步操作"
664
- },
665
- "max_iterations_reached": {
666
- "en": "Max iterations reached ({max_iterations})",
667
- "zh": "已达到最大迭代次数 {{max_iterations}}"
668
- },
669
- "action_verification_failed": {
670
- "en": "Action verification failed: {{action}} - {{reason}}",
671
- "zh": "操作验证失败: {{action}} - {{reason}}"
672
- },
673
- "action_succeeded": {
674
- "en": "Action succeeded: {{action}}",
675
- "zh": "操作成功: {{action}}"
676
- },
677
- "replanned_actions": {
678
- "en": "Replanned {{count}} actions",
679
- "zh": "已重新规划 {{count}} 个操作"
680
- },
681
- "web_automation_ask_user": {
682
- "en": "Your answer: ",
683
- "zh": "您的回答: "
684
- },
685
- "filter_mode_normal": {
686
- "en": "Using normal filter mode for index processing...",
687
- "zh": "正在使用普通过滤模式处理索引..."
688
- },
689
- "filter_mode_big": {
690
- "en": "Index file is large ({{ tokens_len }} tokens), using big_filter mode for processing...",
691
- "zh": "索引文件较大 ({{ tokens_len }} tokens),正在使用 big_filter 模式处理..."
692
- },
693
- "filter_mode_super_big": {
694
- "en": "Index file is very large ({{ tokens_len }} tokens), using super_big_filter mode for processing...",
695
- "zh": "索引文件非常大 ({{ tokens_len }} tokens),正在使用 super_big_filter 模式处理..."
696
- },
697
- "super_big_filter_failed": {
698
- "en": "❌ Super big filter failed: {{ error }}.",
699
- "zh": "❌ 超大过滤器失败: {{ error }}."
700
- },
701
- "super_big_filter_stats": {
702
- "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 }}",
703
- "zh": "{{ model_names }} 超大过滤器完成耗时 {{ elapsed_time }} 秒,输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}, 输入成本: {{ input_cost }}, 输出成本: {{ output_cost }}, 速度: {{ speed }} tokens/秒, 块索引: {{ chunk_index }}"
704
- },
705
- "super_big_filter_splitting": {
706
- "en": "⚠️ Index file is extremely large ({{ tokens_len }}/{{ max_tokens }}). The query will be split into {{ split_size }} chunks for processing.",
707
- "zh": "⚠️ 索引文件极其庞大 ({{ tokens_len }}/{{ max_tokens }})。查询将被分成 {{ split_size }} 个部分进行处理。"
708
- },
709
- "super_big_filter_title": {
710
- "en": "{{ model_name }} is analyzing how to filter extremely large context...",
711
- "zh": "{{ model_name }} 正在分析如何过滤极大规模上下文..."
712
- },
713
- "mcp_server_info_error": {
714
- "en": "Error getting MCP server info: {{ error }}",
715
- "zh": "获取MCP服务器信息时出错: {{ error }}"
716
- },
717
- "mcp_server_info_title": {
718
- "en": "Connected MCP Server Info",
719
- "zh": "已连接的MCP服务器信息"
720
- },
721
- "no_commit_file_name": {
722
- "en": "Cannot get the file name of the commit_id in the actions directory: {{commit_id}}",
723
- "zh": "无法获取commit_id关联的actions 目录下的文件名: {{commit_id}}"
724
- },
725
- "yaml_update_success": {
726
- "en": "✅ Successfully updated YAML file: {{yaml_file}}",
727
- "zh": "✅ 成功更新YAML文件: {{yaml_file}}"
728
- },
729
- "yaml_save_error": {
730
- "en": "❌ Error saving YAML file {{yaml_file}}: {{error}}",
731
- "zh": "❌ 保存YAML文件出错 {{yaml_file}}: {{error}}"
732
- },
733
- "active_context_background_task": {
734
- "en": "🔄 Active context generation started in background (task ID: {{task_id}})",
735
- "zh": "🔄 正在后台生成活动上下文 (任务ID: {{task_id}})"
736
- },
737
- "conf_not_found": {
738
- "en": "Configuration not found: {{path}}",
739
- "zh": "未找到配置文件: {{path}}"
740
- },
741
- "code_generate_title": {
742
- "en": "{{model_name}} is generating code",
743
- "zh": "{{model_name}}正在生成代码"
744
- },
745
- "generating_initial_code": {
746
- "en": "Generating initial code...",
747
- "zh": "正在生成初始代码..."
748
- },
749
- "generation_failed": {
750
- "en": "Code generation failed",
751
- "zh": "代码生成失败"
752
- },
753
- "no_files_to_lint": {
754
- "en": "No files to lint",
755
- "zh": "没有需要检查的文件"
756
- },
757
- "no_lint_errors_found": {
758
- "en": "No lint errors found",
759
- "zh": "未发现代码质量问题"
760
- },
761
- "lint_attempt_status": {
762
- "en": "Lint attempt {{attempt}}/{{max_correction_attempts}}: {{error_count}} errors found. {{ formatted_issues }}",
763
- "zh": "代码质量检查尝试 {{attempt}}/{{max_correction_attempts}}: 发现 {{error_count}} 个错误. {{ formatted_issues }}"
764
- },
765
- "max_attempts_reached": {
766
- "en": "Maximum correction attempts reached",
767
- "zh": "已达到最大修复尝试次数"
768
- },
769
- "compile_success": {
770
- "en": "Compile success",
771
- "zh": "编译成功"
772
- },
773
- "compile_failed": {
774
- "en": "Compile failed",
775
- "zh": "编译失败"
776
- },
777
- "compile_attempt_status": {
778
- "en": "Compile attempt {{attempt}}/{{max_correction_attempts}}: {{error_count}} errors found. {{ formatted_issues }}",
779
- "zh": "编译尝试 {{attempt}}/{{max_correction_attempts}}: 发现 {{error_count}} 个错误. {{ formatted_issues }}"
780
- },
781
- "max_compile_attempts_reached": {
782
- "en": "Maximum compilation attempts reached",
783
- "zh": "已达到最大编译尝试次数"
784
- },
785
- "unmerged_blocks_fixed": {
786
- "en": "Unmerged blocks fixed successfully",
787
- "zh": "未合并代码块已成功修复"
788
- },
789
- "unmerged_blocks_attempt_status": {
790
- "en": "Fixing unmerged blocks attempt {{attempt}}/{{max_correction_attempts}}",
791
- "zh": "正在尝试修复未合并代码块 {{attempt}}/{{max_correction_attempts}}"
792
- },
793
- "max_unmerged_blocks_attempts_reached": {
794
- "en": "Maximum unmerged blocks fix attempts reached",
795
- "zh": "已达到最大未合并代码块修复尝试次数"
796
- },
797
- "agenticFilterContext": {
798
- "en": "Start to find context...",
799
- "zh": "开始智能查找上下文...."
800
- },
801
- "agenticFilterContextFinished": {
802
- "en": "End to find context...",
803
- "zh": "结束智能查找上下文...."
804
- },
805
- "/context/check/start":{
806
- "en": "Starting missing context checking process.",
807
- "zh": "开始缺失上下文检查过程."
808
- },
809
- "/context/check/end": {
810
- "en": "Finished missing context checking process.",
811
- "zh": "结束缺失上下文检查过程."
812
- },
813
- "/unmerged_blocks/check/start": {
814
- "en": "Starting unmerged blocks checking process.",
815
- "zh": "开始未合并代码检查过程."
816
- },
817
- "/unmerged_blocks/check/end": {
818
- "en": "Finished unmerged blocks checking process.",
819
- "zh": "结束未合并代码检查过程."
820
- },
821
- "/lint/check/start": {
822
- "en": "Starting lint error checking process.",
823
- "zh": "开始代码质量检查过程."
824
- },
825
- "/lint/check/end": {
826
- "en": "Finished lint error checking process.",
827
- "zh": "结束代码质量检查过程."
828
- },
829
- "/compile/check/start": {
830
- "en": "Starting compile error checking process.",
831
- "zh": "开始编译错误检查过程."
832
- },
833
- "/compile/check/end": {
834
- "en": "Finished compile error checking process.",
835
- "zh": "结束编译错误检查过程."
836
- },
837
- "/agent/edit/objective":{
838
- "en":"Objective",
839
- "zh":"目标"
840
- },
841
- "/agent/edit/user_query":{
842
- "en":"User Query",
843
- "zh":"用户查询"
844
- },
845
- "/agent/edit/apply_pre_changes":{
846
- "en":"Commit user changes",
847
- "zh":"检查用户是否有手动修改(如有,会自动提交)..."
848
- },
849
- "/agent/edit/apply_changes":{
850
- "en":"Commit the changes in preview steps",
851
- "zh":"提交前面步骤的修改"
852
- },
853
- "/agent/edit/pull_request/branch_name_failed": {
854
- "en": "Unable to get current branch name, skipping PR creation",
855
- "zh": "无法获取当前分支名,跳过 PR 创建"
856
- },
857
- "/agent/edit/pull_request/title": {
858
- "en": "AutoCoder: {{query}}",
859
- "zh": "AutoCoder: {{query}}"
860
- },
861
- "/agent/edit/pull_request/default_query": {
862
- "en": "Code auto generation",
863
- "zh": "代码自动生成"
864
- },
865
- "/agent/edit/pull_request/description": {
866
- "en": """## 🤖 AutoCoder Generated Pull Request
9
+ # Import messages module to auto-register all messages
10
+ from .international.messages import register_all_messages
867
11
 
868
- **Task Description**: {{query}}
12
+ # Messages are now automatically registered through the messages module
869
13
 
870
- ### 📝 Change Summary
871
- - Modified {{file_count}} files
872
- - Commit Hash: `{{commit_hash}}`
873
-
874
- ### 📂 Changed Files List
875
- {{file_list}}
876
-
877
- ### ⚙️ Generation Configuration
878
- - Source Branch: `{{source_branch}}`
879
- - Target Branch: `{{target_branch}}`
880
- - Auto-generated Time: {{timestamp}}
881
-
882
- ### 🔍 Next Steps
883
- - [ ] Code Review
884
- - [ ] Test Verification
885
- - [ ] Merge to Main Branch
886
-
887
- ---
888
- *This PR was automatically created by AutoCoder*
889
- """,
890
- "zh": """## 🤖 AutoCoder 自动生成的 Pull Request
891
-
892
- **任务描述**: {{query}}
893
-
894
- ### 📝 变更摘要
895
- - 共修改 {{file_count}} 个文件
896
- - 提交哈希: `{{commit_hash}}`
897
-
898
- ### 📂 变更文件列表
899
- {{file_list}}
900
-
901
- ### ⚙️ 生成配置
902
- - 源分支: `{{source_branch}}`
903
- - 目标分支: `{{target_branch}}`
904
- - 自动生成时间: {{timestamp}}
905
-
906
- ### 🔍 下一步
907
- - [ ] 代码审查
908
- - [ ] 测试验证
909
- - [ ] 合并到主分支
910
-
911
- ---
912
- *此 PR 由 AutoCoder 自动创建*
913
- """
914
- },
915
- "/agent/edit/pull_request/creating": {
916
- "en": "Creating Pull Request: {{title}}",
917
- "zh": "正在创建 Pull Request: {{title}}"
918
- },
919
- "/agent/edit/pull_request/success": {
920
- "en": "✅ Pull Request created successfully",
921
- "zh": "✅ Pull Request 创建成功"
922
- },
923
- "/agent/edit/pull_request/failed": {
924
- "en": "❌ Pull Request creation failed: {{error}}",
925
- "zh": "❌ Pull Request 创建失败: {{error}}"
926
- },
927
- "/agent/edit/pull_request/exception": {
928
- "en": "❌ Exception occurred while creating Pull Request: {{error}}",
929
- "zh": "❌ 创建 Pull Request 时发生异常: {{error}}"
930
- }
931
- }
932
-
933
-
934
- # 新增 ReplaceInFileToolResolver 国际化消息
935
- MESSAGES.update({
936
- "replace_in_file.access_denied": {
937
- "en": "Error: Access denied. Attempted to modify file outside the project directory: {{file_path}}",
938
- "zh": "错误:拒绝访问。尝试修改项目目录之外的文件:{{file_path}}"
939
- },
940
- "replace_in_file.file_not_found": {
941
- "en": "Error: File not found at path: {{file_path}}",
942
- "zh": "错误:未找到文件路径:{{file_path}}"
943
- },
944
- "replace_in_file.read_error": {
945
- "en": "An error occurred while reading the file for replacement: {{error}}",
946
- "zh": "读取待替换文件时发生错误:{{error}}"
947
- },
948
- "replace_in_file.no_valid_blocks": {
949
- "en": "Error: No valid SEARCH/REPLACE blocks found in the provided diff.",
950
- "zh": "错误:在提供的diff中未找到有效的SEARCH/REPLACE代码块。"
951
- },
952
- "replace_in_file.apply_failed": {
953
- "en": "Failed to apply any changes. Errors:\n{{errors}}",
954
- "zh": "未能应用任何更改。错误信息:\n{{errors}}"
955
- },
956
- "replace_in_file.apply_success": {
957
- "en": "Successfully applied {{applied}}/{{total}} changes to file: {{file_path}}.",
958
- "zh": "成功应用了 {{applied}}/{{total}} 个更改到文件:{{file_path}}。"
959
- },
960
- "replace_in_file.apply_success_with_warnings": {
961
- "en": "Successfully applied {{applied}}/{{total}} changes to file: {{file_path}}.\nWarnings:\n{{errors}}",
962
- "zh": "成功应用了 {{applied}}/{{total}} 个更改到文件:{{file_path}}。\n警告信息:\n{{errors}}"
963
- },
964
- "replace_in_file.write_error": {
965
- "en": "An error occurred while writing the modified file: {{error}}",
966
- "zh": "写入修改后的文件时发生错误:{{error}}"
967
- }
968
- })
969
14
 
970
15
  def get_system_language():
971
- try:
972
- return locale.getdefaultlocale()[0][:2]
973
- except:
974
- return 'en'
16
+ """
17
+ Get the system's default language code
18
+ Delegates to the international module
19
+ """
20
+ return _get_system_language()
975
21
 
976
22
 
977
23
  def get_message(key):
978
- lang = get_system_language()
979
- if key in MESSAGES:
980
- return MESSAGES[key].get(lang, MESSAGES[key].get("en", ""))
981
- return ""
24
+ """
25
+ Get a localized message by key
26
+ Delegates to the international module
27
+ """
28
+ return _get_message(key)
982
29
 
983
30
 
984
31
  def get_message_with_format(msg_key: str, **kwargs):
985
- return format_str_jinja2(get_message(msg_key), **kwargs)
32
+ """
33
+ Get a localized message with template formatting
34
+ Delegates to the international module
35
+ """
36
+ return _get_message_with_format(msg_key, **kwargs)