@@ -800,7 +800,7 @@ const CustomEdit = React.memo(({ _type, _config, _toolName, onDelete, onCancel,
800800 newMcpServers = newMcpServers . mcpServers
801801 }
802802 // If transport is streamable, check if url is valid
803- if ( newMcpServers . transport === "streamable" | newMcpServers . transport === "sse" ) {
803+ if ( newMcpServers . transport === "streamable" || newMcpServers . transport === "sse" ) {
804804 const urlValue = newMcpServers . url ?. trim ( ) || ""
805805 if ( ! urlValue ) {
806806 return { isError : true , text : `tools.jsonFormatError.urlRequired${ newMcpServers . transport } ` , fieldKey : "url" }
@@ -1116,10 +1116,10 @@ const CustomEdit = React.memo(({ _type, _config, _toolName, onDelete, onCancel,
11161116 size = "small"
11171117 type = "text"
11181118 value = { currentMcpServers . command || "" }
1119- error = { currentMcp . name && isValidCommandOrUrl ( currentMcpServers ) ?. isError && isValidCommandOrUrl ( currentMcpServers ) ?. fieldKey === "command" }
1119+ error = { currentMcp . name && ( currentMcpServers . command || currentMcpServers . url ) && isValidCommandOrUrl ( currentMcpServers ) ?. isError && isValidCommandOrUrl ( currentMcpServers ) ?. fieldKey === "command" }
11201120 onChange = { ( e ) => handleCustomChange ( "command" , e . target . value ) }
11211121 />
1122- { currentMcp . name && isValidCommandOrUrl ( currentMcpServers ) ?. isError && isValidCommandOrUrl ( currentMcpServers ) ?. fieldKey === "command" ? (
1122+ { currentMcp . name && ( currentMcpServers . command || currentMcpServers . url ) && isValidCommandOrUrl ( currentMcpServers ) ?. isError && isValidCommandOrUrl ( currentMcpServers ) ?. fieldKey === "command" ? (
11231123 < Tooltip content = { t ( isValidCommandOrUrl ( currentMcpServers ) ?. text , { mcp : currentMcp . name } ) } side = "left" >
11241124 < div
11251125 className = "key-input-error"
@@ -1387,10 +1387,10 @@ const CustomEdit = React.memo(({ _type, _config, _toolName, onDelete, onCancel,
13871387 size = "small"
13881388 type = "text"
13891389 value = { currentMcpServers . url || "" }
1390- error = { currentMcp . name && isValidCommandOrUrl ( currentMcpServers ) ?. isError && isValidCommandOrUrl ( currentMcpServers ) ?. fieldKey === "url" }
1390+ error = { currentMcp . name && currentMcpServers . url && isValidCommandOrUrl ( currentMcpServers ) ?. isError && isValidCommandOrUrl ( currentMcpServers ) ?. fieldKey === "url" }
13911391 onChange = { ( e ) => handleCustomChange ( "url" , e . target . value ) }
13921392 />
1393- { currentMcp . name && isValidCommandOrUrl ( currentMcpServers ) ?. isError && isValidCommandOrUrl ( currentMcpServers ) ?. fieldKey === "url" ? (
1393+ { currentMcp . name && currentMcpServers . url && isValidCommandOrUrl ( currentMcpServers ) ?. isError && isValidCommandOrUrl ( currentMcpServers ) ?. fieldKey === "url" ? (
13941394 < Tooltip content = { t ( isValidCommandOrUrl ( currentMcpServers ) ?. text , { mcp : currentMcp . name } ) } side = "left" >
13951395 < div
13961396 className = "key-input-error"
0 commit comments