重构ChatStream和StreamContext:移除context_manager引用
- 在ChatStream及相关类中,将所有context_manager的实例替换为直接上下文访问。 - 更新方法,利用新的上下文结构来管理聊天状态和消息。 - 增强的StreamContext,增加了用于消息处理、统计和历史管理的方法。 - 在重构过程中改进了错误处理和日志记录。
This commit is contained in:
@@ -139,7 +139,7 @@ class ActionModifier:
|
||||
if not self.chat_stream:
|
||||
logger.error(f"{self.log_prefix} chat_stream 未初始化,无法执行第二阶段")
|
||||
return
|
||||
chat_context = self.chat_stream.context_manager.context
|
||||
chat_context = self.chat_stream.context
|
||||
current_actions_s2 = self.action_manager.get_using_actions()
|
||||
type_mismatched_actions = self._check_action_associated_types(current_actions_s2, chat_context)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user