Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Dragging down a downstream node of a Switch operator will cause the end_cpn_ids to contain the ID of the placeholder operator. #12177 (#12178)

balibabu556b5ad6861a
diff --git a/web/src/pages/agent/store.ts b/web/src/pages/agent/store.ts
index 98b4b9da21..67f64a8c58 100644
--- a/web/src/pages/agent/store.ts
+++ b/web/src/pages/agent/store.ts
@@ -466,7 +466,7 @@ const useGraphStore = create<RFState>()(
}
},
updateSwitchFormData: (source, sourceHandle, target, isConnecting) => {
- const { updateNodeForm, edges } = get();
+ const { updateNodeForm, edges, getOperatorTypeFromId } = get();
if (sourceHandle) {
// A handle will connect to multiple downstream nodes
let currentHandleTargets = edges
@@ -474,7 +474,8 @@ const useGraphStore = create<RFState>()(
(x) =>
x.source === source &&
x.sourceHandle === sourceHandle &&
- typeof x.target === 'string',
+ typeof x.target === 'string' &&
+ getOperatorTypeFromId(x.target) !== Operator.Placeholder,
)
.map((x) => x.target);