File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
web/src/pages/agent/form/agent-form Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import {
3131} from '../../constant' ;
3232import { INextOperatorForm } from '../../interface' ;
3333import useGraphStore from '../../store' ;
34- import { isBottomSubAgent } from '../../utils' ;
34+ import { hasSubAgentOrTool , isBottomSubAgent } from '../../utils' ;
3535import { buildOutputList } from '../../utils/build-output-list' ;
3636import { DescriptionField } from '../components/description-field' ;
3737import { FormWrapper } from '../components/form-wrapper' ;
@@ -231,18 +231,20 @@ function AgentForm({ node }: INextOperatorForm) {
231231 </ FormItem >
232232 ) }
233233 />
234- < FormField
235- control = { form . control }
236- name = { `max_rounds` }
237- render = { ( { field } ) => (
238- < FormItem className = "flex-1" >
239- < FormLabel > { t ( 'flow.maxRounds' ) } </ FormLabel >
240- < FormControl >
241- < NumberInput { ...field } > </ NumberInput >
242- </ FormControl >
243- </ FormItem >
244- ) }
245- />
234+ { hasSubAgentOrTool ( edges , node ?. id ) && (
235+ < FormField
236+ control = { form . control }
237+ name = { `max_rounds` }
238+ render = { ( { field } ) => (
239+ < FormItem className = "flex-1" >
240+ < FormLabel > { t ( 'flow.maxRounds' ) } </ FormLabel >
241+ < FormControl >
242+ < NumberInput { ...field } > </ NumberInput >
243+ </ FormControl >
244+ </ FormItem >
245+ ) }
246+ />
247+ ) }
246248 < FormField
247249 control = { form . control }
248250 name = { `exception_method` }
You can’t perform that action at this time.
0 commit comments