fix(distribution-manager): 使用全局配置中的超时设置增强消息处理

refactor(affinity-chatter): 移除不必要的全局配置导入
This commit is contained in:
Windpicker-owo
2025-11-09 11:28:28 +08:00
parent 4d32f1418c
commit ac09046427
2 changed files with 2 additions and 3 deletions

View File

@@ -222,7 +222,7 @@ class StreamLoopManager:
logger.debug(f"更新流能量失败 {stream_id}: {e}")
# 4. 激活chatter处理
success = await self._process_stream_messages(stream_id, context)
success = await asyncio.wait_for(self._process_stream_messages(stream_id, context), global_config.chat.thinking_timeout)
# 更新统计
self.stats["total_process_cycles"] += 1

View File

@@ -16,7 +16,6 @@ from src.common.logger import get_logger
from src.plugin_system.base.base_chatter import BaseChatter
from src.plugin_system.base.component_types import ChatType
from src.plugins.built_in.affinity_flow_chatter.planner.planner import ChatterActionPlanner
from src.config.config import global_config
logger = get_logger("affinity_chatter")
@@ -74,7 +73,7 @@ class AffinityChatter(BaseChatter):
unread_messages = context.get_unread_messages()
# 使用增强版规划器处理消息
actions, target_message = await asyncio.wait_for(self.planner.plan(context=context), global_config.chat.thinking_timeout)
actions, target_message = await self.planner.plan(context=context)
self.stats["plans_created"] += 1
# 执行动作(如果规划器返回了动作)