mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-01-21 12:55:31 +01:00
Merge branch 'main' into united
This commit is contained in:
commit
cf99f02ca5
@ -1911,6 +1911,7 @@ def lua_has_setting(setting):
|
||||
"setchatmode",
|
||||
"setdynamicscan",
|
||||
"setnopromptgen",
|
||||
"autosave",
|
||||
"setrngpersist",
|
||||
"temp",
|
||||
"topp",
|
||||
@ -1962,6 +1963,7 @@ def lua_get_setting(setting):
|
||||
if(setting in ("setchatmode", "chatmode")): return vars.chatmode
|
||||
if(setting in ("setdynamicscan", "dynamicscan")): return vars.dynamicscan
|
||||
if(setting in ("setnopromptgen", "nopromptgen")): return vars.nopromptgen
|
||||
if(setting in ("autosave", "autosave")): return vars.autosave
|
||||
if(setting in ("setrngpersist", "rngpersist")): return vars.rngpersist
|
||||
if(setting in ("frmttriminc", "triminc")): return vars.formatoptns["frmttriminc"]
|
||||
if(setting in ("frmtrmblln", "rmblln")): return vars.formatoptns["frmttrmblln"]
|
||||
@ -1994,6 +1996,7 @@ def lua_set_setting(setting, v):
|
||||
if(setting in ("setadventure", "adventure")): vars.adventure = v
|
||||
if(setting in ("setdynamicscan", "dynamicscan")): vars.dynamicscan = v
|
||||
if(setting in ("setnopromptgen", "nopromptgen")): vars.nopromptgen = v
|
||||
if(setting in ("autosave", "noautosave")): vars.autosave = v
|
||||
if(setting in ("setrngpersist", "rngpersist")): vars.rngpersist = v
|
||||
if(setting in ("setchatmode", "chatmode")): vars.chatmode = v
|
||||
if(setting in ("frmttriminc", "triminc")): vars.formatoptns["frmttriminc"] = v
|
||||
@ -2631,7 +2634,7 @@ def sendUSStatItems():
|
||||
# KoboldAI Markup Formatting (Mixture of Markdown and sanitized html)
|
||||
#==================================================================#
|
||||
def kml(txt):
|
||||
txt = txt.replace('>', '>')
|
||||
txt = txt.replace('\>', '>')
|
||||
txt = bleach.clean(markdown.markdown(txt), tags = ['p', 'em', 'strong', 'code', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'li', 'ul', 'b', 'i', 'a', 'span', 'button'], styles = ['color', 'font-weight'], attributes=['id', 'class', 'style', 'href'])
|
||||
return txt
|
||||
|
||||
@ -3773,6 +3776,7 @@ def refresh_settings():
|
||||
emit('from_server', {'cmd': 'updateadventure', 'data': vars.adventure}, broadcast=True)
|
||||
emit('from_server', {'cmd': 'updatechatmode', 'data': vars.chatmode}, broadcast=True)
|
||||
emit('from_server', {'cmd': 'updatedynamicscan', 'data': vars.dynamicscan}, broadcast=True)
|
||||
emit('from_server', {'cmd': 'updateautosave', 'data': vars.autosave}, broadcast=True)
|
||||
emit('from_server', {'cmd': 'updatenopromptgen', 'data': vars.nopromptgen}, broadcast=True)
|
||||
emit('from_server', {'cmd': 'updaterngpersist', 'data': vars.rngpersist}, broadcast=True)
|
||||
emit('from_server', {'cmd': 'updatenogenmod', 'data': vars.nogenmod}, broadcast=True)
|
||||
|
@ -2293,6 +2293,9 @@ $(document).ready(function(){
|
||||
} else if(msg.cmd == "updatenopromptgen") {
|
||||
// Update toggle state
|
||||
$("#setnopromptgen").prop('checked', msg.data).change();
|
||||
} else if(msg.cmd == "updateautosave") {
|
||||
// Update toggle state
|
||||
$("#autosave").prop('checked', msg.data).change();
|
||||
} else if(msg.cmd == "updaterngpersist") {
|
||||
// Update toggle state
|
||||
$("#setrngpersist").prop('checked', msg.data).change();
|
||||
|
Loading…
Reference in New Issue
Block a user