diff --git a/client/src/components/Chat/Input/ChatForm.tsx b/client/src/components/Chat/Input/ChatForm.tsx index ea88457ce..9f1fd4778 100644 --- a/client/src/components/Chat/Input/ChatForm.tsx +++ b/client/src/components/Chat/Input/ChatForm.tsx @@ -7,7 +7,7 @@ import { fileConfig as defaultFileConfig, } from 'librechat-data-provider'; import { useChatContext, useAssistantsMapContext, useChatFormContext } from '~/Providers'; -import { useRequiresKey, useTextarea, useSubmitMessage } from '~/hooks'; +import { useRequiresKey, useTextarea, useSubmitMessage, useHandleKeyUp } from '~/hooks'; import { useAutoSave } from '~/hooks/Input/useAutoSave'; import { TextareaAutosize } from '~/components/ui'; import { useGetFileConfig } from '~/data-provider'; @@ -34,12 +34,12 @@ const ChatForm = ({ index = 0 }) => { ); const { requiresKey } = useRequiresKey(); - const { handlePaste, handleKeyDown, handleKeyUp, handleCompositionStart, handleCompositionEnd } = - useTextarea({ - textAreaRef, - submitButtonRef, - disabled: !!requiresKey, - }); + const handleKeyUp = useHandleKeyUp({ index, textAreaRef }); + const { handlePaste, handleKeyDown, handleCompositionStart, handleCompositionEnd } = useTextarea({ + textAreaRef, + submitButtonRef, + disabled: !!requiresKey, + }); const { files, diff --git a/client/src/components/Chat/Input/Files/AttachFile.tsx b/client/src/components/Chat/Input/Files/AttachFile.tsx index 029077d57..1cc136d99 100644 --- a/client/src/components/Chat/Input/Files/AttachFile.tsx +++ b/client/src/components/Chat/Input/Files/AttachFile.tsx @@ -35,6 +35,7 @@ const AttachFile = ({