Skip to content

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

fix redundant new line

garylin20994d05bba39ca2
diff --git a/metagpt/tools/libs/editor.py b/metagpt/tools/libs/editor.py
index fcf892fdb..94836a9fe 100644
--- a/metagpt/tools/libs/editor.py
+++ b/metagpt/tools/libs/editor.py
@@ -165,7 +165,7 @@ class Editor:
# irrespective of the length difference between the original and new content.
lines[start_line_index:end_line_index] = new_content_lines
else:
- lines.insert(start_line_index, "\n".join(new_content_lines))
+ lines.insert(start_line_index, "".join(new_content_lines))
else:
del lines[start_line_index:end_line_index]