From c0a3e3f9a986b0f1612f5f342d9cf9c9e062d46e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 23 Apr 2026 18:32:57 +0000 Subject: [PATCH] feat(ui): agents/dynamic_agent_form_fields to shadcn - antd Collapse/Panel \u2192 shadcn Accordion for cost-config section. - antd Input/Input.TextArea \u2192 shadcn Input/Textarea. Kept antd Form/Form.Item + Select (Option-based custom renderer) and AntInput.Password (password eye toggle comes with antd). - Typed 'values: any' casts moved to eslint-disable comments; no runtime changes. Gates: TS \u2713 | Build \u2713. Co-authored-by: yuneng-jiang --- .../agents/dynamic_agent_form_fields.tsx | 108 ++++++++++++------ 1 file changed, 70 insertions(+), 38 deletions(-) diff --git a/ui/litellm-dashboard/src/components/agents/dynamic_agent_form_fields.tsx b/ui/litellm-dashboard/src/components/agents/dynamic_agent_form_fields.tsx index 1138b0de730..108309255cd 100644 --- a/ui/litellm-dashboard/src/components/agents/dynamic_agent_form_fields.tsx +++ b/ui/litellm-dashboard/src/components/agents/dynamic_agent_form_fields.tsx @@ -1,11 +1,17 @@ import React from "react"; -import { Form, Input, Select, Collapse } from "antd"; +import { Form, Input as AntInput, Select } from "antd"; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "@/components/ui/accordion"; +import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; import { AgentCreateInfo, AgentCredentialFieldMetadata } from "../networking"; import { AGENT_FORM_CONFIG } from "./agent_config"; import CostConfigFields from "./cost_config_fields"; -const { Panel } = Collapse; - interface DynamicAgentFormFieldsProps { agentTypeInfo: AgentCreateInfo; } @@ -23,7 +29,9 @@ const DynamicAgentFormFields: React.FC = ({ @@ -34,41 +42,63 @@ const DynamicAgentFormFields: React.FC = ({ name="description" tooltip="Brief description of what this agent does" > - +