auto-coder 0.1.337__tar.gz → 0.1.338__tar.gz

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 (278) hide show
  1. {auto_coder-0.1.337 → auto_coder-0.1.338}/PKG-INFO +1 -1
  2. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/auto_coder.egg-info/PKG-INFO +1 -1
  3. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/auto_coder_runner.py +3 -1
  4. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/auto_coder_lang.py +36 -0
  5. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit.py +88 -42
  6. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_conversation.py +73 -8
  7. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/replace_in_file_tool_resolver.py +17 -8
  8. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_types.py +5 -0
  9. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_tool_display.py +1 -1
  10. auto_coder-0.1.338/src/autocoder/version.py +1 -0
  11. auto_coder-0.1.337/src/autocoder/version.py +0 -1
  12. {auto_coder-0.1.337 → auto_coder-0.1.338}/LICENSE +0 -0
  13. {auto_coder-0.1.337 → auto_coder-0.1.338}/README.md +0 -0
  14. {auto_coder-0.1.337 → auto_coder-0.1.338}/setup.cfg +0 -0
  15. {auto_coder-0.1.337 → auto_coder-0.1.338}/setup.py +0 -0
  16. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/auto_coder.egg-info/SOURCES.txt +0 -0
  17. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/auto_coder.egg-info/dependency_links.txt +0 -0
  18. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/auto_coder.egg-info/entry_points.txt +0 -0
  19. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/auto_coder.egg-info/requires.txt +0 -0
  20. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/auto_coder.egg-info/top_level.txt +0 -0
  21. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/__init__.py +0 -0
  22. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/__init__.py +0 -0
  23. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/agentic_filter.py +0 -0
  24. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/auto_demand_organizer.py +0 -0
  25. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/auto_filegroup.py +0 -0
  26. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/auto_guess_query.py +0 -0
  27. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/auto_learn_from_commit.py +0 -0
  28. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/auto_review_commit.py +0 -0
  29. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/auto_tool.py +0 -0
  30. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/coder.py +0 -0
  31. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/designer.py +0 -0
  32. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/planner.py +0 -0
  33. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/agent/project_reader.py +0 -0
  34. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/auto_coder.py +0 -0
  35. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/auto_coder_rag.py +0 -0
  36. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/auto_coder_server.py +0 -0
  37. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/benchmark.py +0 -0
  38. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/chat/__init__.py +0 -0
  39. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/chat_auto_coder.py +0 -0
  40. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/chat_auto_coder_lang.py +0 -0
  41. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/command_args.py +0 -0
  42. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/command_parser.py +0 -0
  43. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/commands/__init__.py +0 -0
  44. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/commands/auto_command.py +0 -0
  45. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/commands/auto_web.py +0 -0
  46. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/commands/tools.py +0 -0
  47. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/JupyterClient.py +0 -0
  48. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/ShellClient.py +0 -0
  49. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/__init__.py +0 -0
  50. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/action_yml_file_manager.py +0 -0
  51. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/anything2images.py +0 -0
  52. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/anything2img.py +0 -0
  53. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/audio.py +0 -0
  54. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/auto_configure.py +0 -0
  55. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/buildin_tokenizer.py +0 -0
  56. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/chunk_validation.py +0 -0
  57. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/cleaner.py +0 -0
  58. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/code_auto_execute.py +0 -0
  59. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/code_auto_generate.py +0 -0
  60. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/code_auto_generate_diff.py +0 -0
  61. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/code_auto_generate_editblock.py +0 -0
  62. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/code_auto_generate_strict_diff.py +0 -0
  63. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/code_auto_merge.py +0 -0
  64. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/code_auto_merge_diff.py +0 -0
  65. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/code_auto_merge_editblock.py +0 -0
  66. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/code_auto_merge_strict_diff.py +0 -0
  67. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/code_modification_ranker.py +0 -0
  68. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/command_completer.py +0 -0
  69. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/command_generator.py +0 -0
  70. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/command_templates.py +0 -0
  71. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/computer_use.py +0 -0
  72. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/conf_import_export.py +0 -0
  73. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/conf_utils.py +0 -0
  74. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/conf_validator.py +0 -0
  75. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/const.py +0 -0
  76. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/context_pruner.py +0 -0
  77. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/conversation_pruner.py +0 -0
  78. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/files.py +0 -0
  79. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/git_utils.py +0 -0
  80. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/global_cancel.py +0 -0
  81. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/image_to_page.py +0 -0
  82. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/index_import_export.py +0 -0
  83. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/interpreter.py +0 -0
  84. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/llm_rerank.py +0 -0
  85. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/mcp_hub.py +0 -0
  86. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/mcp_server.py +0 -0
  87. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/mcp_server_install.py +0 -0
  88. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/mcp_server_types.py +0 -0
  89. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/mcp_servers/__init__.py +0 -0
  90. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/mcp_servers/mcp_server_gpt4o_mini_search.py +0 -0
  91. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/mcp_servers/mcp_server_perplexity.py +0 -0
  92. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/mcp_tools.py +0 -0
  93. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/memory_manager.py +0 -0
  94. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/model_speed_test.py +0 -0
  95. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/openai_content.py +0 -0
  96. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/printer.py +0 -0
  97. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/recall_validation.py +0 -0
  98. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/result_manager.py +0 -0
  99. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/screenshots.py +0 -0
  100. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/search.py +0 -0
  101. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/search_replace.py +0 -0
  102. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/shells.py +0 -0
  103. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/stats_panel.py +0 -0
  104. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/stream_out_type.py +0 -0
  105. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/sys_prompt.py +0 -0
  106. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/text.py +0 -0
  107. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/token_cost_caculate.py +0 -0
  108. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/types.py +0 -0
  109. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/utils_code_auto_generate.py +0 -0
  110. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/__init__.py +0 -0
  111. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/__init__.py +0 -0
  112. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/__init__.py +0 -0
  113. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/ask_followup_question_tool_resolver.py +0 -0
  114. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/attempt_completion_tool_resolver.py +0 -0
  115. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/base_tool_resolver.py +0 -0
  116. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/execute_command_tool_resolver.py +0 -0
  117. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/list_code_definition_names_tool_resolver.py +0 -0
  118. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/list_files_tool_resolver.py +0 -0
  119. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/plan_mode_respond_tool_resolver.py +0 -0
  120. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/read_file_tool_resolver.py +0 -0
  121. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/search_files_tool_resolver.py +0 -0
  122. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/use_mcp_tool_resolver.py +0 -0
  123. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/agent/agentic_edit_tools/write_to_file_tool_resolver.py +0 -0
  124. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_agentic_editblock_manager.py +0 -0
  125. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_auto_generate.py +0 -0
  126. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_auto_generate_diff.py +0 -0
  127. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_auto_generate_editblock.py +0 -0
  128. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_auto_generate_strict_diff.py +0 -0
  129. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_auto_merge.py +0 -0
  130. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_auto_merge_diff.py +0 -0
  131. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_auto_merge_editblock.py +0 -0
  132. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_auto_merge_strict_diff.py +0 -0
  133. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_diff_manager.py +0 -0
  134. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_editblock_manager.py +0 -0
  135. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_manager.py +0 -0
  136. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/common/v2/code_strict_diff_manager.py +0 -0
  137. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/__init__.py +0 -0
  138. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/base_compiler.py +0 -0
  139. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/compiler_config_api.py +0 -0
  140. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/compiler_config_manager.py +0 -0
  141. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/compiler_factory.py +0 -0
  142. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/java_compiler.py +0 -0
  143. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/models.py +0 -0
  144. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/provided_compiler.py +0 -0
  145. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/python_compiler.py +0 -0
  146. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/reactjs_compiler.py +0 -0
  147. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/shadow_compiler.py +0 -0
  148. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/compilers/vue_compiler.py +0 -0
  149. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/data/byzerllm.md +0 -0
  150. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/data/tokenizer.json +0 -0
  151. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/db/__init__.py +0 -0
  152. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/db/store.py +0 -0
  153. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/dispacher/__init__.py +0 -0
  154. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/dispacher/actions/__init__.py +0 -0
  155. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/dispacher/actions/action.py +0 -0
  156. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/dispacher/actions/copilot.py +0 -0
  157. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/dispacher/actions/plugins/__init__.py +0 -0
  158. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/dispacher/actions/plugins/action_regex_project.py +0 -0
  159. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/events/__init__.py +0 -0
  160. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/events/event_content.py +0 -0
  161. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/events/event_manager.py +0 -0
  162. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/events/event_manager_singleton.py +0 -0
  163. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/events/event_store.py +0 -0
  164. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/events/event_types.py +0 -0
  165. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/helper/__init__.py +0 -0
  166. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/helper/project_creator.py +0 -0
  167. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/index/__init__.py +0 -0
  168. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/index/entry.py +0 -0
  169. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/index/filter/__init__.py +0 -0
  170. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/index/filter/normal_filter.py +0 -0
  171. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/index/filter/quick_filter.py +0 -0
  172. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/index/for_command.py +0 -0
  173. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/index/index.py +0 -0
  174. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/index/symbols_utils.py +0 -0
  175. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/index/types.py +0 -0
  176. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/lang.py +0 -0
  177. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/linters/__init__.py +0 -0
  178. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/linters/base_linter.py +0 -0
  179. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/linters/linter_factory.py +0 -0
  180. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/linters/models.py +0 -0
  181. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/linters/python_linter.py +0 -0
  182. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/linters/reactjs_linter.py +0 -0
  183. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/linters/shadow_linter.py +0 -0
  184. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/linters/vue_linter.py +0 -0
  185. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/memory/__init__.py +0 -0
  186. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/memory/active_context_manager.py +0 -0
  187. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/memory/active_package.py +0 -0
  188. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/memory/async_processor.py +0 -0
  189. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/memory/directory_mapper.py +0 -0
  190. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/models.py +0 -0
  191. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/plugins/__init__.py +0 -0
  192. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/plugins/dynamic_completion_example.py +0 -0
  193. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/plugins/git_helper_plugin.py +0 -0
  194. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/plugins/sample_plugin.py +0 -0
  195. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/plugins/token_helper_plugin.py +0 -0
  196. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/plugins/utils.py +0 -0
  197. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/privacy/__init__.py +0 -0
  198. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/privacy/model_filter.py +0 -0
  199. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/pyproject/__init__.py +0 -0
  200. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/__init__.py +0 -0
  201. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/api_server.py +0 -0
  202. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/cache/__init__.py +0 -0
  203. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/cache/base_cache.py +0 -0
  204. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/cache/byzer_storage_cache.py +0 -0
  205. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/cache/cache_result_merge.py +0 -0
  206. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/cache/file_monitor_cache.py +0 -0
  207. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/cache/local_byzer_storage_cache.py +0 -0
  208. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/cache/local_duckdb_storage_cache.py +0 -0
  209. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/cache/rag_file_meta.py +0 -0
  210. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/cache/simple_cache.py +0 -0
  211. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/conversation_to_queries.py +0 -0
  212. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/doc_filter.py +0 -0
  213. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/document_retriever.py +0 -0
  214. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/lang.py +0 -0
  215. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/llm_wrapper.py +0 -0
  216. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/loaders/__init__.py +0 -0
  217. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/loaders/docx_loader.py +0 -0
  218. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/loaders/excel_loader.py +0 -0
  219. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/loaders/pdf_loader.py +0 -0
  220. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/loaders/ppt_loader.py +0 -0
  221. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/long_context_rag.py +0 -0
  222. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/qa_conversation_strategy.py +0 -0
  223. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/rag_config.py +0 -0
  224. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/rag_entry.py +0 -0
  225. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/raw_rag.py +0 -0
  226. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/relevant_utils.py +0 -0
  227. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/searchable.py +0 -0
  228. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/simple_directory_reader.py +0 -0
  229. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/simple_rag.py +0 -0
  230. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/stream_event/__init__.py +0 -0
  231. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/stream_event/event_writer.py +0 -0
  232. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/stream_event/types.py +0 -0
  233. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/token_checker.py +0 -0
  234. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/token_counter.py +0 -0
  235. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/token_limiter.py +0 -0
  236. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/token_limiter_utils.py +0 -0
  237. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/types.py +0 -0
  238. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/utils.py +0 -0
  239. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/rag/variable_holder.py +0 -0
  240. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/regexproject/__init__.py +0 -0
  241. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/run_context.py +0 -0
  242. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/shadows/__init__.py +0 -0
  243. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/shadows/shadow_manager.py +0 -0
  244. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/suffixproject/__init__.py +0 -0
  245. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/tsproject/__init__.py +0 -0
  246. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/__init__.py +0 -0
  247. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/_markitdown.py +0 -0
  248. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/auto_coder_utils/__init__.py +0 -0
  249. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/auto_coder_utils/chat_stream_out.py +0 -0
  250. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/auto_project_type.py +0 -0
  251. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/chat_auto_coder_utils/__init__.py +0 -0
  252. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/conversation_store.py +0 -0
  253. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/llm_client_interceptors.py +0 -0
  254. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/llms.py +0 -0
  255. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/log_capture.py +0 -0
  256. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/model_provider_selector.py +0 -0
  257. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/multi_turn.py +0 -0
  258. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/operate_config_api.py +0 -0
  259. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/print_table.py +0 -0
  260. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/project_structure.py +0 -0
  261. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/queue_communicate.py +0 -0
  262. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/request_event_queue.py +0 -0
  263. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/request_queue.py +0 -0
  264. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/rest.py +0 -0
  265. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/stream_thinking.py +0 -0
  266. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/tests.py +0 -0
  267. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/thread_utils.py +0 -0
  268. {auto_coder-0.1.337 → auto_coder-0.1.338}/src/autocoder/utils/types.py +0 -0
  269. {auto_coder-0.1.337 → auto_coder-0.1.338}/tests/test_action_regex_project.py +0 -0
  270. {auto_coder-0.1.337 → auto_coder-0.1.338}/tests/test_action_yml_file_manager.py +0 -0
  271. {auto_coder-0.1.337 → auto_coder-0.1.338}/tests/test_chat_auto_coder.py +0 -0
  272. {auto_coder-0.1.337 → auto_coder-0.1.338}/tests/test_code_auto_merge_editblock.py +0 -0
  273. {auto_coder-0.1.337 → auto_coder-0.1.338}/tests/test_command_completer.py +0 -0
  274. {auto_coder-0.1.337 → auto_coder-0.1.338}/tests/test_planner.py +0 -0
  275. {auto_coder-0.1.337 → auto_coder-0.1.338}/tests/test_plugins.py +0 -0
  276. {auto_coder-0.1.337 → auto_coder-0.1.338}/tests/test_privacy.py +0 -0
  277. {auto_coder-0.1.337 → auto_coder-0.1.338}/tests/test_queue_communicate.py +0 -0
  278. {auto_coder-0.1.337 → auto_coder-0.1.338}/tests/test_symbols_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: auto-coder
3
- Version: 0.1.337
3
+ Version: 0.1.338
4
4
  Summary: AutoCoder: AutoCoder
5
5
  Author: allwefantasy
6
6
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: auto-coder
3
- Version: 0.1.337
3
+ Version: 0.1.338
4
4
  Summary: AutoCoder: AutoCoder
5
5
  Author: allwefantasy
6
6
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
@@ -2835,7 +2835,9 @@ def auto_command(query: str,extra_args: Dict[str,Any]={}):
2835
2835
  agent = AgenticEdit(llm=llm,args=args,files=SourceCodeList(sources=sources),
2836
2836
  conversation_history=[],
2837
2837
  memory_config=MemoryConfig(memory=memory,
2838
- save_memory_func=save_memory), command_config=CommandConfig)
2838
+ save_memory_func=save_memory), command_config=CommandConfig,
2839
+ conversation_name="current"
2840
+ )
2839
2841
  agent.run_in_terminal(AgenticEditRequest(user_input=query))
2840
2842
  return
2841
2843
 
@@ -837,6 +837,42 @@ MESSAGES = {
837
837
  }
838
838
 
839
839
 
840
+ # 新增 ReplaceInFileToolResolver 国际化消息
841
+ MESSAGES.update({
842
+ "replace_in_file.access_denied": {
843
+ "en": "Error: Access denied. Attempted to modify file outside the project directory: {{file_path}}",
844
+ "zh": "错误:拒绝访问。尝试修改项目目录之外的文件:{{file_path}}"
845
+ },
846
+ "replace_in_file.file_not_found": {
847
+ "en": "Error: File not found at path: {{file_path}}",
848
+ "zh": "错误:未找到文件路径:{{file_path}}"
849
+ },
850
+ "replace_in_file.read_error": {
851
+ "en": "An error occurred while reading the file for replacement: {{error}}",
852
+ "zh": "读取待替换文件时发生错误:{{error}}"
853
+ },
854
+ "replace_in_file.no_valid_blocks": {
855
+ "en": "Error: No valid SEARCH/REPLACE blocks found in the provided diff.",
856
+ "zh": "错误:在提供的diff中未找到有效的SEARCH/REPLACE代码块。"
857
+ },
858
+ "replace_in_file.apply_failed": {
859
+ "en": "Failed to apply any changes. Errors:\n{{errors}}",
860
+ "zh": "未能应用任何更改。错误信息:\n{{errors}}"
861
+ },
862
+ "replace_in_file.apply_success": {
863
+ "en": "Successfully applied {{applied}}/{{total}} changes to file: {{file_path}}.",
864
+ "zh": "成功应用了 {{applied}}/{{total}} 个更改到文件:{{file_path}}。"
865
+ },
866
+ "replace_in_file.apply_success_with_warnings": {
867
+ "en": "Successfully applied {{applied}}/{{total}} changes to file: {{file_path}}.\nWarnings:\n{{errors}}",
868
+ "zh": "成功应用了 {{applied}}/{{total}} 个更改到文件:{{file_path}}。\n警告信息:\n{{errors}}"
869
+ },
870
+ "replace_in_file.write_error": {
871
+ "en": "An error occurred while writing the modified file: {{error}}",
872
+ "zh": "写入修改后的文件时发生错误:{{error}}"
873
+ }
874
+ })
875
+
840
876
  def get_system_language():
