Skip to content

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

fix typo

黄伟韬5cda228f5b77
diff --git a/metagpt/roles/di/role_zero.py b/metagpt/roles/di/role_zero.py
index 9fca8f468..b8aedcdd6 100644
--- a/metagpt/roles/di/role_zero.py
+++ b/metagpt/roles/di/role_zero.py
@@ -568,7 +568,9 @@ class RoleZero(Role):
"""This fucntion will call ask_human and then analyze and decorate the human response."""
human_response = await self.ask_human(question)
if "<STOP>" in human_response:
- human_response += f"\nUser ask you to stop the current task immediately.\nIn your next response, use end command to stop the current task.\nLike:\n{END_COMMAND}"
+ human_response += "\nCommand end executed:"
+ human_response += await self._end()
+ return human_response
return human_response
async def reply_to_human(self, content: str) -> str:
diff --git a/metagpt/tools/libs/editor.py b/metagpt/tools/libs/editor.py
index ca8cd9ccf..5391ff48a 100644
--- a/metagpt/tools/libs/editor.py
+++ b/metagpt/tools/libs/editor.py
@@ -773,8 +773,8 @@ class Editor(BaseModel):
lines = content.splitlines(True)
total_lines = len(lines)
check_list = [
- ("first_replaced", first_replaced_line_number, first_replaced_line_content),
- ("last_replaced", last_replaced_line_number, last_replaced_line_content),
+ ("first", first_replaced_line_number, first_replaced_line_content),
+ ("last", last_replaced_line_number, last_replaced_line_content),
]
for position, line_number, line_content in check_list:
if lines[line_number - 1].rstrip() != line_content: