diff --git a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptCodeSnippets.tsx b/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptCodeSnippets.tsx index ed7caf60de8..2f1cbc866c5 100644 --- a/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptCodeSnippets.tsx +++ b/ui/litellm-dashboard/src/components/prompts/prompt_editor_view/PromptCodeSnippets.tsx @@ -1,7 +1,20 @@ import React, { useState } from "react"; -import { Modal, Select, Button as AntdButton, Tabs } from "antd"; -import { CodeOutlined } from "@ant-design/icons"; -import { Button as TremorButton, Text } from "@tremor/react"; +import { Tabs } from "antd"; +import { Button } from "@/components/ui/button"; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { Code } from "lucide-react"; import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { coy } from "react-syntax-highlighter/dist/esm/styles/prism"; import NotificationsManager from "../../molecules/notifications_manager"; @@ -210,72 +223,88 @@ main();`; return ( <> - + + Get Code - + - (!o ? handleCancel() : undefined)} > - - - Language - setSelectedLanguage(value as "curl" | "python" | "javascript")} - style={{ width: 180 }} - options={[ - { value: "curl", label: "cURL" }, - { value: "python", label: "Python (OpenAI SDK)" }, - { value: "javascript", label: "JavaScript (OpenAI SDK)" }, - ]} - /> + + + Generated Code + + + + Language + + setSelectedLanguage( + value as "curl" | "python" | "javascript", + ) + } + > + + + + + cURL + Python (OpenAI SDK) + + JavaScript (OpenAI SDK) + + + + + { + navigator.clipboard.writeText(generatedCode); + NotificationsManager.success("Copied to clipboard!"); + }} + > + Copy to Clipboard + - { - navigator.clipboard.writeText(generatedCode); - NotificationsManager.success("Copied to clipboard!"); + + + + - Copy to Clipboard - - - - - - - {generatedCode} - - + {generatedCode} + + + > ); };
Language