From 0c76ea3db76c9908e770b56fb94bf0a92a0d116f Mon Sep 17 00:00:00 2001 From: blackhao <13851610112@163.com> Date: Wed, 10 Dec 2025 21:54:08 -0600 Subject: fix: resolve all TypeScript errors for production build --- frontend/src/store/flowStore.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'frontend/src/store/flowStore.ts') diff --git a/frontend/src/store/flowStore.ts b/frontend/src/store/flowStore.ts index 3492ffe..3d4930b 100644 --- a/frontend/src/store/flowStore.ts +++ b/frontend/src/store/flowStore.ts @@ -10,9 +10,7 @@ import { type NodeChange, type OnNodesChange, type OnEdgesChange, - type OnConnect, - getIncomers, - getOutgoers + type OnConnect } from 'reactflow'; // --- Project / Blueprint types --- @@ -392,7 +390,7 @@ const useFlowStore = create((set, get) => { const nodesPerLevel: Map = new Map(); while (queue.length > 0) { - const { id, level, index } = queue.shift()!; + const { id, level } = queue.shift()!; // Count nodes at this level const currentCount = nodesPerLevel.get(level) || 0; @@ -569,7 +567,6 @@ const useFlowStore = create((set, get) => { const newInputHandles: Map = new Map(); for (let i = 0; i < pathEdges.length; i++) { - const originalEdge = pathEdges[i]; const fromNodeId = pathNodes[i]; const toNodeId = pathNodes[i + 1]; @@ -1362,7 +1359,7 @@ const useFlowStore = create((set, get) => { } // Check that ALL nodes in the trace have both user and assistant messages - for (const [nodeId, data] of nodeMessages) { + for (const [_nodeId, data] of nodeMessages) { if (!data.hasUser || !data.hasAssistant) { return false; // This node is incomplete } @@ -1382,13 +1379,13 @@ const useFlowStore = create((set, get) => { // Create a new node for quick chat, with proper connection createQuickChatNode: ( fromNodeId: string, - trace: Trace | null, + _trace: Trace | null, userPrompt: string, response: string, model: string, config: Partial ) => { - const { nodes, edges, addNode, updateNodeData } = get(); + const { nodes, addNode, updateNodeData } = get(); const fromNode = nodes.find(n => n.id === fromNodeId); if (!fromNode) return ''; @@ -1997,7 +1994,6 @@ const useFlowStore = create((set, get) => { // Also track Edge updates (Color AND SourceHandle) const updatedEdges = [...edges]; - let edgesChanged = false; // Iterate sortedNodes.forEach(nodeId => { @@ -2140,7 +2136,7 @@ const useFlowStore = create((set, get) => { colors: finalColors } }; - edgesChanged = true; + // Edge was updated } } } -- cgit v1.2.3