Only open side panel as drawer in mobile view

This commit is contained in:
Debanjum Singh Solanky
2024-07-14 14:08:41 +05:30
parent b47f30ad77
commit 47b754c07b
2 changed files with 8 additions and 21 deletions

View File

@@ -119,10 +119,8 @@ export default function Chat() {
welcomeConsole();
const handleWebSocketMessage = (event: MessageEvent) => {
let chunk = event.data;
let currentMessage = messages.find(message => !message.completed);
if (!currentMessage) {
@@ -165,7 +163,6 @@ export default function Chat() {
} finally {
// no-op
}
} else {
// Update the current message with the new chunk
if (chunk && chunk.includes("### compiled references:")) {
@@ -179,7 +176,6 @@ export default function Chat() {
// If the chunk is not a JSON object, just display it as is
currentMessage.rawResponse += chunk;
}
}
};
// Update the state with the new message, currentMessage
@@ -269,7 +265,9 @@ export default function Chat() {
<SidePanel
webSocketConnected={chatWS !== null}
conversationId={conversationId}
uploadedFiles={uploadedFiles} />
uploadedFiles={uploadedFiles}
isMobileWidth={isMobileWidth}
/>
</div>
<div className={styles.chatBox}>
<NavMenu selected="Chat" title={title} />