fix: input text error

This commit is contained in:
Joel 2024-03-18 22:12:34 +08:00
parent f61ceadec5
commit eae4c80679
2 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ const SelectVarType: FC<Props> = ({
<PortalToFollowElemContent style={{ zIndex: 1000 }}>
<div className='bg-white border border-gray-200 shadow-lg rounded-lg min-w-[192px]'>
<div className='p-1'>
<SelectItem type={InputVarType.textInput} value='select' text={t('appDebug.variableConig.select')} onClick={handleChange}></SelectItem>
<SelectItem type={InputVarType.textInput} value='string' text={t('appDebug.variableConig.string')} onClick={handleChange}></SelectItem>
<SelectItem type={InputVarType.paragraph} value='paragraph' text={t('appDebug.variableConig.paragraph')} onClick={handleChange}></SelectItem>
<SelectItem type={InputVarType.select} value='select' text={t('appDebug.variableConig.select')} onClick={handleChange}></SelectItem>
<SelectItem type={InputVarType.number} value='number' text={t('appDebug.variableConig.number')} onClick={handleChange}></SelectItem>

View File

@ -18,9 +18,9 @@ export const userInputsFormToPromptVariables = (useInputs: UserInputFormItem[] |
if (item.external_data_tool)
return [item.external_data_tool.type, item.external_data_tool]
return ['select', item.select]
return ['select', item.select || {}]
})()
const is_context_var = dataset_query_variable === content.variable
const is_context_var = dataset_query_variable === content?.variable
if (type === 'string' || type === 'paragraph') {
promptVariables.push({