fix auto-check logic bug

This commit is contained in:
ouoertheo
2023-06-02 20:59:21 -05:00
parent 3ea2d469fd
commit 9e35ffaefb

View File

@ -307,6 +307,8 @@ function onChatDepthInput() {
// Update how often we check for task completion
function onCheckFrequencyInput() {
checkCounter = $("#objective-check-frequency").val()
$('#objective-counter').text(checkCounter)
saveState()
}
@ -402,10 +404,9 @@ jQuery(() => {
}
if ($("#objective-check-frequency").val() > 0) {
// Check only at specified interval
if (checkCounter > 0) {
return
}
if (checkCounter <= 0) {
checkTaskCompleted();
}
checkCounter -= 1
}
setCurrentTask();