feat(context_manager): 添加消息处理日志,优化消息标记为已读的逻辑

This commit is contained in:
Windpicker-owo
2025-11-10 19:18:30 +08:00
parent aab3f19f10
commit 69ee2d30de
4 changed files with 55 additions and 19 deletions

View File

@@ -362,6 +362,9 @@ class ChatterPlanFilter:
return "最近没有聊天内容。", "没有未读消息。", []
stream_context = chat_stream.context_manager
# 🔥 确保历史消息已从数据库加载
await stream_context.ensure_history_initialized()
# 获取真正的已读和未读消息
read_messages = stream_context.context.history_messages # 已读消息存储在history_messages中