🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
feat: merge geekan:dev
莘权 马ad639b99065f
diff --cc metagpt/roles/engineer.pyindex 994c176e9,d2deca114..76c3d96b3--- a/metagpt/roles/engineer.py+++ b/metagpt/roles/engineer.py@@@ -311,4 -311,4 +311,4 @@@ class Engineer(Role)@propertydef todo(self) -> str:"""AgentStore uses this attribute to display to the user what actions the current role should take."""- return self.todo_desc- return self._next_todo++ return self.next_todo_actiondiff --cc metagpt/roles/product_manager.pyindex 847649a82,460f29e05..5412dc2b5--- a/metagpt/roles/product_manager.py+++ b/metagpt/roles/product_manager.py@@@ -37,20 -37,16 +36,21 @@@ class ProductManager(Role)self._init_actions([PrepareDocuments, WritePRD])self._watch([UserRequirement, PrepareDocuments])+ self.todo_action = any_to_name(PrepareDocuments)- async def _think(self) -> None:+ async def _think(self) -> bool:"""Decide what to do"""if CONFIG.git_repo:self._set_state(1)else:self._set_state(0)- self.todo_desc = any_to_name(WritePRD)+ self.todo_action = any_to_name(WritePRD)- return self._rc.todo+ return bool(self._rc.todo)async def _observe(self, ignore_memory=False) -> int:- return await super(ProductManager, self)._observe(ignore_memory=True)+ return await super()._observe(ignore_memory=True)++ @property+ def todo(self) -> str:+ """AgentStore uses this attribute to display to the user what actions the current role should take."""- return self.todo_desc++ return self.todo_action