mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-05 13:36:47 +01:00
currentTask fix in MESSAGE_RECEIVED, ingore swipes
This commit is contained in:
parent
78d62d7be2
commit
6f4fd15095
@ -17,6 +17,7 @@ let currentChatId = ""
|
||||
let currentObjective = null
|
||||
let currentTask = null
|
||||
let checkCounter = 0
|
||||
let lastMessageWasSwipe = false
|
||||
|
||||
|
||||
const defaultPrompts = {
|
||||
@ -783,9 +784,12 @@ jQuery(() => {
|
||||
eventSource.on(event_types.CHAT_CHANGED, () => {
|
||||
resetState()
|
||||
});
|
||||
|
||||
eventSource.on(event_types.MESSAGE_SWIPED, () => {
|
||||
lastMessageWasSwipe = true
|
||||
})
|
||||
eventSource.on(event_types.MESSAGE_RECEIVED, () => {
|
||||
if (currentChatId == undefined || currentTask == undefined) {
|
||||
if (currentChatId == undefined || jQuery.isEmptyObject(currentTask) || lastMessageWasSwipe) {
|
||||
lastMessageWasSwipe = false
|
||||
return
|
||||
}
|
||||
if ($("#objective-check-frequency").val() > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user