99 InputNumber ,
1010 Tag ,
1111 App ,
12+ Tooltip
1213} from "antd" ;
1314
1415import { TOOL_PARAM_TYPES } from "@/const/agentConfig" ;
@@ -257,7 +258,7 @@ export default function ToolConfigModal({
257258
258259 // Handle tool testing - open test panel
259260 const handleTestTool = ( ) => {
260- if ( ! tool ) return ;
261+ if ( ! tool || ! checkRequiredFields ( ) ) return ;
261262 setTestPanelVisible ( true ) ;
262263 } ;
263264
@@ -277,7 +278,7 @@ export default function ToolConfigModal({
277278 value = { stringValue }
278279 onChange = { ( e ) => handleParamChange ( index , e . target . value ) }
279280 placeholder = { t ( "toolConfig.input.string.placeholder" , {
280- name : param . name ,
281+ name : param . description ,
281282 } ) }
282283 autoSize = { { minRows : 1 , maxRows : 8 } }
283284 style = { { resize : "vertical" } }
@@ -289,7 +290,7 @@ export default function ToolConfigModal({
289290 value = { stringValue }
290291 onChange = { ( e ) => handleParamChange ( index , e . target . value ) }
291292 placeholder = { t ( "toolConfig.input.string.placeholder" , {
292- name : param . name ,
293+ name : param . description ,
293294 } ) }
294295 />
295296 ) ;
@@ -298,6 +299,9 @@ export default function ToolConfigModal({
298299 < InputNumber
299300 value = { param . value as number }
300301 onChange = { ( value ) => handleParamChange ( index , value ) }
302+ placeholder = { t ( "toolConfig.input.string.placeholder" , {
303+ name : param . description ,
304+ } ) }
301305 className = "w-full"
302306 />
303307 ) ;
@@ -445,9 +449,9 @@ export default function ToolConfigModal({
445449 >
446450 < div className = "flex items-start gap-4" >
447451 < div className = "flex-[0.3] pt-1" >
448- { param . description ? (
452+ { param . name ? (
449453 < div className = "text-sm text-gray-600" >
450- { param . description }
454+ { param . name }
451455 { param . required && (
452456 < span className = "text-red-500 ml-1" > *</ span >
453457 ) }
@@ -462,7 +466,13 @@ export default function ToolConfigModal({
462466 ) }
463467 </ div >
464468 < div className = "flex-[0.7]" >
465- { renderParamInput ( param , index ) }
469+ < Tooltip
470+ title = { param . description }
471+ placement = "topLeft"
472+ styles = { { root : { maxWidth : 400 } } }
473+ >
474+ { renderParamInput ( param , index ) }
475+ </ Tooltip >
466476 </ div >
467477 </ div >
468478 </ div >
0 commit comments