mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Update author's template effect token usage live
This commit is contained in:
@ -2151,7 +2151,13 @@ function interpolateRGB(color0, color1, t) {
|
||||
}
|
||||
|
||||
function updateInputBudget(inputElement) {
|
||||
socket.send({"cmd": "getfieldbudget", "data": {"unencoded": inputElement.value, "field": inputElement.id}});
|
||||
let data = {"unencoded": inputElement.value, "field": inputElement.id};
|
||||
|
||||
if (inputElement.id === "anoteinput") {
|
||||
data["anotetemplate"] = $("#anotetemplate").val();
|
||||
}
|
||||
|
||||
socket.send({"cmd": "getfieldbudget", "data": data});
|
||||
}
|
||||
|
||||
function registerTokenCounters() {
|
||||
@ -3430,6 +3436,10 @@ $(document).ready(function(){
|
||||
if (handled) ev.preventDefault();
|
||||
});
|
||||
|
||||
$("#anotetemplate").on("input", function() {
|
||||
updateInputBudget(anote_input[0]);
|
||||
})
|
||||
|
||||
registerTokenCounters();
|
||||
|
||||
updateInputBudget(input_text[0]);
|
||||
|
Reference in New Issue
Block a user