diff --git a/web/app/components/base/chat/chat/hooks.ts b/web/app/components/base/chat/chat/hooks.ts index fde4674539..28f297b90e 100644 --- a/web/app/components/base/chat/chat/hooks.ts +++ b/web/app/components/base/chat/chat/hooks.ts @@ -366,8 +366,9 @@ export const useChat = ( if (!newResponseItem) return + const isUseAgentThought = newResponseItem.agent_thoughts?.length > 0 updateChatTreeNode(responseItem.id, { - content: newResponseItem.answer, + content: isUseAgentThought ? '' : newResponseItem.answer, log: [ ...newResponseItem.message, ...(newResponseItem.message[newResponseItem.message.length - 1].role !== 'assistant'