feat:优化了auto切换聊天模式机制,修改取名prompt,不再处理temp

This commit is contained in:
SengokuCola
2025-05-27 21:45:03 +08:00
parent 7e59382603
commit 369de9d137
14 changed files with 237 additions and 70 deletions

View File

@@ -107,12 +107,12 @@ class BackgroundTaskManager:
f"私聊激活检查任务已启动 间隔:{PRIVATE_CHAT_ACTIVATION_CHECK_INTERVAL_SECONDS}s",
"_private_chat_activation_task",
),
(
self._run_into_focus_cycle,
"debug", # 设为debug避免过多日志
f"专注评估任务已启动 间隔:{INTEREST_EVAL_INTERVAL_SECONDS}s",
"_into_focus_task",
)
# (
# self._run_into_focus_cycle,
# "debug", # 设为debug避免过多日志
# f"专注评估任务已启动 间隔:{INTEREST_EVAL_INTERVAL_SECONDS}s",
# "_into_focus_task",
# )
])
else:
logger.info("聊天模式为 normal跳过启动清理任务、私聊激活任务和专注评估任务")
@@ -215,10 +215,10 @@ class BackgroundTaskManager:
logger.info(f"[清理任务] 清理完成, 共停止 {stopped_count}/{len(flows_to_stop)} 个子心流")
# --- 新增兴趣评估工作函数 ---
async def _perform_into_focus_work(self):
"""执行一轮子心流兴趣评估与提升检查。"""
# 直接调用 subheartflow_manager 的方法,并传递当前状态信息
await self.subheartflow_manager.sbhf_normal_into_focus()
# async def _perform_into_focus_work(self):
# """执行一轮子心流兴趣评估与提升检查。"""
# # 直接调用 subheartflow_manager 的方法,并传递当前状态信息
# await self.subheartflow_manager.sbhf_normal_into_focus()
async def _run_state_update_cycle(self, interval: int):
await _run_periodic_loop(task_name="State Update", interval=interval, task_func=self._perform_state_update_work)
@@ -229,12 +229,12 @@ class BackgroundTaskManager:
)
# --- 新增兴趣评估任务运行器 ---
async def _run_into_focus_cycle(self):
await _run_periodic_loop(
task_name="Into Focus",
interval=INTEREST_EVAL_INTERVAL_SECONDS,
task_func=self._perform_into_focus_work,
)
# async def _run_into_focus_cycle(self):
# await _run_periodic_loop(
# task_name="Into Focus",
# interval=INTEREST_EVAL_INTERVAL_SECONDS,
# task_func=self._perform_into_focus_work,
# )
# 新增私聊激活任务运行器
async def _run_private_chat_activation_cycle(self, interval: int):