import { NodeCollapsible } from '@/components/collapse'; import { BaseNode } from '@/interfaces/database/agent'; import { NodeProps } from '@xyflow/react'; import { RagNode } from '.'; import { VariableAggregatorFormSchemaType } from '../../form/variable-aggregator-form/schema'; import { useGetVariableLabelOrTypeByValue } from '../../hooks/use-get-begin-query'; import { LabelCard } from './card'; export function VariableAggregatorNode({ ...props }: NodeProps>) { const { data } = props; const { getLabel } = useGetVariableLabelOrTypeByValue(); return ( {(x, idx) => (
{x.group_name} {x.type}
{x.variables?.map((y, index) => ( {getLabel(y.value)} ))}
)}
); }