mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
fix delopy path
This commit is contained in:
parent
21ddacd433
commit
c280fcd885
2 changed files with 8 additions and 2 deletions
|
|
@ -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:
|
||||
return
|
||||
|
||||
self.rag_engine.add_objs([item])
|
||||
|
|
|
|||
|
|
@ -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"]]):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue