mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
feat: add mention node executor
This commit is contained in:
@ -37,7 +37,10 @@ export const useWorkflowNodeFinished = () => {
|
||||
}))
|
||||
|
||||
const newNodes = produce(nodes, (draft) => {
|
||||
const currentNode = draft.find(node => node.id === data.node_id)!
|
||||
const currentNode = draft.find(node => node.id === data.node_id)
|
||||
// Skip if node not found (e.g., virtual extraction nodes)
|
||||
if (!currentNode)
|
||||
return
|
||||
currentNode.data._runningStatus = data.status
|
||||
if (data.status === NodeRunningStatus.Exception) {
|
||||
if (data.execution_metadata?.error_strategy === ErrorHandleTypeEnum.failBranch)
|
||||
|
||||
@ -45,6 +45,11 @@ export const useWorkflowNodeStarted = () => {
|
||||
} = reactflow
|
||||
const currentNodeIndex = nodes.findIndex(node => node.id === data.node_id)
|
||||
const currentNode = nodes[currentNodeIndex]
|
||||
|
||||
// Skip if node not found (e.g., virtual extraction nodes)
|
||||
if (!currentNode)
|
||||
return
|
||||
|
||||
const position = currentNode.position
|
||||
const zoom = transform[2]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user