Browse Source

Merge branch 'main' into session-config

Yidadaa 1 year ago
parent
commit
ace3f7f532
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/components/chat.tsx
  2. 1 1
      app/utils.ts

+ 1 - 1
app/components/chat.tsx

@@ -368,7 +368,7 @@ export function Chat() {
   const [isLoading, setIsLoading] = useState(false);
   const { submitKey, shouldSubmit } = useSubmitHandler();
   const { scrollRef, setAutoScroll, scrollToBottom } = useScrollToBottom();
-  const [hitBottom, setHitBottom] = useState(false);
+  const [hitBottom, setHitBottom] = useState(true);
   const isMobileScreen = useMobileScreen();
   const navigate = useNavigate();
 

+ 1 - 1
app/utils.ts

@@ -138,7 +138,7 @@ export function autoGrowTextArea(dom: HTMLTextAreaElement) {
 
   const width = getDomContentWidth(dom);
   measureDom.style.width = width + "px";
-  measureDom.innerHTML = dom.value.trim().length > 0 ? dom.value : "1";
+  measureDom.innerText = dom.value.trim().length > 0 ? dom.value : "1";
 
   const lineWrapCount = Math.max(0, dom.value.split("\n").length - 1);
   const height = parseFloat(window.getComputedStyle(measureDom).height);