Merge branch 'main' into session-config

This commit is contained in:
Yidadaa 2023-04-28 00:35:04 +08:00
commit ace3f7f532
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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);