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
🔧 fix(useTextarea): duplicate text when pasting on chromium (#1951)
Marco Beretta7d633f401862
diff --git a/client/src/hooks/Input/useTextarea.ts b/client/src/hooks/Input/useTextarea.tsindex 1c64c18eb6..9fa3b04808 100644--- a/client/src/hooks/Input/useTextarea.ts+++ b/client/src/hooks/Input/useTextarea.ts@@ -1,5 +1,5 @@import debounce from 'lodash/debounce';-import { useEffect, useRef, useCallback } from 'react';+import React, { useEffect, useRef, useCallback } from 'react';import { EModelEndpoint } from 'librechat-data-provider';import type { TEndpointOption } from 'librechat-data-provider';import type { SetterOrUpdater } from 'recoil';@@ -158,6 +158,8 @@ export default function useTextarea({const handlePaste = useCallback((e: React.ClipboardEvent<HTMLTextAreaElement>) => {+ e.preventDefault();+const pastedData = e.clipboardData.getData('text/plain');const textArea = textAreaRef.current;