fix: agent node

This commit is contained in:
AkaraChen
2024-12-30 14:49:12 +08:00
parent cd7e6ca010
commit f5b4366bd8

View File

@@ -73,7 +73,7 @@ const AgentNode: FC<NodeProps<AgentNodeType>> = (props) => {
{inputs.agent_strategy_label}
</SettingItem>
: <SettingItem label={t('workflow.nodes.agent.strategyNotSet')} />}
{models.length && <Group
{models.length > 0 && <Group
label={<GroupLabel className='mt-1'>
{t('workflow.nodes.agent.model')}
</GroupLabel>}
@@ -93,13 +93,13 @@ const AgentNode: FC<NodeProps<AgentNodeType>> = (props) => {
/>
})}
</Group>}
<Group label={<GroupLabel className='mt-1'>
{tools.length > 0 && <Group label={<GroupLabel className='mt-1'>
{t('workflow.nodes.agent.toolbox')}
</GroupLabel>}>
<div className='grid grid-cols-10 gap-0.5'>
{tools.map(tool => <ToolIcon {...tool} key={Math.random()} />)}
</div>
</Group>
</Group>}
</div>
}