841
877
  try:
842
878
  return locale.getdefaultlocale()[0][:2]
@@ -1,3 +1,4 @@
1
+ from autocoder.common.v2.agent.agentic_edit_conversation import AgenticConversation
1
2
  from enum import Enum
2
3
  from enum import Enum
3
4
  import json
@@ -64,7 +65,7 @@ from autocoder.common.v2.agent.agentic_edit_types import (AgenticEditRequest, To
64
65
  TOOL_MODEL_MAP,
65
66
  # Event Types
66
67
  LLMOutputEvent, LLMThinkingEvent, ToolCallEvent,
67
- ToolResultEvent, CompletionEvent, ErrorEvent,TokenUsageEvent,
68
+ ToolResultEvent, CompletionEvent, PlanModeRespondEvent, ErrorEvent, TokenUsageEvent,
68
69
  # Import specific tool types for display mapping
69
70
  ReadFileTool, WriteToFileTool, ReplaceInFileTool, ExecuteCommandTool,
70
71
  ListFilesTool, SearchFilesTool, ListCodeDefinitionNamesTool,
@@ -87,6 +88,7 @@ TOOL_RESOLVER_MAP: Dict[Type[BaseTool], Type[BaseToolResolver]] = {
87
88
  UseMcpTool: UseMcpToolResolver,
88
89
  }
89
90
 
91
+
90
92
  # --- Tool Display Customization is now handled by agentic_tool_display.py ---
91
93
 
92
94
 
@@ -99,6 +101,7 @@ class AgenticEdit:
99
101
  args: AutoCoderArgs,
100
102
  memory_config: MemoryConfig,
101
103
  command_config: Optional[CommandConfig] = None,
104
+ conversation_name: str = "current"
102
105
  ):
