From f42074b6c121f033046e12a19bc99a892d46bbbc Mon Sep 17 00:00:00 2001 From: Lounger Date: Tue, 19 Dec 2023 23:27:11 +0100 Subject: [PATCH 01/20] UI: Remove header margin on chat tab --- css/main.css | 6 +++++- js/main.js | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/css/main.css b/css/main.css index 33feb179..50eef6c3 100644 --- a/css/main.css +++ b/css/main.css @@ -91,7 +91,7 @@ div.svelte-15lo0d8 > *, div.svelte-15lo0d8 > .form > * { .header_bar { background-color: #f7f7f7; - margin-bottom: 19px; + margin-bottom: 0px; overflow-x: scroll; margin-left: calc(-1 * var(--size-4)); margin-right: calc(-1 * var(--size-4)); @@ -299,6 +299,10 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { width: 100%; } +#chat-tab { + padding-top: 0px; +} + #chat-tab button#Generate, #chat-tab button#stop { width: 89.3438px !important; } diff --git a/js/main.js b/js/main.js index 9f10915d..c0fe3e30 100644 --- a/js/main.js +++ b/js/main.js @@ -18,9 +18,11 @@ document.querySelector(".header_bar").addEventListener("click", function(event) if (chat_visible || notebook_visible || default_visible) { extensions.style.display = "flex"; if (chat_visible) { + this.style.marginBottom = "0px"; extensions.style.maxWidth = "880px"; extensions.style.padding = "0px"; } else { + this.style.marginBottom = "19px"; extensions.style.maxWidth = "none"; extensions.style.padding = "15px"; } From 40d5bf6c354b94835d0d3c56e63d5cf6002b6b9e Mon Sep 17 00:00:00 2001 From: Lounger Date: Tue, 19 Dec 2023 23:42:13 +0100 Subject: [PATCH 02/20] Set margin on other tabs too --- js/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/main.js b/js/main.js index c0fe3e30..62e78645 100644 --- a/js/main.js +++ b/js/main.js @@ -27,6 +27,7 @@ document.querySelector(".header_bar").addEventListener("click", function(event) extensions.style.padding = "15px"; } } else { + this.style.marginBottom = "19px"; extensions.style.display = "none"; } } From ff3e845b046cffe741a29295eeefce859a995dcf Mon Sep 17 00:00:00 2001 From: Lounger Date: Wed, 20 Dec 2023 01:24:34 +0100 Subject: [PATCH 03/20] UI: Header boy is dropping shadows --- css/main.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/css/main.css b/css/main.css index 50eef6c3..ffb4741f 100644 --- a/css/main.css +++ b/css/main.css @@ -91,16 +91,19 @@ div.svelte-15lo0d8 > *, div.svelte-15lo0d8 > .form > * { .header_bar { background-color: #f7f7f7; + box-shadow: 0 2px 3px rgba(22 22 22 / 35%); margin-bottom: 0px; overflow-x: scroll; margin-left: calc(-1 * var(--size-4)); margin-right: calc(-1 * var(--size-4)); display: block !important; text-wrap: nowrap; + z-index: 90; } .dark .header_bar { border: none !important; + box-shadow: 0 3px 4px rgba(20 20 20 / 60%); background-color: #8080802b; } From f9accd38e092cbf8ac1829f9f67554260ae859b0 Mon Sep 17 00:00:00 2001 From: Lounger Date: Wed, 20 Dec 2023 02:54:08 +0100 Subject: [PATCH 04/20] UI: Update chat instruct styles --- css/html_instruct_style.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/css/html_instruct_style.css b/css/html_instruct_style.css index 5a439304..03bff511 100644 --- a/css/html_instruct_style.css +++ b/css/html_instruct_style.css @@ -1,9 +1,14 @@ +.chat-parent { + border-radius: 0 0 0 8px !important; +} + .chat { background: var(--block-background-fill); padding: 24px 19px; padding-right: 19px !important; border: 1px solid var(--block-border-color); - border-radius: 8px; + border-top: none; + border-radius: 0 0 0 8px !important; } .message { From e3e053ab995a2e9e69757a8df31a7452ef0f7557 Mon Sep 17 00:00:00 2001 From: Lounger Date: Thu, 21 Dec 2023 03:42:23 +0100 Subject: [PATCH 05/20] UI: Expand chat vertically and handle header wrapping --- css/main.css | 14 +++----------- js/main.js | 15 +++++++++------ 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/css/main.css b/css/main.css index ffb4741f..d9afc8a9 100644 --- a/css/main.css +++ b/css/main.css @@ -325,14 +325,6 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { padding-left: 0; padding-right: 0; } - - .chat-parent { - height: calc(100dvh - 179px) !important; - } - - .old-ui .chat-parent { - height: calc(100dvh - 310px) !important; - } } .chat { @@ -349,16 +341,16 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { } .chat-parent { - height: calc(100dvh - 181px); + height: calc(100dvh - 113px - var(--chat-input-offset)); overflow: auto !important; } .old-ui .chat-parent { - height: calc(100dvh - 270px); + height: calc(100dvh - 207px - var(--chat-input-offset)); } .chat-parent.bigchat { - height: calc(100dvh - 181px) !important; + height: calc(100dvh - 113px - var(--chat-input-offset)) !important; } .chat > .messages { diff --git a/js/main.js b/js/main.js index 62e78645..e3573d82 100644 --- a/js/main.js +++ b/js/main.js @@ -126,7 +126,7 @@ targetElement.addEventListener("scroll", function() { // Create a MutationObserver instance const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { - updateChatHeight(); + updateCssProperties(); if(!isScrolled) { targetElement.scrollTop = targetElement.scrollHeight; @@ -329,14 +329,17 @@ function toggleBigPicture() { } //------------------------------------------------ -// Define the --chat-height global CSS variable to -// the height of the chat parent +// Define global CSS properties for resizing and +// positioning certain elements //------------------------------------------------ -function updateChatHeight() { +function updateCssProperties() { const chatContainer = document.getElementById('chat').parentNode.parentNode.parentNode; const newChatHeight = `${chatContainer.clientHeight}px`; - document.documentElement.style.setProperty('--chat-height', newChatHeight); + + const header = document.querySelector('.header_bar'); + const chatInputOffset = `${header.clientHeight}px`; + document.documentElement.style.setProperty('--chat-input-offset', chatInputOffset); } -window.addEventListener('resize', updateChatHeight); +window.addEventListener('resize', updateCssProperties); From 6fbd64db72aa37b9c1157068b4cc22a8c91917b0 Mon Sep 17 00:00:00 2001 From: Lounger Date: Thu, 21 Dec 2023 05:00:56 +0100 Subject: [PATCH 06/20] Set borders for all chat styles --- css/html_instruct_style.css | 6 ------ css/main.css | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/css/html_instruct_style.css b/css/html_instruct_style.css index 03bff511..78f9b53e 100644 --- a/css/html_instruct_style.css +++ b/css/html_instruct_style.css @@ -1,14 +1,8 @@ -.chat-parent { - border-radius: 0 0 0 8px !important; -} - .chat { background: var(--block-background-fill); padding: 24px 19px; padding-right: 19px !important; border: 1px solid var(--block-border-color); - border-top: none; - border-radius: 0 0 0 8px !important; } .message { diff --git a/css/main.css b/css/main.css index d9afc8a9..9bb770b9 100644 --- a/css/main.css +++ b/css/main.css @@ -338,11 +338,14 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { flex-direction: column; word-break: break-word; overflow-wrap: anywhere; + border-top: none; + border-radius: 0 0 8px 8px !important; } .chat-parent { height: calc(100dvh - 113px - var(--chat-input-offset)); overflow: auto !important; + border-radius: 0 0 8px 8px !important; } .old-ui .chat-parent { From 0dd759c44f8d3468cf0841b142f2c434c34fa299 Mon Sep 17 00:00:00 2001 From: Lounger Date: Thu, 21 Dec 2023 05:42:06 +0100 Subject: [PATCH 07/20] Claim more vertical space --- css/main.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/css/main.css b/css/main.css index 9bb770b9..82087911 100644 --- a/css/main.css +++ b/css/main.css @@ -343,17 +343,17 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { } .chat-parent { - height: calc(100dvh - 113px - var(--chat-input-offset)); + height: calc(100dvh - 98px - var(--chat-input-offset)); overflow: auto !important; border-radius: 0 0 8px 8px !important; } .old-ui .chat-parent { - height: calc(100dvh - 207px - var(--chat-input-offset)); + height: calc(100dvh - 192px - var(--chat-input-offset)); } .chat-parent.bigchat { - height: calc(100dvh - 113px - var(--chat-input-offset)) !important; + height: calc(100dvh - 98px - var(--chat-input-offset)) !important; } .chat > .messages { @@ -626,11 +626,11 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { } #chat-col { - padding-bottom: 115px; + padding-bottom: 100px; } .old-ui #chat-col, #chat-col.bigchat { - padding-bottom: 95px !important; + padding-bottom: 80px !important; } .old-ui #chat-buttons #clear-history-confirm { From 568541aa31ea5c0cf7f38dabf8e3eae52347ea17 Mon Sep 17 00:00:00 2001 From: Lounger <4087076+TheLounger@users.noreply.github.com> Date: Thu, 21 Dec 2023 21:48:34 +0100 Subject: [PATCH 08/20] Remove bottom padding on chat tab --- css/main.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/main.css b/css/main.css index 82087911..bc6a2543 100644 --- a/css/main.css +++ b/css/main.css @@ -304,6 +304,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { #chat-tab { padding-top: 0px; + padding-bottom: 0px; } #chat-tab button#Generate, #chat-tab button#stop { From 588b37c03254d6d5eb17bf4e830ebdc91a8cc656 Mon Sep 17 00:00:00 2001 From: Lounger <4087076+TheLounger@users.noreply.github.com> Date: Thu, 21 Dec 2023 22:04:41 +0100 Subject: [PATCH 09/20] Add slight padding to top of message container --- css/main.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/main.css b/css/main.css index bc6a2543..6a61b7f8 100644 --- a/css/main.css +++ b/css/main.css @@ -360,6 +360,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { .chat > .messages { display: flex; flex-direction: column; + padding-top: 8px; } .chat .message:last-child { From 554a8f910b1182b3a2ab6b860f3cc0951065d687 Mon Sep 17 00:00:00 2001 From: Lounger <4087076+TheLounger@users.noreply.github.com> Date: Fri, 22 Dec 2023 04:51:20 +0100 Subject: [PATCH 10/20] Attempt at shrinking chat area when input box grows --- css/main.css | 2 +- js/main.js | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/css/main.css b/css/main.css index 6a61b7f8..405a522d 100644 --- a/css/main.css +++ b/css/main.css @@ -332,7 +332,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { margin-left: auto; margin-right: auto; max-width: 880px; - min-height: var(--chat-height); + height: var(--chat-height); overflow-y: auto; padding-right: 15px; display: flex; diff --git a/js/main.js b/js/main.js index e3573d82..35fe99d5 100644 --- a/js/main.js +++ b/js/main.js @@ -332,14 +332,28 @@ function toggleBigPicture() { // Define global CSS properties for resizing and // positioning certain elements //------------------------------------------------ +let currentChatInputHeight = 0; + function updateCssProperties() { + // Set the height of the chat area const chatContainer = document.getElementById('chat').parentNode.parentNode.parentNode; - const newChatHeight = `${chatContainer.clientHeight}px`; + const chatInputHeight = document.querySelector('#chat-input textarea').clientHeight; + const newChatHeight = `${chatContainer.clientHeight - chatInputHeight + 40}px`; document.documentElement.style.setProperty('--chat-height', newChatHeight); + // Set the position offset of the chat input box const header = document.querySelector('.header_bar'); const chatInputOffset = `${header.clientHeight}px`; document.documentElement.style.setProperty('--chat-input-offset', chatInputOffset); + + // Offset the scroll position of the chat area + if (chatInputHeight !== currentChatInputHeight) { + chatContainer.scrollTop += chatInputHeight > currentChatInputHeight ? chatInputHeight : -chatInputHeight; + currentChatInputHeight = chatInputHeight; + } } +new ResizeObserver(updateCssProperties) + .observe(document.querySelector('#chat-input textarea')); + window.addEventListener('resize', updateCssProperties); From 73ba7a89210f9db2e6597d708a0d13ee73a7308c Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Dec 2023 08:32:02 -0800 Subject: [PATCH 11/20] Change height -> min-height for .chat --- css/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/main.css b/css/main.css index 405a522d..6a61b7f8 100644 --- a/css/main.css +++ b/css/main.css @@ -332,7 +332,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { margin-left: auto; margin-right: auto; max-width: 880px; - height: var(--chat-height); + min-height: var(--chat-height); overflow-y: auto; padding-right: 15px; display: flex; From 18ca35faaa9e8fb52da368bf9eb156a46e9c7b84 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Dec 2023 08:34:02 -0800 Subject: [PATCH 12/20] Space between chat tab and extensions block --- css/main.css | 1 - 1 file changed, 1 deletion(-) diff --git a/css/main.css b/css/main.css index 6a61b7f8..f7eef32a 100644 --- a/css/main.css +++ b/css/main.css @@ -304,7 +304,6 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { #chat-tab { padding-top: 0px; - padding-bottom: 0px; } #chat-tab button#Generate, #chat-tab button#stop { From ae927950a8f327a537c04d312a593425501fd680 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Dec 2023 08:35:33 -0800 Subject: [PATCH 13/20] Remove instruct style border radius --- css/main.css | 1 - 1 file changed, 1 deletion(-) diff --git a/css/main.css b/css/main.css index f7eef32a..937c1052 100644 --- a/css/main.css +++ b/css/main.css @@ -339,7 +339,6 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { word-break: break-word; overflow-wrap: anywhere; border-top: none; - border-radius: 0 0 8px 8px !important; } .chat-parent { From 02d063fb9fd89352be3cd2ad2aa61cbc6818d247 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Dec 2023 08:38:17 -0800 Subject: [PATCH 14/20] Fix extra space after 18ca35faaa9e8fb52da368bf9eb156a46e9c7b84 --- js/show_controls.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/show_controls.js b/js/show_controls.js index 0ba1ecde..cdd6efc4 100644 --- a/js/show_controls.js +++ b/js/show_controls.js @@ -10,6 +10,7 @@ function toggle_controls(value) { chatParent.classList.remove("bigchat"); document.getElementById("chat-input-row").classList.remove("bigchat"); document.getElementById("chat-col").classList.remove("bigchat"); + document.getElementById("chat-tab").style.paddingBottom = ""; let gallery_element = document.getElementById('gallery-extension'); if (gallery_element) { @@ -24,5 +25,6 @@ function toggle_controls(value) { chatParent.classList.add("bigchat"); document.getElementById("chat-input-row").classList.add("bigchat"); document.getElementById("chat-col").classList.add("bigchat"); + document.getElementById("chat-tab").style.paddingBottom = "0px"; } } From 5466ae59a7bbac80a2234d5c069166e9612b1ca0 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Dec 2023 14:07:31 -0800 Subject: [PATCH 15/20] Prevent input/chat area overlap with new --my-delta variable --- css/main.css | 9 ++++++--- js/main.js | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/css/main.css b/css/main.css index 937c1052..d916db44 100644 --- a/css/main.css +++ b/css/main.css @@ -342,17 +342,20 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { } .chat-parent { - height: calc(100dvh - 98px - var(--chat-input-offset)); + height: calc(100dvh - 98px - var(--chat-input-offset) - var(--my-delta)); overflow: auto !important; border-radius: 0 0 8px 8px !important; + margin-bottom: var(--my-delta) !important; } .old-ui .chat-parent { - height: calc(100dvh - 192px - var(--chat-input-offset)); + height: calc(100dvh - 192px - var(--chat-input-offset) - var(--my-delta)); + margin-bottom: var(--my-delta) !important; } .chat-parent.bigchat { - height: calc(100dvh - 98px - var(--chat-input-offset)) !important; + height: calc(100dvh - 98px - var(--chat-input-offset) - var(--my-delta)) !important; + margin-bottom: var(--my-delta) !important; } .chat > .messages { diff --git a/js/main.js b/js/main.js index 35fe99d5..34064774 100644 --- a/js/main.js +++ b/js/main.js @@ -340,6 +340,7 @@ function updateCssProperties() { const chatInputHeight = document.querySelector('#chat-input textarea').clientHeight; const newChatHeight = `${chatContainer.clientHeight - chatInputHeight + 40}px`; document.documentElement.style.setProperty('--chat-height', newChatHeight); + document.documentElement.style.setProperty('--my-delta', `${chatInputHeight - 40}px`); // Set the position offset of the chat input box const header = document.querySelector('.header_bar'); From 8d0359a6d8fb4aca96ee0ea9802480f7747e70d5 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Dec 2023 14:10:07 -0800 Subject: [PATCH 16/20] Rename some CSS variables --- css/main.css | 12 ++++++------ js/main.js | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/css/main.css b/css/main.css index d916db44..4c7dc689 100644 --- a/css/main.css +++ b/css/main.css @@ -342,20 +342,20 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { } .chat-parent { - height: calc(100dvh - 98px - var(--chat-input-offset) - var(--my-delta)); + height: calc(100dvh - 98px - var(--header-height) - var(--input-delta)); overflow: auto !important; border-radius: 0 0 8px 8px !important; - margin-bottom: var(--my-delta) !important; + margin-bottom: var(--input-delta) !important; } .old-ui .chat-parent { - height: calc(100dvh - 192px - var(--chat-input-offset) - var(--my-delta)); - margin-bottom: var(--my-delta) !important; + height: calc(100dvh - 192px - var(--header-height) - var(--input-delta)); + margin-bottom: var(--input-delta) !important; } .chat-parent.bigchat { - height: calc(100dvh - 98px - var(--chat-input-offset) - var(--my-delta)) !important; - margin-bottom: var(--my-delta) !important; + height: calc(100dvh - 98px - var(--header-height) - var(--input-delta)) !important; + margin-bottom: var(--input-delta) !important; } .chat > .messages { diff --git a/js/main.js b/js/main.js index 34064774..f586d421 100644 --- a/js/main.js +++ b/js/main.js @@ -340,12 +340,12 @@ function updateCssProperties() { const chatInputHeight = document.querySelector('#chat-input textarea').clientHeight; const newChatHeight = `${chatContainer.clientHeight - chatInputHeight + 40}px`; document.documentElement.style.setProperty('--chat-height', newChatHeight); - document.documentElement.style.setProperty('--my-delta', `${chatInputHeight - 40}px`); + document.documentElement.style.setProperty('--input-delta', `${chatInputHeight - 40}px`); // Set the position offset of the chat input box const header = document.querySelector('.header_bar'); - const chatInputOffset = `${header.clientHeight}px`; - document.documentElement.style.setProperty('--chat-input-offset', chatInputOffset); + const headerHeight = `${header.clientHeight}px`; + document.documentElement.style.setProperty('--header-height', headerHeight); // Offset the scroll position of the chat area if (chatInputHeight !== currentChatInputHeight) { From abd227594c8620fe8f8d9a4f65f0a76cc716dbd0 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Dec 2023 14:17:00 -0800 Subject: [PATCH 17/20] Fix a border radius --- css/main.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/css/main.css b/css/main.css index 4c7dc689..00d5824e 100644 --- a/css/main.css +++ b/css/main.css @@ -339,12 +339,13 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { word-break: break-word; overflow-wrap: anywhere; border-top: none; + border-radius: 0 0 0 8px; } .chat-parent { height: calc(100dvh - 98px - var(--header-height) - var(--input-delta)); overflow: auto !important; - border-radius: 0 0 8px 8px !important; + border-radius: 0 !important; margin-bottom: var(--input-delta) !important; } From 63553b41ede5827cfc81ada47cf803e439a2b7b6 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Dec 2023 14:25:31 -0800 Subject: [PATCH 18/20] Improve some paddings --- css/html_instruct_style.css | 9 +++++++++ css/main.css | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/css/html_instruct_style.css b/css/html_instruct_style.css index 78f9b53e..130c353a 100644 --- a/css/html_instruct_style.css +++ b/css/html_instruct_style.css @@ -2,9 +2,14 @@ background: var(--block-background-fill); padding: 24px 19px; padding-right: 19px !important; + padding-top: 0px; border: 1px solid var(--block-border-color); } +.chat > .messages { + padding-top: 28px !important; +} + .message { display: grid; grid-template-columns: 60px 1fr; @@ -14,6 +19,10 @@ line-height: 24px; } +.message:first-child { + padding-top: 0; +} + .username { display: none; } diff --git a/css/main.css b/css/main.css index 00d5824e..fa706ba9 100644 --- a/css/main.css +++ b/css/main.css @@ -362,7 +362,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { .chat > .messages { display: flex; flex-direction: column; - padding-top: 8px; + padding-top: 25px; } .chat .message:last-child { From 2ad6c526b8ea5f518f1e1e3f7a395d023a3ed057 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Dec 2023 14:43:12 -0800 Subject: [PATCH 19/20] Check if extensions block exists before changing it --- js/main.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/js/main.js b/js/main.js index f586d421..0828dee4 100644 --- a/js/main.js +++ b/js/main.js @@ -16,19 +16,20 @@ document.querySelector(".header_bar").addEventListener("click", function(event) // Check if one of the generation tabs is visible if (chat_visible || notebook_visible || default_visible) { - extensions.style.display = "flex"; + extensions && (extensions.style.display = "flex"); + if (chat_visible) { this.style.marginBottom = "0px"; - extensions.style.maxWidth = "880px"; - extensions.style.padding = "0px"; + extensions && (extensions.style.maxWidth = "880px"); + extensions && (extensions.style.padding = "0px"); } else { this.style.marginBottom = "19px"; - extensions.style.maxWidth = "none"; - extensions.style.padding = "15px"; + extensions && (extensions.style.maxWidth = "none"); + extensions && (extensions.style.padding = "15px"); } } else { this.style.marginBottom = "19px"; - extensions.style.display = "none"; + extensions && (extensions.style.display = "none"); } } }); From 648c2d1cc22d01ba071650be8f2f68d95b3ff13c Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 25 Dec 2023 15:25:16 -0800 Subject: [PATCH 20/20] Update settings-template.yaml --- settings-template.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/settings-template.yaml b/settings-template.yaml index 8f7e9e9e..8ebbc1ab 100644 --- a/settings-template.yaml +++ b/settings-template.yaml @@ -15,6 +15,7 @@ truncation_length: 2048 truncation_length_min: 0 truncation_length_max: 200000 max_tokens_second: 0 +max_updates_second: 0 custom_stopping_strings: '' custom_token_bans: '' auto_max_new_tokens: false