mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix for horde/API
This commit is contained in:
@@ -5052,7 +5052,7 @@ def core_generate(text: list, min: int, max: int, found_entries: set, is_core: b
|
||||
do_dynamic_wi=koboldai_vars.dynamicscan,
|
||||
batch_count=numseqs,
|
||||
# Real max length is handled by CoreStopper.
|
||||
bypass_hf_maxlength=True,
|
||||
bypass_hf_maxlength=koboldai_vars.dynamicscan,
|
||||
is_core=True,
|
||||
)
|
||||
|
||||
|
@@ -1642,6 +1642,7 @@ function world_info_entry(data) {
|
||||
title.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
title.onblur = function () {
|
||||
this.parentElement.parentElement.setAttribute('draggable', 'true');
|
||||
this.setAttribute('draggable', 'true');
|
||||
if (this.textContent != this.getAttribute("original_text")) {
|
||||
world_info_data[this.getAttribute('uid')]['title'] = this.textContent;
|
||||
send_world_info(this.getAttribute('uid'));
|
||||
@@ -1742,8 +1743,9 @@ function world_info_entry(data) {
|
||||
input = document.createElement("input");
|
||||
input.setAttribute("contenteditable", true);
|
||||
input.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
input.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');};
|
||||
input.onblur=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');};
|
||||
input.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');};
|
||||
input.onblur=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');this.setAttribute('draggable', 'true');};
|
||||
input.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
input.value = attribute;
|
||||
input.type = "text";
|
||||
input.setAttribute("uid", data.uid);
|
||||
@@ -1764,8 +1766,9 @@ function world_info_entry(data) {
|
||||
input.setAttribute("contenteditable", true);
|
||||
input.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
input.onchange = function() {do_wpp(this.parentElement.parentElement)};
|
||||
input.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');};
|
||||
input.onblur=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');};
|
||||
input.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');};
|
||||
input.onblur=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');this.setAttribute('draggable', 'true');};
|
||||
input.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
input.value = value;
|
||||
input.setAttribute("uid", data.uid);
|
||||
input.setAttribute("data_type", "value");
|
||||
@@ -1781,8 +1784,9 @@ function world_info_entry(data) {
|
||||
input.type = "text";
|
||||
input.setAttribute("contenteditable", true);
|
||||
input.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
input.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');};
|
||||
input.onblur=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');};
|
||||
input.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');};
|
||||
input.onblur=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');this.setAttribute('draggable', 'true');};
|
||||
input.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
input.setAttribute("uid", data.uid);
|
||||
input.setAttribute("data_type", "value");
|
||||
input.id = "wpp_"+data.uid+"_value_"+i+"_blank";
|
||||
@@ -1802,8 +1806,8 @@ function world_info_entry(data) {
|
||||
input.type = "text";
|
||||
input.setAttribute("contenteditable", true);
|
||||
input.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
input.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');};
|
||||
input.onblur=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');};
|
||||
input.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');};
|
||||
input.onblur=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');this.setAttribute('draggable', 'true');};
|
||||
input.setAttribute("uid", data.uid);
|
||||
input.setAttribute("value_num", i);
|
||||
input.setAttribute("data_type", "attribute");
|
||||
@@ -3056,8 +3060,6 @@ function add_tags(tags, data) {
|
||||
for (tag of data.key) {
|
||||
tag_item = document.createElement("span");
|
||||
tag_item.classList.add("tag");
|
||||
tag_item.setAttribute("draggable", true);
|
||||
tag_item.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
x = document.createElement("span");
|
||||
x.textContent = "x ";
|
||||
x.classList.add("delete_icon");
|
||||
@@ -3074,9 +3076,12 @@ function add_tags(tags, data) {
|
||||
text.setAttribute("uid", data.uid);
|
||||
text.setAttribute("tag", tag);
|
||||
text.id = "world_info_tags_text_"+data.uid+"_"+tag;
|
||||
text.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');};
|
||||
text.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
text.setAttribute("draggable", "true");
|
||||
text.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');};
|
||||
text.onblur = function () {
|
||||
this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');
|
||||
this.setAttribute('draggable', 'true');
|
||||
for (var i = 0; i < world_info_data[this.getAttribute('uid')]['key'].length; i++) {
|
||||
if (world_info_data[this.getAttribute('uid')]['key'][i] == this.getAttribute("tag")) {
|
||||
world_info_data[this.getAttribute('uid')]['key'][i] = this.textContent;
|
||||
@@ -3102,9 +3107,12 @@ function add_tags(tags, data) {
|
||||
text.setAttribute("uid", data.uid);
|
||||
text.setAttribute("contenteditable", true);
|
||||
text.id = "world_info_tags_text_"+data.uid+"_blank";
|
||||
text.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');};
|
||||
text.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
text.setAttribute("draggable", "true");
|
||||
text.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');};
|
||||
text.onblur = function () {
|
||||
this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');
|
||||
this.setAttribute('draggable', 'true');
|
||||
if (this.textContent != "") {
|
||||
//console.log(this.textContent);
|
||||
on_new_wi_item = this.id;
|
||||
@@ -3127,7 +3135,6 @@ function add_secondary_tags(tags, data) {
|
||||
for (tag of data.keysecondary) {
|
||||
tag_item = document.createElement("span");
|
||||
tag_item.classList.add("tag");
|
||||
tag_item.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
x = document.createElement("span");
|
||||
x.textContent = "x ";
|
||||
x.classList.add("delete_icon");
|
||||
@@ -3144,9 +3151,12 @@ function add_secondary_tags(tags, data) {
|
||||
text.setAttribute("uid", data.uid);
|
||||
text.setAttribute("tag", tag);
|
||||
text.id = "world_info_secondtags_text_"+data.uid+"_"+tag;
|
||||
text.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');};
|
||||
text.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
text.setAttribute("draggable", "true");
|
||||
text.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');};
|
||||
text.onblur = function () {
|
||||
this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');
|
||||
this.setAttribute('draggable', 'true');
|
||||
for (var i = 0; i < world_info_data[this.getAttribute('uid')]['keysecondary'].length; i++) {
|
||||
if (world_info_data[this.getAttribute('uid')]['keysecondary'][i] == this.getAttribute("tag")) {
|
||||
world_info_data[this.getAttribute('uid')]['keysecondary'][i] = this.textContent;
|
||||
@@ -3172,9 +3182,12 @@ function add_secondary_tags(tags, data) {
|
||||
text.setAttribute("uid", data.uid);
|
||||
text.setAttribute("contenteditable", true);
|
||||
text.id = "world_info_secondtags_text_"+data.uid+"_blank";
|
||||
text.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');};
|
||||
text.ondragstart=function() {event.preventDefault();event.stopPropagation();};
|
||||
text.setAttribute("draggable", "true");
|
||||
text.onfocus=function() {this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');};
|
||||
text.onblur = function () {
|
||||
this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');
|
||||
this.setAttribute('draggable', 'true');
|
||||
if (this.textContent != "") {
|
||||
on_new_wi_item = this.id;
|
||||
world_info_data[this.getAttribute('uid')]['keysecondary'].push(this.textContent);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<div draggable="true" class="world_info_card" id="world_info_">
|
||||
<div class="world_info_title_area">
|
||||
<h4 draggable="true" ondragstart="event.preventDefault();event.stopPropagation();" id="world_info_title_"
|
||||
class="world_info_title" onfocus="this.parentElement.parentElement.setAttribute('draggable', 'false');"></h4>
|
||||
class="world_info_title" onfocus="this.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');"></h4>
|
||||
<span id="world_info_delete_" class="world_info_delete">X</span>
|
||||
</div>
|
||||
<div class="world_info_tag_area" id="world_info_toggle_area_">
|
||||
@@ -25,17 +25,18 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>Type:</td>
|
||||
<td><input draggable="true" ondragstart="event.preventDefault();event.stopPropagation();" type=text id="wpp_type_"
|
||||
<td><input draggable="true" type=text id="wpp_type_"
|
||||
onchange="do_wpp(this.parentElement.parentElement.parentElement.parentElement.parentElement)"
|
||||
onfocus="this.parentElement.parentElement.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');"
|
||||
onblur="this.parentElement.parentElement.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');"></td>
|
||||
onfocus="console.log('focus');this.parentElement.parentElement.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');"
|
||||
onblur="console.log('blur');this.parentElement.parentElement.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');this.setAttribute('draggable', 'true');"
|
||||
ondragstart="event.preventDefault();event.stopPropagation();" ></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name:</td>
|
||||
<td><input draggable="true" ondragstart="event.preventDefault();event.stopPropagation();" type=text id="wpp_name_"
|
||||
onchange="do_wpp(this.parentElement.parentElement.parentElement.parentElement.parentElement)"
|
||||
onfocus="this.parentElement.parentElement.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');"
|
||||
onblur="this.parentElement.parentElement.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');"></td>
|
||||
onfocus="this.parentElement.parentElement.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');"
|
||||
onblur="this.parentElement.parentElement.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');this.setAttribute('draggable', 'true');"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -43,19 +44,20 @@
|
||||
<div id="world_info_basic_text_">
|
||||
Text:
|
||||
<textarea draggable="true" ondragstart="event.preventDefault();event.stopPropagation();" id="world_info_entry_text_" class="world_info_text fullwidth" oninput="autoResize(this, 60)"
|
||||
onfocus="this.parentElement.parentElement.setAttribute('draggable', 'false');autoResize(this, 60)" onblur="this.parentElement.parentElement.setAttribute('draggable', 'true');this.style.height='60px';"></textarea>
|
||||
onfocus="this.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');autoResize(this, 60)"
|
||||
onblur="this.parentElement.parentElement.setAttribute('draggable', 'true');this.setAttribute('draggable', 'true');this.style.height='60px';"></textarea>
|
||||
</div>
|
||||
<div id="world_info_entry_w++_" class="hidden">
|
||||
<input draggable="true" ondragstart="event.preventDefault();event.stopPropagation();" type=text placeholder="Type"
|
||||
onfocus="this.parentElement.parentElement.setAttribute('draggable', 'false');"
|
||||
onblur="this.parentElement.parentElement.setAttribute('draggable', 'false');"/>
|
||||
onfocus="this.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');"
|
||||
onblur="this.parentElement.parentElement.setAttribute('draggable', 'true');this.setAttribute('draggable', 'true');"/>
|
||||
<input type=text placeholder="Name"
|
||||
onfocus="this.parentElement.parentElement.setAttribute('draggable', 'false');"
|
||||
onblur="this.parentElement.parentElement.setAttribute('draggable', 'false');"/>
|
||||
onblur="this.parentElement.parentElement.setAttribute('draggable', 'true');"/>
|
||||
<div>
|
||||
<input draggable="true" ondragstart="event.preventDefault();event.stopPropagation();" type=text placeholder="attribute"
|
||||
onfocus="this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');"
|
||||
onblur="this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');"/>
|
||||
onfocus="this.parentElement.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');"
|
||||
onblur="this.parentElement.parentElement.parentElement.setAttribute('draggable', 'true');this.setAttribute('draggable', 'true');"/>
|
||||
<input type=text placeholder="value"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,8 +65,8 @@
|
||||
Comment:
|
||||
<textarea draggable="true" ondragstartondragstart="event.preventDefault();event.stopPropagation();" rows=1 id="world_info_comment_"
|
||||
class="world_info_text fullwidth" oninput="autoResize(this, 60)" onfocus="autoResize(this, 60)" onblur="this.style.height='60px';"
|
||||
onfocus="this.parentElement.parentElement.setAttribute('draggable', 'false');"
|
||||
onblur="this.parentElement.parentElement.setAttribute('draggable', 'false');"></textarea>
|
||||
onfocus="this.parentElement.parentElement.setAttribute('draggable', 'false');this.setAttribute('draggable', 'false');;"
|
||||
onblur="this.parentElement.parentElement.setAttribute('draggable', 'true');this.setAttribute('draggable', 'true');"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id="empty_bias">
|
||||
|
Reference in New Issue
Block a user