feat(web): add warning dot indicator on LLM panel field labels synced with checklist

Store checklist items in zustand WorkflowStore so both the checklist UI
and node panels share a single source of truth. The LLM panel reads from
the store to show a Figma-aligned warning dot (absolute-positioned, no
layout shift) on the MODEL field label when the node has checklist warnings.
This commit is contained in:
yyh
2026-03-09 16:37:47 +08:00
parent 2d979e2cec
commit 694ca840e1
5 changed files with 18 additions and 11 deletions

View File

@ -104,6 +104,7 @@ export const useChecklist = (nodes: Node[], edges: Edge[]) => {
const appMode = useAppStore.getState().appDetail?.mode
const shouldCheckStartNode = appMode === AppModeEnum.WORKFLOW || appMode === AppModeEnum.ADVANCED_CHAT
const modelProviders = useProviderContextSelector(s => s.modelProviders)
const workflowStore = useWorkflowStore()
const map = useNodesAvailableVarList(nodes)
const { data: embeddingModelList } = useModelList(ModelTypeEnum.textEmbedding)
@ -261,8 +262,9 @@ export const useChecklist = (nodes: Node[], edges: Edge[]) => {
}
})
workflowStore.setState({ checklistItems: list })
return list
}, [nodes, edges, shouldCheckStartNode, nodesExtraData, buildInTools, customTools, workflowTools, language, dataSourceList, triggerPlugins, getToolIcon, strategyProviders, getCheckData, t, map, modelProviders])
}, [nodes, edges, shouldCheckStartNode, nodesExtraData, buildInTools, customTools, workflowTools, language, dataSourceList, triggerPlugins, getToolIcon, strategyProviders, getCheckData, t, map, modelProviders, workflowStore])
return needWarningNodes
}