diff --git a/web/src/pages/agent/canvas/node/agent-node.tsx b/web/src/pages/agent/canvas/node/agent-node.tsx index d5d5d5689f..66f316f0c1 100644 --- a/web/src/pages/agent/canvas/node/agent-node.tsx +++ b/web/src/pages/agent/canvas/node/agent-node.tsx @@ -1,5 +1,4 @@ import { BaseNode } from '@/interfaces/database/agent'; -import { cn } from '@/lib/utils'; import { Handle, NodeProps, Position } from '@xyflow/react'; import { get } from 'lodash'; import { memo, useMemo } from 'react'; @@ -9,7 +8,7 @@ import { AgentFormSchemaType } from '../../form/agent-form'; import useGraphStore from '../../store'; import { hasSubAgent, isBottomSubAgent } from '../../utils'; import { LLMLabelCard } from './card'; -import { CommonHandle, LeftEndHandle } from './handle'; +import { BottomHandle, CommonHandle, LeftEndHandle } from './handle'; import { RightHandleStyle } from './handle-icon'; import NodeHeader from './node-header'; import { NodeWrapper } from './node-wrapper'; @@ -68,26 +67,12 @@ function InnerAgentNode({ className="!bg-accent-primary !size-2" > )} - - + left={180} + visible={hasSubAgent(edges, id)} + /> +
diff --git a/web/src/pages/agent/canvas/node/handle.tsx b/web/src/pages/agent/canvas/node/handle.tsx index d26d31e11c..717fb3fa1c 100644 --- a/web/src/pages/agent/canvas/node/handle.tsx +++ b/web/src/pages/agent/canvas/node/handle.tsx @@ -1,7 +1,7 @@ import { useSetModalState } from '@/hooks/common-hooks'; import { cn } from '@/lib/utils'; import { Handle, HandleProps, Position } from '@xyflow/react'; -import { Plus } from 'lucide-react'; +import { Plus, ChevronDown } from 'lucide-react'; import { useMemo } from 'react'; import { NodeHandleId } from '../../constant'; import { HandleContext } from '../../context'; @@ -100,3 +100,29 @@ export function LeftEndHandle({ > ); } + +export function BottomHandle({ + id, + left, + visible, +}: { + id: NodeHandleId; + left: number; + visible: boolean; +}) { + return ( + + + + ); +} diff --git a/web/src/pages/agent/canvas/node/tool-node.tsx b/web/src/pages/agent/canvas/node/tool-node.tsx index d91efb9428..81b4ab0c90 100644 --- a/web/src/pages/agent/canvas/node/tool-node.tsx +++ b/web/src/pages/agent/canvas/node/tool-node.tsx @@ -39,17 +39,7 @@ function InnerToolNode({ type="target" position={Position.Top} isConnectable={isConnectable} - className="!bg-accent-primary !size-2" - /> - {/* v1 ExeSQL and similar "tool" components route their result - downstream, so they need a source handle too. Without this, - any edge where the toolNode is the source silently fails to - render. */} -