import { Handle, Position } from "@xyflow/react"; import { Button, Card } from "antd"; import { Settings, Database, Trash2, Copy, ChevronDown, MessageSquare, Brain, Cpu, } from "lucide-react"; import { useState } from "react"; const CustomNode = ({ data, selected }: { data: any; selected: boolean }) => { const [isHovered, setIsHovered] = useState(false); const getNodeIcon = (type: string) => { switch (type) { case "knowledge-search": return ; case "ai-dialogue": return ; case "data-processing": return ; default: return ; } }; return (
setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} > {/* Left side handles - inputs */} {/* Right side handles - outputs */}
{getNodeIcon(data.type)}
{data.name}
{data.description}
{/* Input Section */}
输入
AI 模型
手动选择
{/* Parameters Table */}
搜索参数设置
查询方式
可用上限
查询参数
检索数量
问题优化
含义文档
5000
0.4
Qwen-max
{/* Output Section */}
输出
知识库内容 知识库搜索
); }; export default CustomNode;