mirror of
https://github.com/langgenius/dify.git
synced 2026-05-11 14:58:23 +08:00
Agent-Logs-Url: https://github.com/langgenius/dify/sessions/489dd945-dfff-462a-9c76-d29fdaa55de2 Co-authored-by: FFXN <31929997+FFXN@users.noreply.github.com>
25 lines
706 B
TypeScript
25 lines
706 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 = (snippetId: string) => {
|
|
const fileUploadConfig = useStore(s => s.fileUploadConfig)
|
|
|
|
return useMemo(() => {
|
|
return {
|
|
flowId: snippetId,
|
|
flowType: FlowType.snippet,
|
|
fileSettings: {
|
|
image: {
|
|
enabled: false,
|
|
detail: Resolution.high,
|
|
number_limits: 3,
|
|
transfer_methods: [TransferMethod.local_file, TransferMethod.remote_url],
|
|
},
|
|
fileUploadConfig,
|
|
},
|
|
}
|
|
}, [fileUploadConfig, snippetId])
|
|
}
|