fix: skip the respond stage on an empty message chain (#9653)

* fix: skip the respond stage on an empty message chain

* Delete tests/test_respond_stage.py

---------

Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com>
This commit is contained in:
時壹
2026-09-01 11:23:11 +08:00
committed by GitHub
co-authored by Soulter
parent bff37193ad
commit 385e4b6bfb
+6
View File
@@ -179,6 +179,12 @@ class RespondStage(Stage):
if result.result_content_type == ResultContentType.STREAMING_FINISH:
event.set_extra("_streaming_finished", True)
return
if (
not result.chain
and result.result_content_type != ResultContentType.STREAMING_RESULT
):
# 空消息链没有任何可发内容,直接返回,不打日志、也不触发 after_message_sent
return
sent_plain_texts = event.get_extra(
"_send_message_to_user_current_session_plain_texts",
[],