From 4bc0d51854790a338e5ea3659ae26fb2c2da6e65 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Wed, 29 May 2024 14:02:51 +0900 Subject: [PATCH] refactor: Improve lowLevelAccess check in importCharacterCardSpec --- src/ts/process/lorebook.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ts/process/lorebook.ts b/src/ts/process/lorebook.ts index 5e60898a..a0c1acd8 100644 --- a/src/ts/process/lorebook.ts +++ b/src/ts/process/lorebook.ts @@ -266,7 +266,8 @@ export async function loadLoreBookV3Prompt(){ else{ mText = mText.replace(/ /g,'') for(const key of arg.keys){ - if(mText.includes(key.toLocaleLowerCase())){ + const realKey = key.toLocaleLowerCase().replace(/ /g,'') + if(mText.includes(realKey)){ return true } }