mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Added execution time to the UI
This commit is contained in:
@ -882,6 +882,7 @@ function formatChunkInnerText(chunk) {
|
||||
}
|
||||
|
||||
function dosubmit(disallow_abort) {
|
||||
submit_start = Date.now();
|
||||
var txt = input_text.val().replace(/\u00a0/g, " ");
|
||||
if((disallow_abort || gamestate !== "wait") && !memorymode && !gamestarted && ((!adventure || !action_mode) && txt.trim().length == 0)) {
|
||||
return;
|
||||
@ -2099,6 +2100,10 @@ $(document).ready(function(){
|
||||
scrollToBottom();
|
||||
} else if(msg.cmd == "updatechunk") {
|
||||
hideMessage();
|
||||
if (typeof submit_start !== 'undefined') {
|
||||
$("#runtime")[0].innerHTML = `Generation time: ${Math.round((Date.now() - submit_start)/1000)} sec`;
|
||||
delete submit_start;
|
||||
}
|
||||
var index = msg.data.index;
|
||||
var html = msg.data.html;
|
||||
var existingChunk = game_text.children('#n' + index);
|
||||
|
Reference in New Issue
Block a user