Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
feat: add confirm of clear all presets.
Wentao Lyu46fba87f9a1b
diff --git a/client/src/components/Input/Endpoints/NewConversationMenu.jsx b/client/src/components/Input/Endpoints/NewConversationMenu.jsxindex 3df97e32fc..0962d80f14 100644--- a/client/src/components/Input/Endpoints/NewConversationMenu.jsx+++ b/client/src/components/Input/Endpoints/NewConversationMenu.jsx@@ -15,7 +15,8 @@ import {DropdownMenuSeparator,DropdownMenuTrigger} from '../../ui/DropdownMenu.tsx';-import { Dialog } from '../../ui/Dialog.tsx';+import { Dialog, DialogTrigger } from '../../ui/Dialog.tsx';+import DialogTemplate from '../../ui/DialogTemplate';import store from '~/store';@@ -134,13 +135,26 @@ export default function NewConversationMenu() {<DropdownMenuLabel className="flex items-center dark:text-gray-300"><span>Select a Preset</span><div className="flex-1" />- <Button- type="button"- className="h-auto bg-transparent px-2 py-1 text-xs font-medium font-normal text-red-700 hover:bg-slate-200 hover:text-red-700 dark:bg-transparent dark:text-red-400 dark:hover:bg-gray-800 dark:hover:text-red-400"- onClick={clearPreset}- >- Clear All- </Button>+ <Dialog>+ <DialogTrigger asChild>+ <Button+ type="button"+ className="h-auto bg-transparent px-2 py-1 text-xs font-medium font-normal text-red-700 hover:bg-slate-200 hover:text-red-700 dark:bg-transparent dark:text-red-400 dark:hover:bg-gray-800 dark:hover:text-red-400"+ // onClick={clearPreset}+ >+ Clear All+ </Button>+ </DialogTrigger>+ <DialogTemplate+ title="Clear presets"+ description="Are you sure you want to clear all presets? This is irreversible."+ selection={{+ selectHandler: clearPreset,+ selectClasses: 'bg-red-600 hover:bg-red-700 dark:hover:bg-red-800 text-white',+ selectText: 'Clear'+ }}+ />+ </Dialog></DropdownMenuLabel><DropdownMenuSeparator /><DropdownMenuRadioGroup