chore: reduce more var limit

This commit is contained in:
Joel 2024-03-20 21:56:09 +08:00
parent 66fd60bc6f
commit 75e876b14e
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ type Props = {
onChange: (value: string) => void
}
const TYPES = [VarType.string, VarType.number, VarType.arrayNumber, VarType.arrayString, VarType.object]
const TYPES = [VarType.string, VarType.number, VarType.arrayNumber, VarType.arrayString, VarType.arrayObject, VarType.object]
const VarReferencePicker: FC<Props> = ({
readonly,
className,
@ -58,8 +58,8 @@ const VarReferencePicker: FC<Props> = ({
className='flex items-center h-[30px] justify-between pl-3 pr-2 rounded-lg hover:bg-gray-100 text-gray-900 text-[13px] cursor-pointer'
onClick={handleChange(type)}
>
<div className='capitalize'>{type}</div>
{type === value && <Check className='w-4 h-4 text-primary-600' />}
<div className='w-0 grow capitalize truncate'>{type}</div>
{type === value && <Check className='shrink-0 w-4 h-4 text-primary-600' />}
</div>
))}
</div>

View File

@ -184,7 +184,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
}, [inputs, setInputs])
const filterVar = useCallback((varPayload: Var) => {
return [VarType.arrayObject, VarType.string].includes(varPayload.type)
return [VarType.arrayObject, VarType.array, VarType.string].includes(varPayload.type)
}, [])
// single run