103
106
  self.llm = llm
104
107
  self.args = args
@@ -113,12 +116,15 @@ class AgenticEdit:
113
116
  self.project_type_analyzer = ProjectTypeAnalyzer(
114
117
  args=args, llm=self.llm)
115
118
 
119
+ self.conversation_manager = AgenticConversation(
120
+ args, self.conversation_history, conversation_name=conversation_name)
121
+
116
122
  self.shadow_manager = ShadowManager(
117
123
  args.source_dir, args.event_file, args.ignore_clean_shadows)
118
124
  self.shadow_linter = ShadowLinter(self.shadow_manager, verbose=False)
119
125
  self.shadow_compiler = ShadowCompiler(
120
- self.shadow_manager, verbose=False)
121
-
126
+ self.shadow_manager, verbose=False)
127
+
122
128
  self.mcp_server_info = ""
123
129
  # try:
124
130
  # self.mcp_server = get_mcp_server()
@@ -133,7 +139,7 @@ class AgenticEdit:
133
139
  # logger.error(f"Error getting MCP server info: {str(e)}")
134
140
 
135
141
  # 变更跟踪信息
136
- # 格式: { file_path: FileChangeEntry(...) }
142
+ # 格式: { file_path: FileChangeEntry(...) }
137
143
  self.file_changes: Dict[str, FileChangeEntry] = {}
138
144
 
139
145
  def record_file_change(self, file_path: str, change_type: str, diff: Optional[str] = None, content: Optional[str] = None):
@@ -148,7 +154,8 @@ class AgenticEdit:
148
154
  """
149
155
  entry = self.file_changes.get(file_path)
150
156
  if entry is None:
151
- entry = FileChangeEntry(type=change_type, diffs=[], content=content)
157
+ entry = FileChangeEntry(
158
+ type=change_type, diffs=[], content=content)
152
159
  self.file_changes[file_path] = entry
153
160
  else:
154
161
  # 文件已经存在,可能之前是 added,现在又被 modified,或者多次 modified
@@ -185,8 +192,10 @@ class AgenticEdit:
185
192
  for fname in files:
186
193
  shadow_file_path = os.path.join(root, fname)
187
194
  try:
188
- project_file_path = self.shadow_manager.from_shadow_path(shadow_file_path)
189
- rel_path = os.path.relpath(project_file_path, self.args.source_dir)
195
+ project_file_path = self.shadow_manager.from_shadow_path(
196
+ shadow_file_path)
197
+ rel_path = os.path.relpath(
198
+ project_file_path, self.args.source_dir)
190
199
  changed_files.append(rel_path)
191
200
  except Exception:
192
201
  # 非映射关系,忽略
@@ -391,7 +400,7 @@ class AgenticEdit:
391
400
  Your query here
392
401
  </query>
393
402
  </use_mcp_tool>
394
-
403
+
395
404
  {%if mcp_server_info %}
396
405
  ### MCP_SERVER_LIST
397
406
  {{mcp_server_info}}
@@ -736,10 +745,14 @@ class AgenticEdit:
736
745
  executes tools, and yields structured events for visualization until completion or error.
737
746
  """
738
747
  system_prompt = self._analyze.prompt(request)
748
+
739
749
  conversations = [
740
750
  {"role": "system", "content": system_prompt},
741
- {"role": "user", "content": request.user_input}
742
- ]
751
+ ] + self.conversation_manager.get_history()
752
+ conversations.append({
753
+ "role": "user", "content": request.user_input
754
+ })
755
+ self.conversation_manager.add_user_message(request.user_input)
743
756
  logger.debug(
744
757
  f"Initial conversation history size: {len(conversations)}")
745
758
 
@@ -749,17 +762,17 @@ class AgenticEdit:
749
762
  f"Starting LLM interaction cycle. History size: {len(conversations)}")
750
763
  tool_executed = False
751
764
  assistant_buffer = ""
752
-
765
+
753
766
  llm_response_gen = stream_chat_with_continue(
754
767
  llm=self.llm,
755
768
  conversations=conversations,
756
769
  llm_config={}, # Placeholder for future LLM configs
757
770
  args=self.args
758
771
  )
759
-
772
+
760
773
  meta_holder = byzerllm.MetaHolder()
761
774
  parsed_events = self.stream_and_parse_llm_response(
762
- llm_response_gen,meta_holder)
775
+ llm_response_gen, meta_holder)
763
776
 
764
777
  for event in parsed_events:
765
778
  global_cancel.check_and_raise()
@@ -777,6 +790,8 @@ class AgenticEdit:
777
790
  "role": "assistant",
778
791
  "content": assistant_buffer + tool_xml
779
792
  })
793
+ self.conversation_manager.add_assistant_message(
794
+ assistant_buffer + tool_xml)
780
795
  assistant_buffer = "" # Reset buffer after tool call
781
796
 
782
797
  yield event # Yield the ToolCallEvent for display
@@ -790,6 +805,14 @@ class AgenticEdit:
790
805
  "AgenticEdit analyze loop finished due to AttemptCompletion.")
791
806
  return
792
807
 
808
+ if isinstance(tool_obj, PlanModeRespondTool):
809
+ logger.info(
810
+ "PlanModeRespondTool received. Finalizing session.")
811
+ yield PlanModeRespondEvent(completion=tool_obj, completion_xml=tool_xml)
812
+ logger.info(
813
+ "AgenticEdit analyze loop finished due to PlanModeRespond.")
814
+ return
815
+
793
816
  # Resolve the tool
794
817
  resolver_cls = TOOL_RESOLVER_MAP.get(type(tool_obj))
795
818
  if not resolver_cls:
@@ -844,6 +867,7 @@ class AgenticEdit:
844
867
  "role": "user", # Simulating the user providing the tool result
845
868
  "content": error_xml
846
869
  })
870
+ self.conversation_manager.add_user_message(error_xml)
847
871
  logger.debug(
848
872
  f"Added tool result to conversations for tool {type(tool_obj).__name__}")
849
873
  break # After tool execution and result, break to start a new LLM cycle
@@ -862,6 +886,8 @@ class AgenticEdit:
862
886
  if assistant_buffer:
863
887
  conversations.append(
864
888
  {"role": "assistant", "content": assistant_buffer})
889
+ self.conversation_manager.add_assistant_message(
890
+ assistant_buffer)
865
891
  # If the loop ends without AttemptCompletion, it means the LLM finished talking
866
892
  # without signaling completion. We might just stop or yield a final message.
867
893
  # Let's assume it stops here.
@@ -870,7 +896,7 @@ class AgenticEdit:
870
896
  logger.info("AgenticEdit analyze loop finished.")
871
897
 
872
898
  def stream_and_parse_llm_response(
873
- self, generator: Generator[Tuple[str, Any], None, None],meta_holder: byzerllm.MetaHolder
899
+ self, generator: Generator[Tuple[str, Any], None, None], meta_holder: byzerllm.MetaHolder
874
900
  ) -> Generator[Union[LLMOutputEvent, LLMThinkingEvent, ToolCallEvent, ErrorEvent], None, None]:
875
901
  """
876
902
  Streamingly parses the LLM response generator, distinguishing between
@@ -1081,17 +1107,17 @@ class AgenticEdit:
1081
1107
  Runs the agentic edit process, converting internal events to the
1082
1108
  standard event system format and writing them using the event manager.
1083
1109
  """
1084
- event_manager = get_event_manager(self.args.event_file)
1110
+ event_manager = get_event_manager(self.args.event_file)
1085
1111
 
1086
1112
  try:
1087
1113
  event_stream = self.analyze(request)
1088
1114
  for agent_event in event_stream:
1089
1115
  content = None
1090
1116
  metadata = EventMetadata(
1091
- action_file=self.args.event_file,
1092
- is_streaming=False,
1117
+ action_file=self.args.event_file,
1118
+ is_streaming=False,
1093
1119
  stream_out_type="/agent/edit")
1094
-
1120
+
1095
1121
  if isinstance(agent_event, LLMThinkingEvent):
1096
1122
  content = EventContentCreator.create_stream_thinking(
1097
1123
  content=agent_event.text)
@@ -1134,7 +1160,8 @@ class AgenticEdit:
1134
1160
  try:
1135
1161
  self.apply_changes()
1136
1162
  except Exception as e:
1137
- logger.exception(f"Error merging shadow changes to project: {e}")
1163
+ logger.exception(
1164
+ f"Error merging shadow changes to project: {e}")
1138
1165
 
1139
1166
  metadata.path = "/agent/edit/completion"
1140
1167
  content = EventContentCreator.create_completion(
@@ -1144,7 +1171,8 @@ class AgenticEdit:
1144
1171
  **agent_event.completion.model_dump()
1145
1172
  }
1146
1173
  )
1147
- event_manager.write_completion(content=content.to_dict(), metadata=metadata.to_dict())
1174
+ event_manager.write_completion(
1175
+ content=content.to_dict(), metadata=metadata.to_dict())
1148
1176
  elif isinstance(agent_event, ErrorEvent):
1149
1177
  metadata.path = "/agent/edit/error"
