mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-06-07 06:06:20 -04:00
UI: Only add a blank space to streaming messages in instruct mode
This commit is contained in:
parent
71fa046c17
commit
e3bba510d4
3 changed files with 3 additions and 3 deletions
|
@ -390,7 +390,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
|
|||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-y: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
word-break: break-word;
|
||||
|
|
|
@ -152,7 +152,7 @@ const observer = new MutationObserver(function(mutations) {
|
|||
}
|
||||
|
||||
const chatElement = document.getElementById("chat");
|
||||
if (chatElement) {
|
||||
if (chatElement && chatElement.getAttribute("data-mode") === "instruct") {
|
||||
const messagesContainer = chatElement.querySelector(".messages");
|
||||
const lastChild = messagesContainer?.lastElementChild;
|
||||
const prevSibling = lastChild?.previousElementSibling;
|
||||
|
|
|
@ -347,7 +347,7 @@ remove_button = f'<button class="footer-button footer-remove-button" title="Remo
|
|||
|
||||
|
||||
def generate_instruct_html(history):
|
||||
output = f'<style>{instruct_css}</style><div class="chat" id="chat"><div class="messages">'
|
||||
output = f'<style>{instruct_css}</style><div class="chat" id="chat" data-mode="instruct"><div class="messages">'
|
||||
|
||||
for i in range(len(history['visible'])):
|
||||
row_visible = history['visible'][i]
|
||||
|
|
Loading…
Add table
Reference in a new issue