[fix] lorebook replace error 2
This commit is contained in:
@@ -65,10 +65,10 @@ export async function loadLoreBookPrompt(){
|
|||||||
const db = get(DataBase)
|
const db = get(DataBase)
|
||||||
const char = db.characters[selectedID]
|
const char = db.characters[selectedID]
|
||||||
const page = char.chatPage
|
const page = char.chatPage
|
||||||
const characterLore = char.globalLore
|
const characterLore = char.globalLore ?? []
|
||||||
const chatLore = char.chats[page].localLore
|
const chatLore = char.chats[page].localLore ?? []
|
||||||
const globalLore = db.loreBook[db.loreBookPage].data
|
const globalLore = db.loreBook[db.loreBookPage].data ?? []
|
||||||
const fullLore = characterLore.concat(chatLore.concat(globalLore ?? []))
|
const fullLore = [...characterLore, ...chatLore, ...globalLore]
|
||||||
const currentChat = char.chats[page].message
|
const currentChat = char.chats[page].message
|
||||||
const loreDepth = char.loreSettings?.scanDepth ?? db.loreBookDepth
|
const loreDepth = char.loreSettings?.scanDepth ?? db.loreBookDepth
|
||||||
const loreToken = char.loreSettings?.tokenBudget ?? db.loreBookToken
|
const loreToken = char.loreSettings?.tokenBudget ?? db.loreBookToken
|
||||||
|
|||||||
Reference in New Issue
Block a user