File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Agentic/IncidentTemplate/MCPServerDialog
common/AffectedEndpointsSelector/EndpointOption Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ export const MCPServerDialog = ({
3434 onClose,
3535 onComplete
3636} : MCPServerDialogProps ) => {
37- const [ currentStep , setCurrentStep ] = useState ( serverData ?. uid ? 1 : 0 ) ;
37+ const isEditMode = Boolean ( serverData ) ;
38+ const [ currentStep , setCurrentStep ] = useState ( isEditMode ? 1 : 0 ) ;
3839 const [ connectionSettings , setConnectionSettings ] = useState ( "" ) ;
3940 const [ testServerError , setTestServerError ] = useState < string > ( ) ;
4041 const [ addServerError , setAddServerError ] = useState < string > ( ) ;
@@ -120,8 +121,11 @@ export const MCPServerDialog = ({
120121 } ;
121122
122123 const tools = useMemo (
123- ( ) => serverData ?. all_tools ?? [ ] ,
124- [ serverData ?. all_tools ]
124+ ( ) =>
125+ isEditMode
126+ ? serverData ?. all_tools ?? [ ]
127+ : testMCPServerResult . data ?. tools ?? [ ] ,
128+ [ isEditMode , serverData ?. all_tools , testMCPServerResult . data ?. tools ]
125129 ) ;
126130
127131 const steps = [
Original file line number Diff line number Diff line change @@ -82,7 +82,9 @@ export const RouteLink = styled(CommonLink)<SpanLinkProps>`
8282 ? css `
8383 width: 100%;
8484 `
85- : "" }
85+ : css `
86+ display: inline;
87+ ` }
8688` ;
8789
8890export const Duration = styled . span `
You can’t perform that action at this time.
0 commit comments