diff options
Diffstat (limited to 'frontend/src/components/nodes/LLMNode.tsx')
| -rw-r--r-- | frontend/src/components/nodes/LLMNode.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend/src/components/nodes/LLMNode.tsx b/frontend/src/components/nodes/LLMNode.tsx index d2e1293..8cbf0e9 100644 --- a/frontend/src/components/nodes/LLMNode.tsx +++ b/frontend/src/components/nodes/LLMNode.tsx @@ -1,11 +1,11 @@ import { useEffect, useState } from 'react'; import { Handle, Position, type NodeProps, useUpdateNodeInternals, useEdges } from 'reactflow'; -import type { NodeData, MergedTrace } from '../../store/flowStore'; +import type { NodeData, MergedTrace, Trace } from '../../store/flowStore'; import { Loader2, MessageSquare } from 'lucide-react'; import useFlowStore from '../../store/flowStore'; const LLMNode = ({ id, data, selected }: NodeProps<NodeData>) => { - const { theme, nodes } = useFlowStore(); + const { theme } = useFlowStore(); const [showPreview, setShowPreview] = useState(false); const updateNodeInternals = useUpdateNodeInternals(); const edges = useEdges(); @@ -241,7 +241,7 @@ const LLMNode = ({ id, data, selected }: NodeProps<NodeData>) => { let backgroundStyle = trace.color; if (trace.isMerged && trace.mergedColors && trace.mergedColors.length > 0) { const colors = trace.mergedColors; - const gradientStops = colors.map((color, idx) => + const gradientStops = colors.map((color: string, idx: number) => `${color} ${(idx / colors.length) * 100}%, ${color} ${((idx + 1) / colors.length) * 100}%` ).join(', '); backgroundStyle = `linear-gradient(45deg, ${gradientStops})`; |
