mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
feat(ui): SearchTools/SearchToolColumn to shadcn
- antd Tag \u2192 shadcn Badge. Categorical blue (DB source) vs muted (Config source) palette preserved; file added to .eslintrc overrides. antd Table ColumnsType contract preserved. Gates: TS \u2713 | Build \u2713. Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
This commit is contained in:
parent
af8116fb44
commit
9190282d6f
2 changed files with 14 additions and 4 deletions
|
|
@ -80,6 +80,7 @@
|
|||
"src/components/vector_store_management/vector_store_info.tsx",
|
||||
"src/components/vector_store_management/DocumentsTable.tsx",
|
||||
"src/components/common_components/MemberTable.tsx",
|
||||
"src/components/SearchTools/SearchToolColumn.tsx",
|
||||
"src/components/permissions/VectorStorePermissions.tsx",
|
||||
"src/components/permissions/AgentPermissions.tsx",
|
||||
"src/components/permissions/MCPServerPermissions.tsx",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { Tag } from "antd";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { ColumnsType } from "antd/es/table";
|
||||
import TableIconActionButton from "../common_components/IconActionButton/TableIconActionButtons/TableIconActionButton";
|
||||
import { SearchTool } from "./types";
|
||||
|
|
@ -22,8 +23,9 @@ export const searchToolColumns = (
|
|||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => onView(tool.search_tool_id!)}
|
||||
className="font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left cursor-pointer max-w-40"
|
||||
className="font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 dark:bg-blue-950/30 dark:hover:bg-blue-950/60 text-xs font-normal px-2 py-0.5 text-left cursor-pointer max-w-40 rounded"
|
||||
>
|
||||
<span className="truncate block">{tool.search_tool_id}</span>
|
||||
</button>
|
||||
|
|
@ -70,9 +72,16 @@ export const searchToolColumns = (
|
|||
const isFromConfig = tool.is_from_config ?? false;
|
||||
|
||||
return (
|
||||
<Tag color={isFromConfig ? "default" : "blue"}>
|
||||
<Badge
|
||||
className={cn(
|
||||
"text-xs",
|
||||
isFromConfig
|
||||
? "bg-muted text-muted-foreground"
|
||||
: "bg-blue-100 text-blue-700 dark:bg-blue-950 dark:text-blue-300",
|
||||
)}
|
||||
>
|
||||
{isFromConfig ? "Config" : "DB"}
|
||||
</Tag>
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue