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: preserve the title of preset.
Wentao Lyu8720f39defdb
diff --git a/client/src/components/Endpoints/EditPresetDialog.jsx b/client/src/components/Endpoints/EditPresetDialog.jsxindex 3e5cedee71..fccf49cb97 100644--- a/client/src/components/Endpoints/EditPresetDialog.jsx+++ b/client/src/components/Endpoints/EditPresetDialog.jsx@@ -17,7 +17,7 @@ import store from '~/store';const EditPresetDialog = ({ open, onOpenChange, preset: _preset }) => {// const [title, setTitle] = useState('My Preset');- const [preset, setPreset] = useState({});+ const [preset, setPreset] = useState(_preset);const setPresets = useSetRecoilState(store.presets);const availableEndpoints = useRecoilValue(store.availableEndpoints);diff --git a/client/src/components/Endpoints/EndpointOptionsDialog.jsx b/client/src/components/Endpoints/EndpointOptionsDialog.jsxindex 0266b7966d..cf89ac1142 100644--- a/client/src/components/Endpoints/EndpointOptionsDialog.jsx+++ b/client/src/components/Endpoints/EndpointOptionsDialog.jsx@@ -19,7 +19,7 @@ import store from '~/store';// A preset dialog to show readonly preset values.const EndpointOptionsDialog = ({ open, onOpenChange, preset: _preset, title }) => {// const [title, setTitle] = useState('My Preset');- const [preset, setPreset] = useState({});+ const [preset, setPreset] = useState(_preset);const [saveAsDialogShow, setSaveAsDialogShow] = useState(false);diff --git a/client/src/components/Endpoints/SaveAsPresetDialog.jsx b/client/src/components/Endpoints/SaveAsPresetDialog.jsxindex 73c697516d..b2e8a193d7 100644--- a/client/src/components/Endpoints/SaveAsPresetDialog.jsx+++ b/client/src/components/Endpoints/SaveAsPresetDialog.jsx@@ -11,7 +11,7 @@ import cleanupPreset from '~/utils/cleanupPreset';import store from '~/store';const SaveAsPresetDialog = ({ open, onOpenChange, preset }) => {- const [title, setTitle] = useState('My Preset');+ const [title, setTitle] = useState(preset?.title || 'My Preset');const setPresets = useSetRecoilState(store.presets);const defaultTextProps =@@ -34,7 +34,7 @@ const SaveAsPresetDialog = ({ open, onOpenChange, preset }) => {};useEffect(() => {- setTitle('My Preset');+ setTitle(preset?.title || 'My Preset');}, [open]);return (