From 7579137433ee7141488ba00e3ea71fb465e92dd9 Mon Sep 17 00:00:00 2001 From: ebolam Date: Mon, 24 Oct 2022 14:22:18 -0400 Subject: [PATCH] Add automatic hide of the World Info Depth setting when using the alternative text generation method (alt gen ignores World Info Depth) --- gensettings.py | 3 ++- static/koboldai.css | 4 ++++ templates/settings item.html | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gensettings.py b/gensettings.py index c7277638..d97ca42f 100644 --- a/gensettings.py +++ b/gensettings.py @@ -193,7 +193,8 @@ gensettingstf = [ "menu_path": "World Info", "sub_path": "", "classname": "user", - "name": "widepth" + "name": "widepth", + "extra_classes": "var_sync_alt_system_alt_gen" }, { "uitype": "toggle", diff --git a/static/koboldai.css b/static/koboldai.css index 5661650a..3ca0d79a 100644 --- a/static/koboldai.css +++ b/static/koboldai.css @@ -199,6 +199,10 @@ border-top-right-radius: var(--tabs_rounding); margin: 2px; } +.setting_container.var_sync_alt_system_alt_gen[system_alt_gen="true"] { + display: none; +} + .chat_mode[story_chatmode="false"] { display: none; } diff --git a/templates/settings item.html b/templates/settings item.html index ac22d9ea..c429f1ca 100644 --- a/templates/settings item.html +++ b/templates/settings item.html @@ -1,6 +1,10 @@ {% for item in settings %} {% if item["menu_path"] == menu and item['sub_path'] == sub_path %} +{% if 'extra_classes' in item %} +
+{% else %}
+{% endif %} {{ item['label'] }}: help_icon