diff --git a/web/app/components/app/configuration/config-var/config-modal/type-select.tsx b/web/app/components/app/configuration/config-var/config-modal/type-select.tsx index a8b14872a7..01bd09ea44 100644 --- a/web/app/components/app/configuration/config-var/config-modal/type-select.tsx +++ b/web/app/components/app/configuration/config-var/config-modal/type-select.tsx @@ -12,6 +12,8 @@ import { import InputVarTypeIcon from '@/app/components/workflow/nodes/_base/components/input-var-type-icon' import type { InputVarType } from '@/app/components/workflow/types' import cn from '@/utils/classnames' +import Badge from '@/app/components/base/badge' +import { inputVarTypeToVarType } from '@/app/components/workflow/nodes/_base/components/variable/utils' export type Item = { value: InputVarType @@ -60,7 +62,8 @@ const TypeSelector: FC = ({ {selectedItem?.name} -
+
+ {inputVarTypeToVarType(selectedItem?.value as InputVarType)}
@@ -84,7 +87,7 @@ const TypeSelector: FC = ({ {item.name} - + {inputVarTypeToVarType(item.value)} ))} diff --git a/web/app/components/workflow/nodes/_base/components/variable/utils.ts b/web/app/components/workflow/nodes/_base/components/variable/utils.ts index a69f9a51a7..374da65788 100644 --- a/web/app/components/workflow/nodes/_base/components/variable/utils.ts +++ b/web/app/components/workflow/nodes/_base/components/variable/utils.ts @@ -49,9 +49,10 @@ export const isConversationVar = (valueSelector: ValueSelector) => { return valueSelector[0] === 'conversation' } -const inputVarTypeToVarType = (type: InputVarType): VarType => { +export const inputVarTypeToVarType = (type: InputVarType): VarType => { return ({ [InputVarType.number]: VarType.number, + [InputVarType.boolean]: VarType.boolean, [InputVarType.singleFile]: VarType.file, [InputVarType.multiFiles]: VarType.arrayFile, } as any)[type] || VarType.string