dify/web/app/components/rag-pipeline/hooks/use-configs-map.ts
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

25 lines
748 B
TypeScript

import { useMemo } from 'react'
import { useStore } from '@/app/components/workflow/store'
import { Resolution, TransferMethod } from '@/types/app'
import { FlowType } from '@/types/common'
export const useConfigsMap = () => {
const pipelineId = useStore((s) => s.pipelineId)
const fileUploadConfig = useStore((s) => s.fileUploadConfig)
return useMemo(() => {
return {
flowId: pipelineId!,
flowType: FlowType.ragPipeline,
fileSettings: {
image: {
enabled: false,
detail: Resolution.high,
number_limits: 3,
transfer_methods: [TransferMethod.local_file, TransferMethod.remote_url],
},
fileUploadConfig,
},
}
}, [fileUploadConfig, pipelineId])
}