[fix] lorebook replace error 2

This commit is contained in:
kwaroran
2023-05-24 10:41:35 +09:00
parent b8ead62da4
commit b082070bfc

View File

@@ -65,10 +65,10 @@ export async function loadLoreBookPrompt(){
const db = get(DataBase)
const char = db.characters[selectedID]
const page = char.chatPage
const characterLore = char.globalLore
const chatLore = char.chats[page].localLore
const globalLore = db.loreBook[db.loreBookPage].data
const fullLore = characterLore.concat(chatLore.concat(globalLore ?? []))
const characterLore = char.globalLore ?? []
const chatLore = char.chats[page].localLore ?? []
const globalLore = db.loreBook[db.loreBookPage].data ?? []
const fullLore = [...characterLore, ...chatLore, ...globalLore]
const currentChat = char.chats[page].message
const loreDepth = char.loreSettings?.scanDepth ?? db.loreBookDepth
const loreToken = char.loreSettings?.tokenBudget ?? db.loreBookToken