From 5037fa7eb99b29626bfa6cccdefc3a8f7c3b9763 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 23 Apr 2026 21:15:19 +0000 Subject: [PATCH] feat(ui): agents/agent_form_fields to shadcn - antd Input/Input.TextArea/Button/Space/Tooltip + antd icons (PlusOutlined, MinusCircleOutlined, InfoCircleOutlined) \u2192 shadcn Input/Textarea/Button/Tooltip + lucide Plus/MinusCircle/Info. - InfoTip helper replaces inline Tooltip+InfoCircle+color styles. - Preserved antd Form/Form.Item/Form.List/Switch/Select (mode='tags') and antd Collapse/Panel. Gates: TS \u2713 | Build \u2713. Co-authored-by: yuneng-jiang --- .../components/agents/agent_form_fields.tsx | 116 +++++++++++++----- 1 file changed, 85 insertions(+), 31 deletions(-) diff --git a/ui/litellm-dashboard/src/components/agents/agent_form_fields.tsx b/ui/litellm-dashboard/src/components/agents/agent_form_fields.tsx index 42e55b8c56f..d9bfa70f590 100644 --- a/ui/litellm-dashboard/src/components/agents/agent_form_fields.tsx +++ b/ui/litellm-dashboard/src/components/agents/agent_form_fields.tsx @@ -1,13 +1,32 @@ import React from "react"; -import { Form, Input, Switch, Collapse, Select, Space, Tooltip } from "antd"; -import { Button as AntButton } from "antd"; -import { PlusOutlined, MinusCircleOutlined, InfoCircleOutlined } from "@ant-design/icons"; +import { Form, Switch, Collapse, Select } from "antd"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/components/ui/tooltip"; +import { Info, MinusCircle, Plus } from "lucide-react"; import { AGENT_FORM_CONFIG, SKILL_FIELD_CONFIG } from "./agent_config"; import CostConfigFields from "./cost_config_fields"; const { Panel } = Collapse; +const InfoTip: React.FC<{ children: React.ReactNode }> = ({ children }) => ( + + + + + + {children} + + +); + interface AgentFormFieldsProps { showAgentName?: boolean; visiblePanels?: string[]; @@ -45,7 +64,7 @@ const AgentFormFields: React.FC = ({ showAgentName = true, tooltip={field.tooltip} > {field.type === 'textarea' ? ( - +