mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
WI delete bug fix
This commit is contained in:
@@ -111,6 +111,9 @@ class koboldai_vars(object):
|
|||||||
def calc_ai_text(self, submitted_text=""):
|
def calc_ai_text(self, submitted_text=""):
|
||||||
token_budget = self.max_length
|
token_budget = self.max_length
|
||||||
used_world_info = []
|
used_world_info = []
|
||||||
|
if self.tokenizer is None:
|
||||||
|
used_tokens = 99999999999999999999999
|
||||||
|
else:
|
||||||
used_tokens = self.sp_length
|
used_tokens = self.sp_length
|
||||||
text = ""
|
text = ""
|
||||||
|
|
||||||
|
@@ -182,7 +182,7 @@ input[type="range"]::-ms-fill-upper {
|
|||||||
grid-template-areas: "label value"
|
grid-template-areas: "label value"
|
||||||
"item item"
|
"item item"
|
||||||
"minlabel maxlabel";
|
"minlabel maxlabel";
|
||||||
grid-template-rows: 20px 20px 20px;
|
grid-template-rows: 20px 23px 20px;
|
||||||
grid-template-columns: 147px 30px;
|
grid-template-columns: 147px 30px;
|
||||||
row-gap: 0.2em;
|
row-gap: 0.2em;
|
||||||
background-color: var(--setting_background);
|
background-color: var(--setting_background);
|
||||||
@@ -366,6 +366,10 @@ input[type="range"]::-ms-fill-upper {
|
|||||||
margin: 25px 0 0 10px;
|
margin: 25px 0 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Model_Icon{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
#model_title{
|
#model_title{
|
||||||
font-size: x-large;
|
font-size: x-large;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -382,10 +386,12 @@ input[type="range"]::-ms-fill-upper {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
.story_title_area .var_sync_story_story_name {
|
.story_title_area .var_sync_story_story_name {
|
||||||
border-bottom: 1px solid;
|
border-bottom: 1px solid;
|
||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
.story_title_area .var_sync_story_story_name[contenteditable="true"]:active,
|
.story_title_area .var_sync_story_story_name[contenteditable="true"]:active,
|
||||||
.story_title_area .var_sync_story_story_name[contenteditable="true"]:focus{
|
.story_title_area .var_sync_story_story_name[contenteditable="true"]:focus{
|
||||||
@@ -399,6 +405,10 @@ input[type="range"]::-ms-fill-upper {
|
|||||||
.story_title {
|
.story_title {
|
||||||
font-size: x-large;
|
font-size: x-large;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
border-bottom: 1px;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
margin-left: 40px;
|
||||||
|
margin-right: 40px;
|
||||||
}
|
}
|
||||||
#text_storyname{
|
#text_storyname{
|
||||||
font-size: small;
|
font-size: small;
|
||||||
|
@@ -1195,9 +1195,13 @@ function world_info_entry(data) {
|
|||||||
delete_icon.setAttribute("title", data.title);
|
delete_icon.setAttribute("title", data.title);
|
||||||
delete_icon.onclick = function () {
|
delete_icon.onclick = function () {
|
||||||
if (confirm("This will delete world info "+this.getAttribute("title"))) {
|
if (confirm("This will delete world info "+this.getAttribute("title"))) {
|
||||||
|
if (this.getAttribute("uid") == "-1") {
|
||||||
|
this.parentElement.parentElement.remove();
|
||||||
|
} else {
|
||||||
socket.emit("delete_world_info", this.getAttribute("uid"));
|
socket.emit("delete_world_info", this.getAttribute("uid"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
tags = world_info_card.querySelector('#world_info_tags_');
|
tags = world_info_card.querySelector('#world_info_tags_');
|
||||||
tags.id = "world_info_tags_"+data.uid;
|
tags.id = "world_info_tags_"+data.uid;
|
||||||
//add tag content here
|
//add tag content here
|
||||||
@@ -1280,7 +1284,7 @@ function world_info_entry(data) {
|
|||||||
assign_world_info_to_action(null, data.uid);
|
assign_world_info_to_action(null, data.uid);
|
||||||
|
|
||||||
update_token_lengths();
|
update_token_lengths();
|
||||||
|
return world_info_card;
|
||||||
}
|
}
|
||||||
|
|
||||||
function world_info_folder(data) {
|
function world_info_folder(data) {
|
||||||
@@ -1943,7 +1947,8 @@ function create_new_wi_entry(folder) {
|
|||||||
"token_length": 0,
|
"token_length": 0,
|
||||||
"selective": false
|
"selective": false
|
||||||
};
|
};
|
||||||
world_info_entry(data);
|
card = world_info_entry(data);
|
||||||
|
card.scrollIntoView(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide_wi_folder(folder) {
|
function hide_wi_folder(folder) {
|
||||||
|
@@ -44,8 +44,10 @@
|
|||||||
<div id="text_runningmodel">
|
<div id="text_runningmodel">
|
||||||
<b>Running Model: </b>
|
<b>Running Model: </b>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="Model_Icon">
|
||||||
<button class="btn action_button" onclick="socket.emit('load_model_button', {});">Load Model</button>
|
<span class="material-icons-outlined cursor" title="Load Model" onclick="socket.emit('load_model_button', {});">folder_open</span>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: center;">
|
||||||
<select class="var_sync_model_selected_preset settings_select presets" onchange='sync_to_server(this)'><option>Preset</option></select>
|
<select class="var_sync_model_selected_preset settings_select presets" onchange='sync_to_server(this)'><option>Preset</option></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user