feat: performance 1

This commit is contained in:
2026-03-12 18:01:27 +01:00
parent 4bd2f1b458
commit 923bf4bff0
18 changed files with 404 additions and 146 deletions

View File

@@ -6,7 +6,7 @@
import { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react'
import { useAbstractNode } from '@/lib/graph/abstractNode'
import FlowContext from '@/lib/graph/flowContext'
import { ConnectionPathContext } from '@/lib/graph/flowContext'
import { useSyncConnectionStatus } from '@/lib/graph/nodeLifecycle'
import { usePlatform } from '@/app/kosmos/KosmosContext'
import { getDefaultDataForType, getNextNodeId } from '@/lib/graph/flowUtils'
@@ -187,8 +187,8 @@ export function useRenderingNodeState(
const lastManualRunTriggerRef = useRef(0)
const manualRunTriggerSyncedRef = useRef(false)
const flowContext = useContext(FlowContext)
const triggerNodeIds = flowContext?.connectionPathTriggerNodeIds ?? []
const pathCtx = useContext(ConnectionPathContext)
const triggerNodeIds = pathCtx?.connectionPathTriggerNodeIds ?? []
const hasPendingInputs =
effectiveUpdateMode === 'manual' &&
!loading &&