Add low level access
This commit is contained in:
@@ -1087,6 +1087,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
|
||||
|
||||
let result = ''
|
||||
let emoChanged = false
|
||||
let resendChat = false
|
||||
|
||||
if(abortSignal.aborted === true){
|
||||
return false
|
||||
@@ -1151,6 +1152,9 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
|
||||
if(triggerResult && triggerResult.chat){
|
||||
currentChat = triggerResult.chat
|
||||
}
|
||||
if(triggerResult && triggerResult.sendAIprompt){
|
||||
resendChat = true
|
||||
}
|
||||
const inlayr = runInlayScreen(currentChar, currentChat.message[msgIndex].data)
|
||||
currentChat.message[msgIndex].data = inlayr.text
|
||||
db.characters[selectedChar].chats[selectedChat] = currentChat
|
||||
@@ -1236,6 +1240,9 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
|
||||
db.characters[selectedChar].chats[selectedChat] = triggerResult.chat
|
||||
setDatabase(db)
|
||||
}
|
||||
if(triggerResult && triggerResult.sendAIprompt){
|
||||
resendChat = true
|
||||
}
|
||||
}
|
||||
|
||||
let needsAutoContinue = false
|
||||
@@ -1259,6 +1266,13 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
|
||||
})
|
||||
}
|
||||
|
||||
if(resendChat){
|
||||
doingChat.set(false)
|
||||
return await sendChat(chatProcessIndex, {
|
||||
signal: abortSignal
|
||||
})
|
||||
}
|
||||
|
||||
chatProcessStage.set(4)
|
||||
|
||||
sendPeerChar()
|
||||
|
||||
Reference in New Issue
Block a user