fix: guard loop child node starts

This commit is contained in:
Yanli 盐粒 2026-03-10 20:33:46 +08:00
parent e6f00a2bf9
commit e76fbcb045
1 changed files with 4 additions and 1 deletions

View File

@ -408,6 +408,9 @@ export const useChat = (
},
onNodeStarted: ({ data: nodeStartedData }) => {
updateChatTreeNode(messageId, (responseItem) => {
if (params.loop_id)
return
if (!responseItem.workflowProcess)
return
if (!responseItem.workflowProcess.tracing)
@ -550,7 +553,7 @@ export const useChat = (
{},
otherOptions,
)
}, [updateChatTreeNode, handleResponding, createAudioPlayerManager, config?.suggested_questions_after_answer])
}, [updateChatTreeNode, handleResponding, createAudioPlayerManager, config?.suggested_questions_after_answer, params.loop_id])
const updateCurrentQAOnTree = useCallback(({
parentId,