diff --git a/ui/litellm-dashboard/eslint-suppressions.json b/ui/litellm-dashboard/eslint-suppressions.json index 8a86305b4cb..6f8e2a5db3a 100644 --- a/ui/litellm-dashboard/eslint-suppressions.json +++ b/ui/litellm-dashboard/eslint-suppressions.json @@ -3331,9 +3331,6 @@ "src/components/search_tools/SearchToolSelector.tsx": { "no-nested-ternary": { "count": 1 - }, - "no-restricted-imports": { - "count": 1 } }, "src/components/settings.test.tsx": { @@ -3503,11 +3500,6 @@ "count": 2 } }, - "src/components/team/MyUserTab.tsx": { - "no-restricted-imports": { - "count": 1 - } - }, "src/components/team/TeamInfo.tsx": { "max-lines": { "count": 1 diff --git a/ui/litellm-dashboard/src/components/search_tools/SearchToolSelector.tsx b/ui/litellm-dashboard/src/components/search_tools/SearchToolSelector.tsx index c93ff35e7de..b16c63470e3 100644 --- a/ui/litellm-dashboard/src/components/search_tools/SearchToolSelector.tsx +++ b/ui/litellm-dashboard/src/components/search_tools/SearchToolSelector.tsx @@ -1,5 +1,16 @@ import React, { useEffect, useState } from "react"; -import { Select } from "antd"; +import { + Combobox, + ComboboxChip, + ComboboxChips, + ComboboxChipsInput, + ComboboxContent, + ComboboxEmpty, + ComboboxItem, + ComboboxList, + ComboboxValue, +} from "@/components/ui/combobox"; +import { cn } from "@/lib/cva.config"; import { fetchSearchTools } from "../networking"; export interface SearchToolSelectorProps { @@ -19,7 +30,7 @@ const SearchToolSelector: React.FC = ({ placeholder = "Select search tools (optional)", disabled = false, }) => { - const [options, setOptions] = useState<{ label: string; value: string }[]>([]); + const [options, setOptions] = useState([]); const [loading, setLoading] = useState(false); useEffect(() => { @@ -36,8 +47,7 @@ const SearchToolSelector: React.FC = ({ setOptions( tools .map((tool: { search_tool_name?: string }) => tool?.search_tool_name) - .filter((name: unknown): name is string => typeof name === "string" && name.length > 0) - .map((name: string) => ({ label: name, value: name })), + .filter((name: unknown): name is string => typeof name === "string" && name.length > 0), ); } catch (e) { console.error("Failed to load search tools:", e); @@ -49,20 +59,41 @@ const SearchToolSelector: React.FC = ({ }, [accessToken]); return ( -