mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
add 'py' suffix to rm_patch_useless_part
This commit is contained in:
parent
68d5e945f6
commit
dda10a6925
2 changed files with 1 additions and 3 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue