🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fix delopy path
黄伟韬c280fcd885cd
diff --git a/metagpt/memory/role_zero_memory.py b/metagpt/memory/role_zero_memory.pyindex 6e59af3ec..5c7fb94a2 100644--- a/metagpt/memory/role_zero_memory.py+++ b/metagpt/memory/role_zero_memory.py@@ -129,7 +129,7 @@ class RoleZeroLongTermMemory(Memory):If adding long-term memory fails, it will only log the error without interrupting program execution."""- if not item or not item.message.content:+ if not item:returnself.rag_engine.add_objs([item])diff --git a/metagpt/roles/di/engineer2.py b/metagpt/roles/di/engineer2.pyindex 6776fdf3a..d218dd666 100644--- a/metagpt/roles/di/engineer2.py+++ b/metagpt/roles/di/engineer2.py@@ -88,7 +88,7 @@ class Engineer2(RoleZero):"Terminal.run_command": self._eval_terminal_run,"RoleZero.ask_human": self._end,"RoleZero.reply_to_human": self._end,- "Deployer.deploy_to_public": self.deployer.deploy_to_public,+ "Deployer.deploy_to_public": self.deploy_to_public,})else:@@ -140,6 +140,12 @@ class Engineer2(RoleZero):# TODO: Consider adding line no to be ready for editing.return f"The file {path} has been successfully created, with content:\n{code}"+ def deploy_to_public(self, dist_dir):+ """fix the path to absolute path"""+ # fix the path according to the editor's working directory+ dist_dir = self.editor._try_fix_path(dist_dir)+ return self.deployer.deploy_to_public(dist_dir)+async def _eval_terminal_run(self, cmd):"""change command pull/push/commit to end."""if any([cmd_key_word in cmd for cmd_key_word in ["pull", "push", "commit"]]):