1150
1178
  content = EventContentCreator.create_error(
@@ -1152,7 +1180,8 @@ class AgenticEdit:
1152
1180
  error_message=agent_event.message,
1153
1181
  details={"agent_event_type": "ErrorEvent"}
1154
1182
  )
1155
- event_manager.write_error(content=content.to_dict(), metadata=metadata.to_dict())
1183
+ event_manager.write_error(
1184
+ content=content.to_dict(), metadata=metadata.to_dict())
1156
1185
  else:
1157
1186
  metadata.path = "/agent/edit/error"
1158
1187
  logger.warning(
@@ -1163,7 +1192,8 @@ class AgenticEdit:
1163
1192
  details={"agent_event_type": type(
1164
1193
  agent_event).__name__}
1165
1194
  )
1166
- event_manager.write_error(content=content.to_dict(), metadata=metadata.to_dict())
1195
+ event_manager.write_error(
1196
+ content=content.to_dict(), metadata=metadata.to_dict())
1167
1197
 
1168
1198
  except Exception as e:
1169
1199
  logger.exception(
@@ -1174,15 +1204,16 @@ class AgenticEdit:
1174
1204
  error_message=f"An unexpected error occurred: {str(e)}",
1175
1205
  details={"exception_type": type(e).__name__}
1176
1206
  )
1177
- event_manager.write_error(content=error_content.to_dict(), metadata=metadata.to_dict())
1207
+ event_manager.write_error(
1208
+ content=error_content.to_dict(), metadata=metadata.to_dict())
1178
1209
  # Re-raise the exception if needed, or handle appropriately
1179
1210
  raise e
1180
1211
 
1181
1212
  def apply_changes(self):
1182
1213
  """
1183
1214
  Apply all tracked file changes to the original project directory.
1184
- """
1185
- for (file_path,change) in self.get_all_file_changes().items():
1215
+ """
1216
+ for (file_path, change) in self.get_all_file_changes().items():
1186
1217
  with open(file_path, 'w', encoding='utf-8') as f:
1187
1218
  f.write(change.content)
1188
1219
 
@@ -1194,33 +1225,40 @@ class AgenticEdit:
1194
1225
  self.args.source_dir,
1195
1226
  f"{self.args.query}\nauto_coder_{file_name}",
1196
1227
  )
1197
-
1198
- action_yml_file_manager = ActionYmlFileManager(self.args.source_dir)
1228
+
1229
+ action_yml_file_manager = ActionYmlFileManager(
1230
+ self.args.source_dir)
1199
1231
  action_file_name = os.path.basename(self.args.file)
1200
1232
  add_updated_urls = []
1201
1233
  commit_result.changed_files
1202
1234
  for file in commit_result.changed_files:
1203
- add_updated_urls.append(os.path.join(self.args.source_dir, file))
1235
+ add_updated_urls.append(
1236
+ os.path.join(self.args.source_dir, file))
1204
1237
 
1205
1238
  self.args.add_updated_urls = add_updated_urls
1206
- update_yaml_success = action_yml_file_manager.update_yaml_field(action_file_name, "add_updated_urls", add_updated_urls)
1207
- if not update_yaml_success:
1208
- self.printer.print_in_terminal("yaml_save_error", style="red", yaml_file=action_file_name)
1239
+ update_yaml_success = action_yml_file_manager.update_yaml_field(
1240
+ action_file_name, "add_updated_urls", add_updated_urls)
1241
+ if not update_yaml_success:
1242
+ self.printer.print_in_terminal(
1243
+ "yaml_save_error", style="red", yaml_file=action_file_name)
1209
1244
 
1210
1245
  if self.args.enable_active_context:
1211
- active_context_manager = ActiveContextManager(self.llm, self.args.source_dir)
1212
- task_id = active_context_manager.process_changes(self.args)
1213
- self.printer.print_in_terminal("active_context_background_task",
1214
- style="blue",
1215
- task_id=task_id)
1246
+ active_context_manager = ActiveContextManager(
1247
+ self.llm, self.args.source_dir)
1248
+ task_id = active_context_manager.process_changes(
1249
+ self.args)
1250
+ self.printer.print_in_terminal("active_context_background_task",
1251
+ style="blue",
1252
+ task_id=task_id)
1216
1253
  git_utils.print_commit_info(commit_result=commit_result)
1217
1254
  except Exception as e:
1218
1255
  self.printer.print_str_in_terminal(
1219
- self.git_require_msg(source_dir=self.args.source_dir, error=str(e)),
1256
+ self.git_require_msg(
1257
+ source_dir=self.args.source_dir, error=str(e)),
1220
1258
  style="red"
1221
- )
1259
+ )
1222
1260
  else:
1223
- self.printer.print_in_terminal("no_changes_made")
1261
+ self.printer.print_in_terminal("no_changes_made")
1224
1262
 
1225
1263
  def run_in_terminal(self, request: AgenticEditRequest):
1226
1264
  """
@@ -1258,6 +1296,9 @@ class AgenticEdit:
1258
1296
  if event.tool_name == "AttemptCompletionTool":
1259
1297
  continue # Do not display AttemptCompletionTool result
1260
1298
 
1299
+ if event.tool_name == "PlanModeRespondTool":
1300
+ continue
1301
+
1261
1302
  result = event.result
1262
1303
  title = f"✅ Tool Result: {event.tool_name}" if result.success else f"❌ Tool Result: {event.tool_name}"
1263
1304
  border_style = "green" if result.success else "red"
@@ -1274,7 +1315,7 @@ class AgenticEdit:
1274
1315
  panel_content = [base_content]
1275
1316
  syntax_content = None
1276
1317
 
1277
- if result.content is not None:
1318
+ if result.content is not None:
1278
1319
  content_str = ""
1279
1320
  try:
1280
1321
  if isinstance(result.content, (dict, list)):
@@ -1316,7 +1357,8 @@ class AgenticEdit:
1316
1357
  else:
