diff --git a/metagpt/ext/cr/actions/modify_code.py b/metagpt/ext/cr/actions/modify_code.py index 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.py index 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, PatchSet from 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: