mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix auto-check logic bug
This commit is contained in:
@ -307,6 +307,8 @@ function onChatDepthInput() {
|
|||||||
|
|
||||||
// Update how often we check for task completion
|
// Update how often we check for task completion
|
||||||
function onCheckFrequencyInput() {
|
function onCheckFrequencyInput() {
|
||||||
|
checkCounter = $("#objective-check-frequency").val()
|
||||||
|
$('#objective-counter').text(checkCounter)
|
||||||
saveState()
|
saveState()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,10 +404,9 @@ jQuery(() => {
|
|||||||
}
|
}
|
||||||
if ($("#objective-check-frequency").val() > 0) {
|
if ($("#objective-check-frequency").val() > 0) {
|
||||||
// Check only at specified interval
|
// Check only at specified interval
|
||||||
if (checkCounter > 0) {
|
if (checkCounter <= 0) {
|
||||||
return
|
|
||||||
}
|
|
||||||
checkTaskCompleted();
|
checkTaskCompleted();
|
||||||
|
}
|
||||||
checkCounter -= 1
|
checkCounter -= 1
|
||||||
}
|
}
|
||||||
setCurrentTask();
|
setCurrentTask();
|
||||||
|
Reference in New Issue
Block a user