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/store/flowStore.ts | |
| parent | b51af40db8ae73216789472903298589bb54df2b (diff) | |
fix: resolve all TypeScript errors for production build
Diffstat (limited to 'frontend/src/store/flowStore.ts')
| -rw-r--r-- | frontend/src/store/flowStore.ts | 16 |
1 files changed, 6 insertions, 10 deletions
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<FlowState>((set, get) => { const nodesPerLevel: Map<number, number> = 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<FlowState>((set, get) => { const newInputHandles: Map<string, number> = 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<FlowState>((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<FlowState>((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<NodeData> ) => { - 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<FlowState>((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<FlowState>((set, get) => { colors: finalColors } }; - edgesChanged = true; + // Edge was updated } } } |
