|
|
|
@ -50,6 +50,7 @@ type ItemProps = {
|
|
|
|
isFlat?: boolean
|
|
|
|
isFlat?: boolean
|
|
|
|
isInCodeGeneratorInstructionEditor?: boolean
|
|
|
|
isInCodeGeneratorInstructionEditor?: boolean
|
|
|
|
zIndex?: number
|
|
|
|
zIndex?: number
|
|
|
|
|
|
|
|
className?: string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const objVarTypes = [VarType.object, VarType.file]
|
|
|
|
const objVarTypes = [VarType.object, VarType.file]
|
|
|
|
@ -67,6 +68,7 @@ const Item: FC<ItemProps> = ({
|
|
|
|
isFlat,
|
|
|
|
isFlat,
|
|
|
|
isInCodeGeneratorInstructionEditor,
|
|
|
|
isInCodeGeneratorInstructionEditor,
|
|
|
|
zIndex,
|
|
|
|
zIndex,
|
|
|
|
|
|
|
|
className,
|
|
|
|
}) => {
|
|
|
|
}) => {
|
|
|
|
const isStructureOutput = itemData.type === VarType.object && (itemData.children as StructuredOutput)?.schema?.properties
|
|
|
|
const isStructureOutput = itemData.type === VarType.object && (itemData.children as StructuredOutput)?.schema?.properties
|
|
|
|
const isFile = itemData.type === VarType.file && !isStructureOutput
|
|
|
|
const isFile = itemData.type === VarType.file && !isStructureOutput
|
|
|
|
@ -176,6 +178,7 @@ const Item: FC<ItemProps> = ({
|
|
|
|
(isObj || isStructureOutput) ? ' pr-1' : 'pr-[18px]',
|
|
|
|
(isObj || isStructureOutput) ? ' pr-1' : 'pr-[18px]',
|
|
|
|
isHovering && ((isObj || isStructureOutput) ? 'bg-components-panel-on-panel-item-bg-hover' : 'bg-state-base-hover'),
|
|
|
|
isHovering && ((isObj || isStructureOutput) ? 'bg-components-panel-on-panel-item-bg-hover' : 'bg-state-base-hover'),
|
|
|
|
'relative flex h-6 w-full cursor-pointer items-center rounded-md pl-3',
|
|
|
|
'relative flex h-6 w-full cursor-pointer items-center rounded-md pl-3',
|
|
|
|
|
|
|
|
className,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onClick={handleChosen}
|
|
|
|
onClick={handleChosen}
|
|
|
|
@ -379,7 +382,7 @@ const VarReferenceVars: FC<Props> = ({
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
filteredVars.map((item, i) => (
|
|
|
|
filteredVars.map((item, i) => (
|
|
|
|
<div key={i} className={cn(!item.isFlat && 'mt-3')}>
|
|
|
|
<div key={i} className={cn(!item.isFlat && 'mt-3', i === 0 && item.isFlat && 'mt-2')}>
|
|
|
|
{!item.isFlat && (
|
|
|
|
{!item.isFlat && (
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
className='system-xs-medium-uppercase truncate px-3 leading-[22px] text-text-tertiary'
|
|
|
|
className='system-xs-medium-uppercase truncate px-3 leading-[22px] text-text-tertiary'
|
|
|
|
|