feat(chat): 添加Chatter处理状态跟踪机制

在StreamLoopManager中添加is_chatter_processing标志来精确跟踪Chatter处理状态,优化消息打断检查逻辑。

- 在distribution_manager中设置和清除Chatter处理标志
- 在message_manager中基于处理状态进行打断检查
- 在数据模型中添加is_chatter_processing字段
This commit is contained in:
Windpicker-owo
2025-10-27 22:37:55 +08:00
parent 09de649d48
commit 79a0088065
3 changed files with 17 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ class StreamContext(BaseDataModel):
is_active: bool = True
processing_task: asyncio.Task | None = None
stream_loop_task: asyncio.Task | None = None # 流循环任务
is_chatter_processing: bool = False # Chatter 是否正在处理
interruption_count: int = 0 # 打断计数器
last_interruption_time: float = 0.0 # 上次打断时间