diff --git a/client/src/components/Chat/Input/ChatForm.tsx b/client/src/components/Chat/Input/ChatForm.tsx index 022cddd156..edd12bd3ac 100644 --- a/client/src/components/Chat/Input/ChatForm.tsx +++ b/client/src/components/Chat/Input/ChatForm.tsx @@ -260,37 +260,50 @@ const ChatForm = memo(({ index = 0 }: { index?: number }) => { {endpoint && (
- { - ref(e); - (textAreaRef as React.MutableRefObject).current = e; - }} - disabled={disableInputs || isNotAppendable} - onPaste={handlePaste} - onKeyDown={handleKeyDown} - onKeyUp={handleKeyUp} - onCompositionStart={handleCompositionStart} - onCompositionEnd={handleCompositionEnd} - id={mainTextareaId} - tabIndex={0} - data-testid="text-input" - rows={1} - onFocus={() => { - handleFocusOrClick(); - setIsTextAreaFocused(true); - }} - onBlur={setIsTextAreaFocused.bind(null, false)} - aria-label={localize('com_ui_message_input')} - onClick={handleFocusOrClick} - style={{ height: 44, overflowY: 'auto' }} - className={cn( - baseClasses, - removeFocusRings, - 'transition-[max-height] duration-200 disabled:cursor-not-allowed', +
+ { + ref(e); + (textAreaRef as React.MutableRefObject).current = + e; + }} + disabled={disableInputs || isNotAppendable} + onPaste={handlePaste} + onKeyDown={handleKeyDown} + onKeyUp={handleKeyUp} + onCompositionStart={handleCompositionStart} + onCompositionEnd={handleCompositionEnd} + id={mainTextareaId} + tabIndex={0} + data-testid="text-input" + rows={1} + onFocus={() => { + handleFocusOrClick(); + setIsTextAreaFocused(true); + }} + onBlur={setIsTextAreaFocused.bind(null, false)} + aria-label={localize('com_ui_message_input')} + onClick={handleFocusOrClick} + style={{ height: 44, overflowY: 'auto' }} + className={cn( + baseClasses, + removeFocusRings, + 'scrollbar-hover transition-[max-height] duration-200 disabled:cursor-not-allowed', + )} + /> + {isCollapsed && ( +
)} - /> -
+
+