diff --git a/web/src/app/chat/Chat.tsx b/web/src/app/chat/Chat.tsx index 6420ff473..6e495aa38 100644 --- a/web/src/app/chat/Chat.tsx +++ b/web/src/app/chat/Chat.tsx @@ -154,10 +154,13 @@ export const Chat = ({ // numbers below are based on the actual width the center section for different // screen sizes. `1700` corresponds to the custom "3xl" tailwind breakpoint // NOTE: some buffer is needed to account for scroll bars - setMaxDocumentSidebarWidth( - masterFlexboxRef.current.clientWidth - - (document.documentElement.clientWidth > 1700 ? 950 : 810) - ); + if (document.documentElement.clientWidth > 1700) { + setMaxDocumentSidebarWidth(masterFlexboxRef.current.clientWidth - 950); + } else if (document.documentElement.clientWidth > 1420) { + setMaxDocumentSidebarWidth(masterFlexboxRef.current.clientWidth - 760); + } else { + setMaxDocumentSidebarWidth(masterFlexboxRef.current.clientWidth - 660); + } } }; useEffect(() => { @@ -371,7 +374,7 @@ export const Chat = ({ {messageHistory.length === 0 && !isStreaming && (
-
+
-
+
-
+