🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
add 'py' suffix to rm_patch_useless_part
shenchuchengdda10a6925c8
diff --git a/metagpt/ext/cr/actions/modify_code.py b/metagpt/ext/cr/actions/modify_code.pyindex ad68710a7..33a368463 100644--- a/metagpt/ext/cr/actions/modify_code.py+++ b/metagpt/ext/cr/actions/modify_code.py@@ -71,8 +71,6 @@ class ModifyCode(Action):)# 代码增加上下文,提升代码修复的准确率comment["code"] = code- if comment["point_id"] in [24, 25, 26]:- comment["point_detail"] = comment["point_detail"] + "\n" + comment["comment"]# 去掉CR时LLM给的comment的影响,应该使用既定的修复方案comment.pop("comment")diff --git a/metagpt/ext/cr/utils/cleaner.py b/metagpt/ext/cr/utils/cleaner.pyindex b16ac8119..3215737c1 100644--- a/metagpt/ext/cr/utils/cleaner.py+++ b/metagpt/ext/cr/utils/cleaner.py@@ -5,7 +5,7 @@ from unidiff import Hunk, PatchedFile, PatchSetfrom metagpt.logs import logger-def rm_patch_useless_part(patch: PatchSet, used_suffix: list[str] = ["java"]) -> PatchSet:+def rm_patch_useless_part(patch: PatchSet, used_suffix: list[str] = ["java", "py"]) -> PatchSet:new_patch = PatchSet("")useless_files = []for pfile in patch: