fix(web): use atomic selectors to fix Zustand v5 infinite loop (#28977)

This commit is contained in:
yyh
2025-12-01 15:45:50 +08:00
committed by GitHub
parent f4db5f9973
commit 626d4f3e35
2 changed files with 3 additions and 8 deletions

View File

@@ -47,10 +47,8 @@ const ChatWrapper = (
const startVariables = startNode?.data.variables
const appDetail = useAppStore(s => s.appDetail)
const workflowStore = useWorkflowStore()
const { inputs, setInputs } = useStore(s => ({
inputs: s.inputs,
setInputs: s.setInputs,
}))
const inputs = useStore(s => s.inputs)
const setInputs = useStore(s => s.setInputs)
const initialInputs = useMemo(() => {
const initInputs: Record<string, any> = {}