fix(web): fix unique key issue (#20809) (#20810)

This commit is contained in:
HyaCinth
2025-06-18 10:04:18 +08:00
committed by GitHub
parent 61526c027d
commit 945d1569ee
2 changed files with 3 additions and 2 deletions

View File

@@ -118,6 +118,7 @@ export const AgentStrategy = memo((props: AgentStrategyProps) => {
title={<>
{renderI18nObject(def.label)} {def.required && <span className='text-red-500'>*</span>}
</>}
key={def.variable}
tooltip={def.tooltip && renderI18nObject(def.tooltip)}
inline
>

View File

@@ -54,9 +54,9 @@ const AgentNode: FC<NodeProps<AgentNodeType>> = (props) => {
const field = param.name
const value = inputs.agent_parameters?.[field]?.value
if (value) {
(value as unknown as any[]).forEach((item) => {
(value as unknown as any[]).forEach((item, idx) => {
tools.push({
id: `${param.name}-${i}`,
id: `${param.name}-${idx}`,
providerName: item.provider_name,
})
})