Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

update: cr读取patch文件指定编码

zhangleid727939492cf
diff --git a/metagpt/tools/libs/cr.py b/metagpt/tools/libs/cr.py
index ea6acf654..5fca23a66 100644
--- a/metagpt/tools/libs/cr.py
+++ b/metagpt/tools/libs/cr.py
@@ -85,7 +85,7 @@ class CodeReview:
if pre:
patch_file_content = pre.text
else:
- async with aiofiles.open(patch_path) as f:
+ async with aiofiles.open(patch_path, encoding="utf-8") as f:
patch_file_content = await f.read()
await EditorReporter().async_report(patch_path)