fix: run tool cause page crash because of feature context

This commit is contained in:
Joel
2025-07-29 16:18:15 +08:00
parent e2df3f182d
commit 27f65150d7
5 changed files with 21 additions and 4 deletions

View File

@ -1,13 +1,16 @@
import { useMemo } from 'react'
import { useStore } from '@/app/components/workflow/store'
import { FlowType } from '@/types/common'
import { useFeatures } from '@/app/components/base/features/hooks'
export const useConfigsMap = () => {
const appId = useStore(s => s.appId)
const fileSettings = useFeatures(s => s.features.file)
return useMemo(() => {
return {
flowId: appId!,
flowType: FlowType.appFlow,
fileSettings,
}
}, [appId])
}