From 07c5420d03b519bb41b1bd9dcff23728daee38e4 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 23 Apr 2026 13:54:57 +0000 Subject: [PATCH] feat(ui): prompts/add_prompt_form to shadcn Dialog - antd Modal/Button/Divider + @tremor TextInput + @ant-design UploadOutlined \u2192 shadcn Dialog/Button/Input + lucide Upload + native
. - antd Form/Select/Upload preserved since Form.Item drives validation and the antd Upload widget binds the file-list state. Gates: TS \u2713 | Build \u2713. Co-authored-by: yuneng-jiang --- .../components/prompts/add_prompt_form.tsx | 121 +++++++++++------- 1 file changed, 74 insertions(+), 47 deletions(-) diff --git a/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx b/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx index cdb77bb66fc..de24a2fd85a 100644 --- a/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx +++ b/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx @@ -1,7 +1,15 @@ import React, { useState } from "react"; -import { Modal, Form, Select, Upload, Button, Divider } from "antd"; -import { TextInput } from "@tremor/react"; -import { UploadOutlined } from "@ant-design/icons"; +import { Button } from "@/components/ui/button"; +import { + Dialog, + DialogContent, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { Input } from "@/components/ui/input"; +import { Form, Select, Upload } from "antd"; +import { Upload as UploadIcon } from "lucide-react"; import type { UploadFile, UploadProps } from "antd"; import { convertPromptFileToJson, createPromptCall } from "../networking"; import NotificationsManager from "../molecules/notifications_manager"; @@ -51,6 +59,7 @@ const AddPromptForm: React.FC = ({ visible, onClose, accessT setLoading(true); + // eslint-disable-next-line @typescript-eslint/no-explicit-any let promptData: any = {}; if (promptIntegration === "dotprompt" && fileList.length > 0) { @@ -116,54 +125,72 @@ const AddPromptForm: React.FC = ({ visible, onClose, accessT }; return ( - - Cancel - , - , - ]} - width={600} + onOpenChange={(o) => (!o ? handleCancel() : undefined)} > -
- - - + + + Add New Prompt + + + + + - - - + + + - {promptIntegration === "dotprompt" && ( - <> - - - - - - {fileList.length > 0 &&
Selected: {fileList[0].name}
} -
- - )} - -
+ {promptIntegration === "dotprompt" && ( + <> +
+ + + + + {fileList.length > 0 && ( +
+ Selected: {fileList[0].name} +
+ )} +
+ + )} + + + + + + + ); };