mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-04 19:37:51 +01:00
Fix arbitrary newline insertion when token streaming is enabled
In adventure mode with token streaming enabled, retrying after an action would cause a <br> element to be inserted into the action. This prevents the insertion of the <br> if token streaming is enabled.
This commit is contained in:
parent
050e195420
commit
32ad83df8e
@ -2351,7 +2351,12 @@ $(document).ready(function(){
|
||||
var element = game_text.children('#n' + index);
|
||||
if(element.length) {
|
||||
unbindGametext();
|
||||
if((element[0].nextSibling === null || element[0].nextSibling.nodeType !== 1 || element[0].nextSibling.tagName !== "CHUNK") && element[0].previousSibling !== null && element[0].previousSibling.tagName === "CHUNK") {
|
||||
if(
|
||||
(element[0].nextSibling === null || element[0].nextSibling.nodeType !== 1 || element[0].nextSibling.tagName !== "CHUNK")
|
||||
&& element[0].previousSibling !== null
|
||||
&& element[0].previousSibling.tagName === "CHUNK"
|
||||
&& !$("#setoutputstreaming")[0].checked
|
||||
) {
|
||||
element[0].previousSibling.appendChild(document.createElement("br"));
|
||||
}
|
||||
element.remove(); // Remove the chunk
|
||||
|
Loading…
x
Reference in New Issue
Block a user