From 575aa1123bdbfb59c2a9c56e36b27654d9e69ff9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 24 Apr 2026 13:42:17 +0000 Subject: [PATCH] feat(ui): migrate mcp_server_view tremor tabs to shadcn Co-authored-by: yuneng-jiang --- .../components/mcp_tools/mcp_server_view.tsx | 68 +++++++++---------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_view.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_view.tsx index 7809b06065a..1cad61e66fb 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_view.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_view.tsx @@ -1,13 +1,11 @@ import React, { useState } from "react"; import { ArrowLeft, Check, Copy, Eye, EyeOff } from "lucide-react"; -// eslint-disable-next-line litellm-ui/no-banned-ui-imports import { - TabGroup, - TabList, - TabPanel, - TabPanels, - Tab, -} from "@tremor/react"; + Tabs, + TabsContent, + TabsList, + TabsTrigger, +} from "@/components/ui/tabs"; import { Button } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; import { cn } from "@/lib/utils"; @@ -44,7 +42,7 @@ export const MCPServerView: React.FC = ({ const [editing, setEditing] = useState(isEditing); const [showFullUrl, setShowFullUrl] = useState(false); const [copiedStates, setCopiedStates] = useState>({}); - const [selectedTabIndex, setSelectedTabIndex] = useState(0); + const [selectedTab, setSelectedTab] = useState("overview"); const handleSuccess = () => { setEditing(false); @@ -165,18 +163,15 @@ export const MCPServerView: React.FC = ({ )} - - - {[ - Overview, - MCP Tools, - ...(isProxyAdmin ? [Settings] : []), - ]} - + + + Overview + MCP Tools + {isProxyAdmin && Settings} + - - {/* Overview Panel */} - + {/* Overview Panel */} +
@@ -235,23 +230,23 @@ export const MCPServerView: React.FC = ({ />
-
+ - {/* Tool Panel */} - - - + {/* Tool Panel */} + + + - {/* Settings Panel */} - + {/* Settings Panel */} +

MCP Server Settings

@@ -459,9 +454,8 @@ export const MCPServerView: React.FC = ({
)}
-
-
-
+ + ); };