From 2bbda96a90a2393b13737737ca2443560e23cdf9 Mon Sep 17 00:00:00 2001 From: jubinsoni Date: Sat, 19 Jul 2025 15:29:27 +0530 Subject: [PATCH] adding imput variable description field --- .../app/configuration/config-var/config-modal/index.tsx | 9 ++++++++- web/app/components/workflow/types.ts | 1 + web/i18n/en-US/app-debug.ts | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/web/app/components/app/configuration/config-var/config-modal/index.tsx b/web/app/components/app/configuration/config-var/config-modal/index.tsx index 8fcc0f4c08..6b7ccbfde9 100644 --- a/web/app/components/app/configuration/config-var/config-modal/index.tsx +++ b/web/app/components/app/configuration/config-var/config-modal/index.tsx @@ -44,7 +44,7 @@ const ConfigModal: FC = ({ const { modelConfig } = useContext(ConfigContext) const { t } = useTranslation() const [tempPayload, setTempPayload] = useState(payload || getNewVarInWorkflow('') as any) - const { type, label, variable, options, max_length } = tempPayload + const { type, label, var_description, variable, options, max_length } = tempPayload const modalRef = useRef(null) useEffect(() => { // To fix the first input element auto focus, then directly close modal will raise error @@ -226,6 +226,13 @@ const ConfigModal: FC = ({ placeholder={t('appDebug.variableConfig.inputPlaceholder')!} /> + + handlePayloadChange('var_description')(e.target.value)} + placeholder={t('appDebug.variableConfig.inputPlaceholder')!} + /> + {isStringInput && ( diff --git a/web/app/components/workflow/types.ts b/web/app/components/workflow/types.ts index 5f36956798..ec23682afe 100644 --- a/web/app/components/workflow/types.ts +++ b/web/app/components/workflow/types.ts @@ -196,6 +196,7 @@ export type InputVar = { variable: string isChatVar?: boolean } + var_description: string variable: string max_length?: number default?: string diff --git a/web/i18n/en-US/app-debug.ts b/web/i18n/en-US/app-debug.ts index 938cb27c12..89113be658 100644 --- a/web/i18n/en-US/app-debug.ts +++ b/web/i18n/en-US/app-debug.ts @@ -369,6 +369,7 @@ const translation = { 'apiBasedVar': 'API-based Variable', 'varName': 'Variable Name', 'labelName': 'Label Name', + 'variableDescription': 'Variable Description', 'inputPlaceholder': 'Please input', 'content': 'Content', 'required': 'Required',