chore: eslint add sonar (#17989)
This commit is contained in:
parent
8f9cbe1c49
commit
d80f4c7d3b
38 changed files with 157 additions and 180 deletions
|
|
@ -97,7 +97,7 @@ const nodeDefault: NodeDefault<AgentNodeType> = {
|
|||
}
|
||||
// check form of tools
|
||||
else {
|
||||
let validState = {
|
||||
const validState = {
|
||||
isValid: true,
|
||||
errorMessage: '',
|
||||
}
|
||||
|
|
@ -108,13 +108,13 @@ const nodeDefault: NodeDefault<AgentNodeType> = {
|
|||
schemas.forEach((schema: any) => {
|
||||
if (schema?.required) {
|
||||
if (schema.form === 'form' && !userSettings[schema.name]?.value) {
|
||||
return validState = {
|
||||
return {
|
||||
isValid: false,
|
||||
errorMessage: t('workflow.errorMsg.toolParameterRequired', { field: renderI18nObject(param.label, language), param: renderI18nObject(schema.label, language) }),
|
||||
}
|
||||
}
|
||||
if (schema.form === 'llm' && reasoningConfig[schema.name]?.auto === 0 && !reasoningConfig[schema.name]?.value) {
|
||||
return validState = {
|
||||
return {
|
||||
isValid: false,
|
||||
errorMessage: t('workflow.errorMsg.toolParameterRequired', { field: renderI18nObject(param.label, language), param: renderI18nObject(schema.label, language) }),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ const AgentNode: FC<NodeProps<AgentNodeType>> = (props) => {
|
|||
{t('workflow.nodes.agent.toolbox')}
|
||||
</GroupLabel>}>
|
||||
<div className='grid grid-cols-10 gap-0.5'>
|
||||
{/* eslint-disable-next-line sonarjs/no-uniq-key */}
|
||||
{tools.map(tool => <ToolIcon {...tool} key={Math.random()} />)}
|
||||
</div>
|
||||
</Group>}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue