Skip to content

Commit

Permalink
fixbug: fix todo_description
Browse files Browse the repository at this point in the history
  • Loading branch information
莘权 马 committed Jan 10, 2024
1 parent 12ac57a commit 0788080
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion metagpt/roles/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,13 @@ async def act(self) -> ActionOutput:

@property
def todo(self) -> str:
"""AgentStore uses this attribute to display to the user what actions the current role should take."""
"""
AgentStore uses this attribute to display to the user what actions the current role should take.
"""
if self.rc.todo:
if self.rc.todo.desc:
return self.rc.todo.desc
return any_to_name(self.rc.todo)
if self.actions:
return any_to_name(self.actions[0])
return ""

0 comments on commit 0788080

Please sign in to comment.