Skip to content

Commit 5b7686d

Browse files
Nov1c444jsincorporated
authored andcommitted
fix: agent moderation not working (langgenius#20673)
1 parent c9d947c commit 5b7686d

File tree

1 file changed

+1
-1
lines changed
  • web/app/components/base/chat/chat

1 file changed

+1
-1
lines changed

web/app/components/base/chat/chat/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export const useChat = (
366366
if (!newResponseItem)
367367
return
368368

369-
const isUseAgentThought = newResponseItem.agent_thoughts?.length > 0
369+
const isUseAgentThought = newResponseItem.agent_thoughts?.length > 0 && newResponseItem.agent_thoughts[newResponseItem.agent_thoughts?.length - 1].thought === newResponseItem.answer
370370
updateChatTreeNode(responseItem.id, {
371371
content: isUseAgentThought ? '' : newResponseItem.answer,
372372
log: [

0 commit comments

Comments
 (0)