dify/web/app/components/workflow-app/hooks/use-configs-map.ts

17 lines
470 B
TypeScript
Raw Normal View History

import { useMemo } from 'react'
import { useStore } from '@/app/components/workflow/store'
2025-07-14 15:10:21 +08:00
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 {
2025-07-14 15:10:21 +08:00
flowId: appId!,
flowType: FlowType.appFlow,
fileSettings,
}
}, [appId])
}