diff --git a/koboldai_settings.py b/koboldai_settings.py index b54f615d..47621523 100644 --- a/koboldai_settings.py +++ b/koboldai_settings.py @@ -111,7 +111,10 @@ class koboldai_vars(object): def calc_ai_text(self, submitted_text=""): token_budget = self.max_length used_world_info = [] - used_tokens = self.sp_length + if self.tokenizer is None: + used_tokens = 99999999999999999999999 + else: + used_tokens = self.sp_length text = "" self.worldinfo_v2.reset_used_in_game() diff --git a/static/koboldai.css b/static/koboldai.css index 4801e28e..cc6b33c2 100644 --- a/static/koboldai.css +++ b/static/koboldai.css @@ -182,7 +182,7 @@ input[type="range"]::-ms-fill-upper { grid-template-areas: "label value" "item item" "minlabel maxlabel"; - grid-template-rows: 20px 20px 20px; + grid-template-rows: 20px 23px 20px; grid-template-columns: 147px 30px; row-gap: 0.2em; background-color: var(--setting_background); @@ -366,6 +366,10 @@ input[type="range"]::-ms-fill-upper { margin: 25px 0 0 10px; } +.Model_Icon{ + text-align: center; +} + #model_title{ font-size: x-large; text-align: center; @@ -382,10 +386,12 @@ input[type="range"]::-ms-fill-upper { position: relative; } +/* .story_title_area .var_sync_story_story_name { border-bottom: 1px solid; padding-bottom: 3px; } +*/ .story_title_area .var_sync_story_story_name[contenteditable="true"]:active, .story_title_area .var_sync_story_story_name[contenteditable="true"]:focus{ @@ -399,6 +405,10 @@ input[type="range"]::-ms-fill-upper { .story_title { font-size: x-large; text-align: center; + border-bottom: 1px; + border-bottom-style: solid; + margin-left: 40px; + margin-right: 40px; } #text_storyname{ font-size: small; diff --git a/static/koboldai.js b/static/koboldai.js index 755f4953..b8a90272 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -1195,7 +1195,11 @@ function world_info_entry(data) { delete_icon.setAttribute("title", data.title); delete_icon.onclick = function () { if (confirm("This will delete world info "+this.getAttribute("title"))) { - socket.emit("delete_world_info", this.getAttribute("uid")); + if (this.getAttribute("uid") == "-1") { + this.parentElement.parentElement.remove(); + } else { + socket.emit("delete_world_info", this.getAttribute("uid")); + } } } tags = world_info_card.querySelector('#world_info_tags_'); @@ -1280,7 +1284,7 @@ function world_info_entry(data) { assign_world_info_to_action(null, data.uid); update_token_lengths(); - + return world_info_card; } function world_info_folder(data) { @@ -1943,7 +1947,8 @@ function create_new_wi_entry(folder) { "token_length": 0, "selective": false }; - world_info_entry(data); + card = world_info_entry(data); + card.scrollIntoView(false); } function hide_wi_folder(folder) { diff --git a/templates/settings flyout.html b/templates/settings flyout.html index 919c8752..1082b2bd 100644 --- a/templates/settings flyout.html +++ b/templates/settings flyout.html @@ -44,8 +44,10 @@