1317
1358
  content_str = str(result.content)
1318
1359
  # Append simple string content directly
1319
- panel_content.append(_format_content(content_str))
1360
+ panel_content.append(
1361
+ _format_content(content_str))
1320
1362
  except Exception as e:
1321
1363
  logger.warning(
1322
1364
  f"Error formatting tool result content: {e}")
@@ -1329,13 +1371,17 @@ class AgenticEdit:
1329
1371
  # Print syntax highlighted content separately if it exists
1330
1372
  if syntax_content:
1331
1373
  console.print(syntax_content)
1374
+ elif isinstance(event, PlanModeRespondEvent):
1375
+ console.print(Panel(Markdown(event.completion.response),
1376
+ title="🏁 Task Completion", border_style="green", title_align="left"))
1332
1377
 
1333
1378
  elif isinstance(event, CompletionEvent):
1334
1379
  # 在这里完成实际合并
1335
1380
  try:
1336
1381
  self.apply_changes()
1337
1382
  except Exception as e:
1338
- logger.exception(f"Error merging shadow changes to project: {e}")
1383
+ logger.exception(
1384
+ f"Error merging shadow changes to project: {e}")
1339
1385
 
1340
1386
  console.print(Panel(Markdown(event.completion.result),
1341
1387
  title="🏁 Task Completion", border_style="green", title_align="left"))
@@ -1,6 +1,7 @@
1
1
  # src/autocoder/common/v2/agent/agentic_edit_conversation.py
2
2
  import os
3
3
  import json
4
+ import uuid
4
5
  from typing import List, Dict, Any, Optional
5
6
  from autocoder.common import AutoCoderArgs
6
7
 
@@ -15,16 +16,32 @@ class AgenticConversation:
15
16
  and retrieving the history.
16
17
  """
17
18
 
18
- def __init__(self, args: AutoCoderArgs, initial_history: Optional[List[MessageType]] = None):
19
+ def __init__(self, args: AutoCoderArgs, initial_history: Optional[List[MessageType]] = None, conversation_name: Optional[str] = None):
19
20
  """
20
21
  Initializes the conversation history.
21
22
 
22
23
  Args:
23
24
  initial_history: An optional list of messages to start with.
25
+ conversation_name: Optional conversation identifier. If provided, history is saved/loaded from a file named after it.
24
26
  """
25
27
  self.project_path = args.source_dir
26
28
  self._history: List[MessageType] = initial_history if initial_history is not None else []
27
- self.memory_file_path = os.path.join(self.project_path, ".auto-coder", "memory", "agentic_edit_memory.json")
29
+
30
+ # Determine the memory directory
31
+ memory_dir = os.path.join(self.project_path, ".auto-coder", "memory", "agentic_edit_memory")
32
+ os.makedirs(memory_dir, exist_ok=True)
33
+
34
+ # Determine conversation file path
35
+ if conversation_name:
36
+ filename = f"{conversation_name}.json"
37
+ else:
38
+ conversation_name = str(uuid.uuid4())
39
+ filename = f"{conversation_name}.json"
40
+
41
+ self.conversation_name = conversation_name
42
+ self.memory_file_path = os.path.join(memory_dir, filename)
43
+
44
+ # Load existing history if file exists
28
45
  self._load_memory()
29
46
 
30
47
  def add_message(self, role: str, content: Any, **kwargs):
@@ -67,14 +84,62 @@ class AgenticConversation:
67
84
 
68
85
  def get_history(self) -> List[MessageType]:
69
86
  """
70
- Returns the current conversation history.
71
-
87
+ Returns the latest 20 pairs of (user, assistant) conversation history.
88
+ Merges adjacent same-role messages into one, concatenated by newline.
89
+ Ensures that each user message is paired with the subsequent assistant response,
90
+ skips other roles, and that the last message is always assistant (drops trailing user if unpaired).
91
+
72
92
  Returns:
