mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
chore: reduce more var limit
This commit is contained in:
@ -18,7 +18,7 @@ type Props = {
|
|||||||
onChange: (value: string) => void
|
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> = ({
|
const VarReferencePicker: FC<Props> = ({
|
||||||
readonly,
|
readonly,
|
||||||
className,
|
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'
|
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)}
|
onClick={handleChange(type)}
|
||||||
>
|
>
|
||||||
<div className='capitalize'>{type}</div>
|
<div className='w-0 grow capitalize truncate'>{type}</div>
|
||||||
{type === value && <Check className='w-4 h-4 text-primary-600' />}
|
{type === value && <Check className='shrink-0 w-4 h-4 text-primary-600' />}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -184,7 +184,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
|
|||||||
}, [inputs, setInputs])
|
}, [inputs, setInputs])
|
||||||
|
|
||||||
const filterVar = useCallback((varPayload: Var) => {
|
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
|
// single run
|
||||||
|
|||||||
Reference in New Issue
Block a user