format code
This commit is contained in:
parent
d9418c1668
commit
229d6706a4
@ -130,10 +130,6 @@ We welcome any friendly suggestions and helpful contributions! Just create issue
|
|||||||
|
|
||||||
Or contact @mannaandpoem via 📧email: mannaandpoem@gmail.com
|
Or contact @mannaandpoem via 📧email: mannaandpoem@gmail.com
|
||||||
|
|
||||||
## Roadmap
|
|
||||||
|
|
||||||
- [ ] Improve the UI’s visual appeal to create a more intuitive and seamless user experience.
|
|
||||||
|
|
||||||
## Community Group
|
## Community Group
|
||||||
Join our networking group on Feishu and share your experience with other developers!
|
Join our networking group on Feishu and share your experience with other developers!
|
||||||
|
|
||||||
@ -162,4 +158,4 @@ OpenManus is built by contributors from MetaGPT. Huge thanks to this agent commu
|
|||||||
journal = {GitHub repository},
|
journal = {GitHub repository},
|
||||||
howpublished = {\url{https://github.com/mannaandpoem/OpenManus}},
|
howpublished = {\url{https://github.com/mannaandpoem/OpenManus}},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -130,10 +130,6 @@ python run_flow.py
|
|||||||
|
|
||||||
或通过 📧 邮件联系 @mannaandpoem:mannaandpoem@gmail.com
|
或通过 📧 邮件联系 @mannaandpoem:mannaandpoem@gmail.com
|
||||||
|
|
||||||
## 发展路线
|
|
||||||
|
|
||||||
- [ ] 提高用户界面的视觉吸引力,以创建更直观和无缝的用户体验。
|
|
||||||
|
|
||||||
## 交流群
|
## 交流群
|
||||||
|
|
||||||
加入我们的飞书交流群,与其他开发者分享经验!
|
加入我们的飞书交流群,与其他开发者分享经验!
|
||||||
|
2
app.py
2
app.py
@ -244,4 +244,4 @@ async def generic_exception_handler(request: Request, exc: Exception):
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import uvicorn
|
import uvicorn
|
||||||
|
|
||||||
uvicorn.run(app, host="localhost", port=5172)
|
uvicorn.run(app, host="localhost", port=5172)
|
||||||
|
@ -61,23 +61,25 @@ class BaseFlow(BaseModel, ABC):
|
|||||||
async def execute(self, input_text: str) -> str:
|
async def execute(self, input_text: str) -> str:
|
||||||
"""Execute the flow with given input"""
|
"""Execute the flow with given input"""
|
||||||
|
|
||||||
|
|
||||||
class PlanStepStatus(str, Enum):
|
class PlanStepStatus(str, Enum):
|
||||||
"""Enum class defining possible statuses of a plan step"""
|
"""Enum class defining possible statuses of a plan step"""
|
||||||
|
|
||||||
NOT_STARTED = "not_started"
|
NOT_STARTED = "not_started"
|
||||||
IN_PROGRESS = "in_progress"
|
IN_PROGRESS = "in_progress"
|
||||||
COMPLETED = "completed"
|
COMPLETED = "completed"
|
||||||
BLOCKED = "blocked"
|
BLOCKED = "blocked"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_all_statuses(cls) -> list[str]:
|
def get_all_statuses(cls) -> list[str]:
|
||||||
"""Return a list of all possible step status values"""
|
"""Return a list of all possible step status values"""
|
||||||
return [status.value for status in cls]
|
return [status.value for status in cls]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_active_statuses(cls) -> list[str]:
|
def get_active_statuses(cls) -> list[str]:
|
||||||
"""Return a list of values representing active statuses (not started or in progress)"""
|
"""Return a list of values representing active statuses (not started or in progress)"""
|
||||||
return [cls.NOT_STARTED.value, cls.IN_PROGRESS.value]
|
return [cls.NOT_STARTED.value, cls.IN_PROGRESS.value]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_status_marks(cls) -> Dict[str, str]:
|
def get_status_marks(cls) -> Dict[str, str]:
|
||||||
"""Return a mapping of statuses to their marker symbols"""
|
"""Return a mapping of statuses to their marker symbols"""
|
||||||
@ -85,5 +87,5 @@ class PlanStepStatus(str, Enum):
|
|||||||
cls.COMPLETED.value: "[✓]",
|
cls.COMPLETED.value: "[✓]",
|
||||||
cls.IN_PROGRESS.value: "[→]",
|
cls.IN_PROGRESS.value: "[→]",
|
||||||
cls.BLOCKED.value: "[!]",
|
cls.BLOCKED.value: "[!]",
|
||||||
cls.NOT_STARTED.value: "[ ]"
|
cls.NOT_STARTED.value: "[ ]",
|
||||||
}
|
}
|
||||||
|
@ -337,13 +337,15 @@ class PlanningFlow(BaseFlow):
|
|||||||
plan_text += "Steps:\n"
|
plan_text += "Steps:\n"
|
||||||
|
|
||||||
status_marks = PlanStepStatus.get_status_marks()
|
status_marks = PlanStepStatus.get_status_marks()
|
||||||
|
|
||||||
for i, (step, status, notes) in enumerate(
|
for i, (step, status, notes) in enumerate(
|
||||||
zip(steps, step_statuses, step_notes)
|
zip(steps, step_statuses, step_notes)
|
||||||
):
|
):
|
||||||
# Use status marks to indicate step status
|
# Use status marks to indicate step status
|
||||||
status_mark = status_marks.get(status, status_marks[PlanStepStatus.NOT_STARTED.value])
|
status_mark = status_marks.get(
|
||||||
|
status, status_marks[PlanStepStatus.NOT_STARTED.value]
|
||||||
|
)
|
||||||
|
|
||||||
plan_text += f"{i}. {status_mark} {step}\n"
|
plan_text += f"{i}. {status_mark} {step}\n"
|
||||||
if notes:
|
if notes:
|
||||||
plan_text += f" Notes: {notes}\n"
|
plan_text += f" Notes: {notes}\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user