73
- A list of message dictionaries.
93
+ A list of message dictionaries, ordered chronologically.
74
94
  """
75
- # Return a deep copy might be safer if messages contain mutable objects,
76
- # but a shallow copy is usually sufficient for typical message structures.
77
- return self._history.copy()
95
+ paired_history = []
96
+ pair_count = 0
97
+ pending_assistant = None
98
+ pending_user = None
99
+
100
+ # Traverse history in reverse to collect latest pairs with merging
101
+ for msg in reversed(self._history):
102
+ role = msg.get("role")
103
+ if role == "assistant":
104
+ if pending_assistant is None:
105
+ pending_assistant = dict(msg)
106
+ else:
107
+ # Merge with previous assistant
108
+ prev_content = pending_assistant.get("content", "")
109
+ curr_content = msg.get("content", "")
110
+ merged_content = (curr_content.strip() + "\n" + prev_content.strip()).strip()
111
+ pending_assistant["content"] = merged_content
112
+ elif role == "user":
113
+ if pending_user is None:
114
+ pending_user = dict(msg)
115
+ else:
116
+ # Merge with previous user
117
+ prev_content = pending_user.get("content", "")
118
+ curr_content = msg.get("content", "")
119
+ merged_content = (curr_content.strip() + "\n" + prev_content.strip()).strip()
120
+ pending_user["content"] = merged_content
121
+
122
+ if pending_assistant is not None:
123
+ # Have a full pair, insert in order
124
+ paired_history.insert(0, pending_user)
125
+ paired_history.insert(1, pending_assistant)
126
+ pair_count += 1
127
+ pending_assistant = None
128
+ pending_user = None
129
+ if pair_count >= 20:
130
+ break
131
+ else:
132
+ # User without assistant yet, continue accumulating
133
+ continue
134
+ else:
135
+ # Ignore other roles
136
+ continue
137
+
138
+ # Ensure last message is assistant, drop trailing user if unpaired
139
+ if paired_history and paired_history[-1].get("role") == "user":
140
+ paired_history.pop()
141
+
142
+ return paired_history
78
143
 
79
144
  def clear_history(self):
80
145
  """Clears the conversation history."""
@@ -6,6 +6,7 @@ from autocoder.common import AutoCoderArgs
6
6
  from autocoder.common.v2.agent.agentic_edit_tools.base_tool_resolver import BaseToolResolver
7
7
  from autocoder.common.v2.agent.agentic_edit_types import ReplaceInFileTool, ToolResult # Import ToolResult from types
8
8
  from loguru import logger
9
+ from autocoder.common.auto_coder_lang import get_message_with_format
9
10
  if typing.TYPE_CHECKING:
10
11
  from autocoder.common.v2.agent.agentic_edit import AgenticEdit
11
12
 
@@ -66,7 +67,7 @@ class ReplaceInFileToolResolver(BaseToolResolver):
66
67
 
67
68
  # Security check
68
69
  if not abs_file_path.startswith(abs_project_dir):
69
- return ToolResult(success=False, message=f"Error: Access denied. Attempted to modify file outside the project directory: {file_path}")
70
+ return ToolResult(success=False, message=get_message_with_format("replace_in_file.access_denied", file_path=file_path))
70
71
 
71
72
  # Determine target path: shadow file if shadow_manager exists
72
73
  target_path = abs_file_path
@@ -90,14 +91,14 @@ class ReplaceInFileToolResolver(BaseToolResolver):
90
91
  f.write(original_content)
91
92
  logger.info(f"[Shadow] Initialized shadow file from original: {target_path}")
92
93
  else:
93
- return ToolResult(success=False, message=f"Error: File not found at path: {file_path}")
94
+ return ToolResult(success=False, message=get_message_with_format("replace_in_file.file_not_found", file_path=file_path))
94
95
  except Exception as e:
95
96
  logger.error(f"Error reading file for replace '{file_path}': {str(e)}")
96
- return ToolResult(success=False, message=f"An error occurred while reading the file for replacement: {str(e)}")
97
+ return ToolResult(success=False, message=get_message_with_format("replace_in_file.read_error", error=str(e)))
97
98
 
98
99
  parsed_blocks = self.parse_diff(diff_content)
99
100
  if not parsed_blocks:
100
- return ToolResult(success=False, message="Error: No valid SEARCH/REPLACE blocks found in the provided diff.")
101
+ return ToolResult(success=False, message=get_message_with_format("replace_in_file.no_valid_blocks"))
101
102
 
102
103
  current_content = original_content
103
104
  applied_count = 0
@@ -121,7 +122,7 @@ class ReplaceInFileToolResolver(BaseToolResolver):
121
122
  # continue applying remaining blocks
122
123
 
123
124
  if applied_count == 0 and errors:
124
- return ToolResult(success=False, message=f"Failed to apply any changes. Errors:\n" + "\n".join(errors))
125
+ return ToolResult(success=False, message=get_message_with_format("replace_in_file.apply_failed", errors="\n".join(errors)))
125
126
 
126
127
  try:
127
128
  os.makedirs(os.path.dirname(target_path), exist_ok=True)
@@ -129,9 +130,17 @@ class ReplaceInFileToolResolver(BaseToolResolver):
129
130
  f.write(current_content)
130
131
  logger.info(f"Successfully applied {applied_count}/{len(parsed_blocks)} changes to file: {file_path}")
131
132
 
132
- message = f"Successfully applied {applied_count}/{len(parsed_blocks)} changes to file: {file_path}."
133
133
  if errors:
134
- message += "\nWarnings:\n" + "\n".join(errors)
134
+ message = get_message_with_format("replace_in_file.apply_success_with_warnings",
135
+ applied=applied_count,
136
+ total=len(parsed_blocks),
137
+ file_path=file_path,
138
+ errors="\n".join(errors))
139
+ else:
140
+ message = get_message_with_format("replace_in_file.apply_success",
141
+ applied=applied_count,
142
+ total=len(parsed_blocks),
143
+ file_path=file_path)
135
144
 
136
145
  # 变更跟踪,回调AgenticEdit
137
146
  if self.agent:
@@ -141,4 +150,4 @@ class ReplaceInFileToolResolver(BaseToolResolver):
141
150
  return ToolResult(success=True, message=message, content=current_content)
142
151
  except Exception as e:
143
152
  logger.error(f"Error writing replaced content to file '{file_path}': {str(e)}")
144
- return ToolResult(success=False, message=f"An error occurred while writing the modified file: {str(e)}")
153
+ return ToolResult(success=False, message=get_message_with_format("replace_in_file.write_error", error=str(e)))
@@ -80,6 +80,11 @@ class TokenUsageEvent(BaseModel):
80
80
  """Represents the result of executing a tool."""
81
81
  usage: Any
82
82
 
83
+ class PlanModeRespondEvent(BaseModel):
84
+ """Represents the LLM attempting to complete the task."""
85
+ completion: SkipValidation[PlanModeRespondTool] # Skip validation
86
+ completion_xml: str
87
+
83
88
  class CompletionEvent(BaseModel):
84
89
  """Represents the LLM attempting to complete the task."""
85
90
  completion: SkipValidation[AttemptCompletionTool] # Skip validation
@@ -93,7 +93,7 @@ TOOL_DISPLAY_MESSAGES: Dict[Type[BaseTool], Dict[str, str]] = {
93
93
  "[dim]工具:[/dim] [blue]{{ tool_name }}[/]\n"
94
94
  "[dim]参数:[/dim] {{ arguments_snippet }}{{ ellipsis }}"
95
95
  )
96
- }
96
+ }
97
97
  # AttemptCompletionTool is handled separately in the display loop
98
98
  }
99
99
 
@@ -0,0 +1 @@
1
+ __version__ = "0.1.338"
@@ -1 +0,0 @@
1
- __version__ = "0.1.337"
File without changes
File without changes
File without changes
File without changes