Skip to content

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

Merge pull request #641 from better629/dev

geekan36a71e15be1f
diff --cc metagpt/actions/write_prd.py
index a3c91d0cb,9cefb70d8..1cb857a62
--- a/metagpt/actions/write_prd.py
+++ b/metagpt/actions/write_prd.py
@@@ -181,13 -181,18 +181,13 @@@ class WritePRD(Action)
@staticmethod
async def _rename_workspace(prd):
- if CONFIG.project_path: # Updating on the old version has already been specified if it's valid. According to
- # Section 2.2.3.10 of RFC 135
- if not CONFIG.project_name:
- CONFIG.project_name = Path(CONFIG.project_path).name
- return
-
if not CONFIG.project_name:
if isinstance(prd, (ActionOutput, ActionNode)):
- ws_name = prd.instruct_content.dict()["Project Name"]
+ ws_name = prd.instruct_content.model_dump()["Project Name"]
else:
ws_name = CodeParser.parse_str(block="Project Name", text=prd)
- CONFIG.project_name = ws_name
+ if ws_name:
+ CONFIG.project_name = ws_name
CONFIG.git_repo.rename_root(CONFIG.project_name)
async def _is_bugfix(self, context) -> bool:
diff --cc metagpt/roles/product_manager.py
index 0c74f5ec1,10b30b976..1d82ac3f2
--- a/metagpt/roles/product_manager.py
+++ b/metagpt/roles/product_manager.py
@@@ -44,9 -44,8 +44,9 @@@ class ProductManager(Role)
self._set_state(1)
else:
self._set_state(0)
+ CONFIG.git_reinit = False
self.todo_action = any_to_name(WritePRD)
- return bool(self._rc.todo)
+ return bool(self.rc.todo)
async def _observe(self, ignore_memory=False) -> int:
return await super()._observe(ignore_memory=True)