fix: 答案不再包括思考过程;思考气泡和消息气泡不同时显示

This commit is contained in:
sophie committed 2026-04-17 10:58:09 +08:00
1 parent b0fda9f081
commit 9313ff769d
9 files changed
+74 -34

No files matched your search

+3 -1
View File
@@ -129,7 +129,9 @@ class DifyService:
DifyService._collect_metadata(retriever_resources, attribution_parts, data)
elif event in ('message_end', 'agent_message', 'workflow_finished'):
if data.get('answer'):
# Keep metadata from non-message events, but avoid appending
# intermediate workflow/agent outputs into final user answer.
if event == 'message_end' and data.get('answer'):
full_answer.append(data.get('answer', ''))
DifyService._collect_metadata(retriever_resources, attribution_parts, data)