mirror of
https://github.com/langgenius/dify.git
synced 2026-07-22 03:08:33 +08:00
16 lines
504 B
TypeScript
16 lines
504 B
TypeScript
import { VarType } from '@/app/components/workflow/types'
|
|
import { PipelineInputVarType } from '@/models/pipeline'
|
|
|
|
export const inputVarTypeToVarType = (type: PipelineInputVarType): VarType => {
|
|
return (
|
|
(
|
|
{
|
|
[PipelineInputVarType.number]: VarType.number,
|
|
[PipelineInputVarType.singleFile]: VarType.file,
|
|
[PipelineInputVarType.multiFiles]: VarType.arrayFile,
|
|
[PipelineInputVarType.checkbox]: VarType.boolean,
|
|
} as any
|
|
)[type] || VarType.string
|
|
)
|
|
}
|