mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Add Memory box to Random Story dialog and "Random Story Persist"
This commit is contained in:
@@ -1054,6 +1054,9 @@ function hideNewStoryPopup() {
|
||||
function showRandomStoryPopup() {
|
||||
rspopup.removeClass("hidden");
|
||||
rspopup.addClass("flex");
|
||||
if($("#setrngpersist").prop("checked")) {
|
||||
$("#rngmemory").val(memorytext);
|
||||
}
|
||||
}
|
||||
|
||||
function hideRandomStoryPopup() {
|
||||
@@ -2180,6 +2183,12 @@ $(document).ready(function(){
|
||||
} else if(msg.cmd == "updatenopromptgen") {
|
||||
// Update toggle state
|
||||
$("#setnopromptgen").prop('checked', msg.data).change();
|
||||
} else if(msg.cmd == "updaterngpersist") {
|
||||
// Update toggle state
|
||||
$("#setrngpersist").prop('checked', msg.data).change();
|
||||
if(!$("#setrngpersist").prop("checked")) {
|
||||
$("#rngmemory").val("");
|
||||
}
|
||||
} else if(msg.cmd == "runs_remotely") {
|
||||
remote = true;
|
||||
hide([button_savetofile, button_import, button_importwi]);
|
||||
@@ -2435,7 +2444,7 @@ $(document).ready(function(){
|
||||
|
||||
rs_accept.on("click", function(ev) {
|
||||
hideMessage();
|
||||
socket.send({'cmd': 'rndgame', 'data': topic.val()});
|
||||
socket.send({'cmd': 'rndgame', 'memory': $("#rngmemory").val(), 'data': topic.val()});
|
||||
hideRandomStoryPopup();
|
||||
});
|
||||
|
||||
|
@@ -32,6 +32,22 @@ chunk.editing, chunk.editing * {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#topic {
|
||||
margin-top: 20px;
|
||||
resize: none;
|
||||
overflow: auto;
|
||||
background-color: #404040;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#rngmemory {
|
||||
height: 80px;
|
||||
resize: none;
|
||||
overflow:auto;
|
||||
background-color: #404040;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#chatname {
|
||||
background-color: #404040;
|
||||
color: #ffffff;
|
||||
@@ -387,7 +403,7 @@ chunk.editing, chunk.editing * {
|
||||
#rspopup {
|
||||
width: 800px;
|
||||
background-color: #262626;
|
||||
margin-top: 200px;
|
||||
margin-top: 150px;
|
||||
}
|
||||
|
||||
/*================= Classes =================*/
|
||||
|
Reference in New Issue
Block a user