Skip to content

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

Fix Connecting other operators after the `message` operator is prohibited. (#20076)

balibabudaaeb1ed57c5
diff --git a/web/src/pages/agent/canvas/node/message-node.tsx b/web/src/pages/agent/canvas/node/message-node.tsx
index 3e9c59dc6d..d0dc4544f7 100644
--- a/web/src/pages/agent/canvas/node/message-node.tsx
+++ b/web/src/pages/agent/canvas/node/message-node.tsx
@@ -2,11 +2,10 @@ import { NodeCollapsible } from '@/components/collapse';
import { IMessageNode } from '@/interfaces/database/agent';
import { cn } from '@/lib/utils';
import { useGetVariableLabelOrTypeByValue } from '@/pages/agent/hooks/use-get-begin-query';
-import { Handle, NodeProps, Position } from '@xyflow/react';
+import { NodeProps } from '@xyflow/react';
import classNames from 'classnames';
import { get } from 'lodash';
import { memo } from 'react';
-import { NodeHandleId } from '../../constant';
import { LabelCard } from './card';
import { LeftEndHandle } from './handle';
import styles from './index.module.less';
@@ -15,30 +14,14 @@ import { NodeWrapper } from './node-wrapper';
import { ToolBar } from './toolbar';
import { VariableDisplay } from './variable-display';
-function InnerMessageNode({
- id,
- data,
- selected,
- isConnectable = true,
-}: NodeProps<IMessageNode>) {
+function InnerMessageNode({ id, data, selected }: NodeProps<IMessageNode>) {
const messages: string[] = get(data, 'form.content', []);
const { getLabel } = useGetVariableLabelOrTypeByValue({ nodeId: id });
return (
<ToolBar selected={selected} id={id} label={data.label}>
<NodeWrapper selected={selected} id={id}>
<LeftEndHandle></LeftEndHandle>
- {/* v1 Message/Answer nodes are routable: they have a downstream
- too, so they need a source handle on the right with the
- "start" id that edges' sourceHandle field references. The
- original component only rendered a target handle, which
- silently dropped any edge with this node as the source. */}
- <Handle
- type="source"
- id={NodeHandleId.Start}
- position={Position.Right}
- isConnectable={isConnectable}
- className="!bg-accent-primary !size-2"
- />
+
<NodeHeader
id={id}
name={data.name}