diff --git a/src/components/ChatInput.tsx b/src/components/ChatInput.tsx index d8d5e77a5..b6b170b37 100644 --- a/src/components/ChatInput.tsx +++ b/src/components/ChatInput.tsx @@ -322,7 +322,7 @@ export const ChatInput: React.FC = ({ element.selectionStart = cursor; element.selectionEnd = cursor; element.style.height = "auto"; - element.style.height = Math.min(element.scrollHeight, 200) + "px"; + element.style.height = Math.min(element.scrollHeight, window.innerHeight * 0.5) + "px"; }); }, []); @@ -358,7 +358,8 @@ export const ChatInput: React.FC = ({ setTimeout(() => { if (inputRef.current) { inputRef.current.style.height = "auto"; - inputRef.current.style.height = Math.min(inputRef.current.scrollHeight, 200) + "px"; + inputRef.current.style.height = + Math.min(inputRef.current.scrollHeight, window.innerHeight * 0.5) + "px"; inputRef.current.focus(); } }, 0); diff --git a/src/components/VimTextArea.tsx b/src/components/VimTextArea.tsx index d189ad9ae..3c29d28a0 100644 --- a/src/components/VimTextArea.tsx +++ b/src/components/VimTextArea.tsx @@ -45,7 +45,7 @@ const StyledTextArea = styled.textarea<{ font-size: 13px; resize: none; min-height: 32px; - max-height: 200px; + max-height: 50vh; overflow-y: auto; caret-color: ${(props) => (props.vimMode === "normal" ? "transparent" : "#ffffff")}; @@ -123,7 +123,7 @@ export const VimTextArea = React.forwardRef