Skip to content

Commit 7a1c53e

Browse files
Merge pull request #1422 from digma-ai/fix/mcp-tools
Fix MCP tools display
2 parents 8f8a866 + 8516fd4 commit 7a1c53e

File tree

2 files changed

+10
-4
lines changed
  • src/components
    • Agentic/IncidentTemplate/MCPServerDialog
    • common/AffectedEndpointsSelector/EndpointOption

2 files changed

+10
-4
lines changed

src/components/Agentic/IncidentTemplate/MCPServerDialog/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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 = [

src/components/common/AffectedEndpointsSelector/EndpointOption/styles.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

8890
export const Duration = styled.span`

0 commit comments

Comments
 (0)