mirror of
https://github.com/langgenius/dify.git
synced 2025-07-14 20:49:56 +00:00
11 lines
408 B
TypeScript
11 lines
408 B
TypeScript
import { PipelineInputVarType } from '@/models/pipeline'
|
|
import { VarType } from '@/app/components/workflow/types'
|
|
|
|
export const inputVarTypeToVarType = (type: PipelineInputVarType): VarType => {
|
|
return ({
|
|
[PipelineInputVarType.number]: VarType.number,
|
|
[PipelineInputVarType.singleFile]: VarType.file,
|
|
[PipelineInputVarType.multiFiles]: VarType.arrayFile,
|
|
} as any)[type] || VarType.string
|
|
}
|