From 3ae71bf49e87f7bc6356d11d27281091b5fd4696 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Tue, 20 Jan 2026 13:03:27 -0800 Subject: [PATCH] fixing ui build --- .../AIHub/ClaudeCodeMarketplaceTab.tsx | 23 ++-- .../AIHub/marketplace/PluginCard.tsx | 14 +-- .../claude_code_plugins/plugin_info.tsx | 49 ++++---- .../claude_code_plugins/plugin_table.tsx | 115 +++++++++--------- 4 files changed, 99 insertions(+), 102 deletions(-) diff --git a/ui/litellm-dashboard/src/components/AIHub/ClaudeCodeMarketplaceTab.tsx b/ui/litellm-dashboard/src/components/AIHub/ClaudeCodeMarketplaceTab.tsx index df022f4a74..043077c021 100644 --- a/ui/litellm-dashboard/src/components/AIHub/ClaudeCodeMarketplaceTab.tsx +++ b/ui/litellm-dashboard/src/components/AIHub/ClaudeCodeMarketplaceTab.tsx @@ -1,20 +1,19 @@ -import React, { useState, useEffect, useMemo } from "react"; -import { Input } from "antd"; -import { Card, TabGroup, TabList, Tab, TabPanels, TabPanel, Text } from "@tremor/react"; import { SearchOutlined } from "@ant-design/icons"; -import { getClaudeCodeMarketplace } from "../networking"; -import { ModelDataTable } from "../model_dashboard/table"; -import { getMarketplaceTableColumns } from "./marketplace_table_columns"; -import NotificationsManager from "../molecules/notifications_manager"; -import { - MarketplaceResponse, - MarketplacePluginEntry, -} from "../claude_code_plugins/types"; +import { Card, Tab, TabGroup, TabList, TabPanel, TabPanels, Text } from "@tremor/react"; +import { Input } from "antd"; +import React, { useEffect, useMemo, useState } from "react"; import { extractCategories, - filterPluginsBySearch, filterPluginsByCategory, + filterPluginsBySearch, } from "../claude_code_plugins/helpers"; +import { + MarketplaceResponse +} from "../claude_code_plugins/types"; +import { ModelDataTable } from "../model_dashboard/table"; +import NotificationsManager from "../molecules/notifications_manager"; +import { getClaudeCodeMarketplace } from "../networking"; +import { getMarketplaceTableColumns } from "./marketplace_table_columns"; interface ClaudeCodeMarketplaceTabProps { publicPage?: boolean; diff --git a/ui/litellm-dashboard/src/components/AIHub/marketplace/PluginCard.tsx b/ui/litellm-dashboard/src/components/AIHub/marketplace/PluginCard.tsx index d8111b2da0..f7f00a2e3c 100644 --- a/ui/litellm-dashboard/src/components/AIHub/marketplace/PluginCard.tsx +++ b/ui/litellm-dashboard/src/components/AIHub/marketplace/PluginCard.tsx @@ -1,15 +1,15 @@ -import React from "react"; -import { Card, Badge, Button, Text } from "@tremor/react"; -import { Tooltip } from "antd"; -import { CopyOutlined, ExternalLinkIcon } from "@heroicons/react/outline"; -import { MarketplacePluginEntry } from "@/components/claude_code_plugins/types"; import { formatInstallCommand, getCategoryBadgeColor, - getSourceLink, - truncateText, + getSourceLink } from "@/components/claude_code_plugins/helpers"; +import { MarketplacePluginEntry } from "@/components/claude_code_plugins/types"; import NotificationsManager from "@/components/molecules/notifications_manager"; +import { ExternalLinkIcon } from "@heroicons/react/outline"; +import { CopyOutlined } from "@ant-design/icons"; +import { Badge, Button, Card, Text } from "@tremor/react"; +import { Tooltip } from "antd"; +import React from "react"; interface PluginCardProps { plugin: MarketplacePluginEntry; diff --git a/ui/litellm-dashboard/src/components/claude_code_plugins/plugin_info.tsx b/ui/litellm-dashboard/src/components/claude_code_plugins/plugin_info.tsx index a4eb4352e1..142d775771 100644 --- a/ui/litellm-dashboard/src/components/claude_code_plugins/plugin_info.tsx +++ b/ui/litellm-dashboard/src/components/claude_code_plugins/plugin_info.tsx @@ -1,30 +1,29 @@ -import React, { useState, useEffect } from "react"; -import { - Card, - Title, - Text, - Button, - Badge, - Grid, -} from "@tremor/react"; -import { Spin, Switch, Tooltip, Descriptions } from "antd"; -import { ArrowLeftIcon, ExternalLinkIcon } from "@heroicons/react/outline"; import { CopyOutlined } from "@ant-design/icons"; +import { ArrowLeftIcon, ExternalLinkIcon } from "@heroicons/react/outline"; import { - getClaudeCodePluginDetails, - enableClaudeCodePlugin, - disableClaudeCodePlugin, -} from "../networking"; + Badge, + Button, + Card, + Grid, + Text, + Title, +} from "@tremor/react"; +import { Spin, Switch, Tooltip } from "antd"; +import React, { useEffect, useState } from "react"; import NotificationsManager from "../molecules/notifications_manager"; -import { Plugin } from "./types"; import { - formatInstallCommand, - getSourceDisplayText, - getSourceLink, - getCategoryBadgeColor, + disableClaudeCodePlugin, + enableClaudeCodePlugin, + getClaudeCodePluginDetails, +} from "../networking"; +import { formatDateString, - formatKeywords, + formatInstallCommand, + getCategoryBadgeColor, + getSourceDisplayText, + getSourceLink } from "./helpers"; +import { Plugin } from "./types"; interface PluginInfoViewProps { pluginId: string; @@ -169,7 +168,9 @@ const PluginInfoView: React.FC = ({ {/* Plugin Details */} Plugin Details - + {/* Plugin ID */}
Plugin ID @@ -277,7 +278,7 @@ const PluginInfoView: React.FC = ({ {plugin.author && ( Author Information - + {plugin.author.name && (
Name @@ -322,7 +323,7 @@ const PluginInfoView: React.FC = ({ {/* Timestamps */} Metadata - +
Created At diff --git a/ui/litellm-dashboard/src/components/claude_code_plugins/plugin_table.tsx b/ui/litellm-dashboard/src/components/claude_code_plugins/plugin_table.tsx index df9fb9303c..38d03069a3 100644 --- a/ui/litellm-dashboard/src/components/claude_code_plugins/plugin_table.tsx +++ b/ui/litellm-dashboard/src/components/claude_code_plugins/plugin_table.tsx @@ -1,32 +1,10 @@ -import React, { useState } from "react"; +import { CopyOutlined } from "@ant-design/icons"; import { - Table, - TableBody, - TableCell, - TableHead, - TableHeaderCell, - TableRow, - Button, - Badge, -} from "@tremor/react"; -import { - SwitchVerticalIcon, - ChevronUpIcon, ChevronDownIcon, + ChevronUpIcon, + SwitchVerticalIcon, TrashIcon, } from "@heroicons/react/outline"; -import { Tooltip, Switch } from "antd"; -import { CopyOutlined } from "@ant-design/icons"; -import { Plugin } from "./types"; -import { - getCategoryBadgeColor, - formatDateString, -} from "./helpers"; -import { - enableClaudeCodePlugin, - disableClaudeCodePlugin, -} from "../networking"; -import NotificationsManager from "../molecules/notifications_manager"; import { ColumnDef, flexRender, @@ -35,6 +13,27 @@ import { SortingState, useReactTable, } from "@tanstack/react-table"; +import { + Badge, + Button, + Table, + TableBody, + TableCell, + TableHead, + TableHeaderCell, + TableRow, +} from "@tremor/react"; +import { Switch, Tooltip } from "antd"; +import React, { useState } from "react"; +import NotificationsManager from "../molecules/notifications_manager"; +import { + disableClaudeCodePlugin, + enableClaudeCodePlugin, +} from "../networking"; +import { + getCategoryBadgeColor +} from "./helpers"; +import { Plugin } from "./types"; interface PluginTableProps { pluginsList: Plugin[]; @@ -209,33 +208,33 @@ const PluginTable: React.FC = ({ }, ...(isAdmin ? [ - { - header: "Actions", - id: "actions", - enableSorting: false, - cell: ({ row }: any) => { - const plugin = row.original; + { + header: "Actions", + id: "actions", + enableSorting: false, + cell: ({ row }: any) => { + const plugin = row.original; - return ( -
- -
- ); - }, + return ( +
+ +
+ ); }, - ] + }, + ] : []), ]; @@ -261,11 +260,10 @@ const PluginTable: React.FC = ({ {headerGroup.headers.map((header) => ( = ({ {header.isPlaceholder ? null : flexRender( - header.column.columnDef.header, - header.getContext() - )} + header.column.columnDef.header, + header.getContext() + )}
{header.column.getCanSort() && (
@@ -318,11 +316,10 @@ const PluginTable: React.FC = ({ {row.getVisibleCells().map((cell) => ( {flexRender( cell.column.columnDef.cell,