🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -43,12 +43,11 @@ def init_prompt():
|
||||
|
||||
class CurrentState:
|
||||
def __init__(self):
|
||||
|
||||
self.current_state_info = ""
|
||||
|
||||
self.mood_manager = MoodManager()
|
||||
self.mood = self.mood_manager.get_prompt()
|
||||
|
||||
|
||||
self.attendance_factor = 0
|
||||
self.engagement_factor = 0
|
||||
|
||||
@@ -66,9 +65,6 @@ class Heartflow:
|
||||
)
|
||||
|
||||
self._subheartflows: Dict[Any, SubHeartflow] = {}
|
||||
|
||||
|
||||
|
||||
|
||||
async def _cleanup_inactive_subheartflows(self):
|
||||
"""定期清理不活跃的子心流"""
|
||||
@@ -90,7 +86,7 @@ class Heartflow:
|
||||
logger.info(f"已清理不活跃的子心流: {subheartflow_id}")
|
||||
|
||||
await asyncio.sleep(30) # 每分钟检查一次
|
||||
|
||||
|
||||
async def _sub_heartflow_update(self):
|
||||
while True:
|
||||
# 检查是否存在子心流
|
||||
@@ -103,13 +99,12 @@ class Heartflow:
|
||||
await asyncio.sleep(global_config.heart_flow_update_interval) # 5分钟思考一次
|
||||
|
||||
async def heartflow_start_working(self):
|
||||
|
||||
# 启动清理任务
|
||||
asyncio.create_task(self._cleanup_inactive_subheartflows())
|
||||
|
||||
# 启动子心流更新任务
|
||||
asyncio.create_task(self._sub_heartflow_update())
|
||||
|
||||
|
||||
async def _update_current_state(self):
|
||||
print("TODO")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user