mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-07 07:41:28 +08:00
fix(agent): 流式+啰嗦模式下渠道不支持编辑时立即发送工具消息
渠道不支持编辑时没有定时刷新任务,emit 到 buffer 的内容不会被推送。 新增 can_edit_message 属性区分两种模式:支持编辑的继续 emit 到 buffer, 不支持编辑的 take 出 agent 文字与工具消息合并独立发送。
This commit is contained in:
@@ -347,6 +347,13 @@ class StreamingHandler:
|
||||
"""
|
||||
return self._streaming_enabled
|
||||
|
||||
@property
|
||||
def can_edit_message(self) -> bool:
|
||||
"""
|
||||
是否支持消息编辑(实时推送),即定时刷新任务正在运行
|
||||
"""
|
||||
return self._flush_task is not None
|
||||
|
||||
@property
|
||||
def has_sent_message(self) -> bool:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user