forked from XiaoMo/ChatGPT-Next-Web
Merge branch 'main' into session-config
This commit is contained in:
commit
ace3f7f532
@ -368,7 +368,7 @@ export function Chat() {
|
|||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const { submitKey, shouldSubmit } = useSubmitHandler();
|
const { submitKey, shouldSubmit } = useSubmitHandler();
|
||||||
const { scrollRef, setAutoScroll, scrollToBottom } = useScrollToBottom();
|
const { scrollRef, setAutoScroll, scrollToBottom } = useScrollToBottom();
|
||||||
const [hitBottom, setHitBottom] = useState(false);
|
const [hitBottom, setHitBottom] = useState(true);
|
||||||
const isMobileScreen = useMobileScreen();
|
const isMobileScreen = useMobileScreen();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ export function autoGrowTextArea(dom: HTMLTextAreaElement) {
|
|||||||
|
|
||||||
const width = getDomContentWidth(dom);
|
const width = getDomContentWidth(dom);
|
||||||
measureDom.style.width = width + "px";
|
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 lineWrapCount = Math.max(0, dom.value.split("\n").length - 1);
|
||||||
const height = parseFloat(window.getComputedStyle(measureDom).height);
|
const height = parseFloat(window.getComputedStyle(measureDom).height);
|
||||||
|
Loading…
Reference in New Issue
Block a user