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
clears conversations and no new line on enter
Danny Avila58498ed9519e
diff --git a/src/components/Conversations/Conversation.jsx b/src/components/Conversations/Conversation.jsxindex d6dab23203..65c52457e1 100644--- a/src/components/Conversations/Conversation.jsx+++ b/src/components/Conversations/Conversation.jsx@@ -15,6 +15,9 @@ export default function Conversation({ id, parentMessageId, title = 'New convers);const clickHandler = async () => {+ if (conversationId === id) {+ return;+ }dispatch(setConversation({ conversationId: id, parentMessageId }));const data = await trigger();diff --git a/src/components/Nav/ClearConvos.jsx b/src/components/Nav/ClearConvos.jsxindex 0b070ff2ba..a6bf5960dd 100644--- a/src/components/Nav/ClearConvos.jsx+++ b/src/components/Nav/ClearConvos.jsx@@ -24,10 +24,12 @@ export default function ClearConvos() {};return (- <NavLink- svg={TrashIcon}- text="Clear conversations"+ <a+ className="flex cursor-pointer items-center gap-3 rounded-md py-3 px-3 text-sm text-white transition-colors duration-200 hover:bg-gray-500/10"onClick={clickHandler}- />+ >+ <TrashIcon />+ Clear conversations+ </a>);}diff --git a/src/components/main/TextChat.jsx b/src/components/main/TextChat.jsxindex f74d3cf5c8..0d56dbeb5c 100644--- a/src/components/main/TextChat.jsx+++ b/src/components/main/TextChat.jsx@@ -51,7 +51,13 @@ export default function TextChat({ messages, reloadConvos }) {handleSubmit({ text: payload, messageHandler, convo, convoHandler, errorHandler });};- const handleKeyPress = (e) => {+ const handleKeyDown = (e) => {+ if (e.key === 'Enter' && !e.shiftKey) {+ e.preventDefault();+ }+ };++ const handleKeyUp = (e) => {if (e.key === 'Enter' && e.shiftKey) {console.log('Enter + Shift');}@@ -60,12 +66,12 @@ export default function TextChat({ messages, reloadConvos }) {if (!!isSubmitting) {return;}+submitMessage();}};const changeHandler = (e) => {- // console.log('changeHandler', JSON.stringify(e.target.value));const { value } = e.target;if (isSubmitting && (value === '' || value === '\n')) {return;@@ -84,7 +90,8 @@ export default function TextChat({ messages, reloadConvos }) {// style={{maxHeight: '200px', height: '24px', overflowY: 'hidden'}}rows="1"value={text}- onKeyUp={handleKeyPress}+ onKeyUp={handleKeyUp}+ onKeyDown={handleKeyDown}onChange={changeHandler}placeholder=""className="m-0 h-auto max-h-52 resize-none overflow-auto border-0 bg-transparent p-0 pl-2 pr-7 leading-6 focus:outline-none focus:ring-0 focus-visible:ring-0 dark:bg-transparent md:pl-0"