diff options
| author | blackhao <13851610112@163.com> | 2025-12-10 21:54:08 -0600 |
|---|---|---|
| committer | blackhao <13851610112@163.com> | 2025-12-10 21:54:08 -0600 |
| commit | 0c76ea3db76c9908e770b56fb94bf0a92a0d116f (patch) | |
| tree | af0c4345c538def0a506d84876074a2f48058aec /frontend/src/components/nodes/LLMNode.tsx | |
| parent | b51af40db8ae73216789472903298589bb54df2b (diff) | |
fix: resolve all TypeScript errors for production build
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})`; |
