feat: integrate local activation state into global lorebook rendering

This commit is contained in:
Kwaroran
2025-03-05 05:41:41 +09:00
parent 6ed005b733
commit 3d8b410d03

View File

@@ -10,6 +10,7 @@
import NumberInput from "../../UI/GUI/NumberInput.svelte";
import TextAreaInput from "../../UI/GUI/TextAreaInput.svelte";
import { tokenizeAccurate } from "src/ts/tokenizer";
import { DBState } from "src/ts/stores.svelte";
interface Props {
value: loreBook;
@@ -185,7 +186,7 @@
<div class="flex items-center mt-4">
<Check bind:check={value.alwaysActive} name={language.alwaysActive}/>
</div>
{#if !value.alwaysActive && getCurrentCharacter()?.globalLore?.includes(value)}
{#if !value.alwaysActive && getCurrentCharacter()?.globalLore?.includes(value) && DBState.db.localActivationInGlobalLorebook}
<div class="flex items-center mt-2">
<Check check={isLocallyActivated(value)} onChange={(check: boolean) => toggleLocalActive(check, value)} name={language.alwaysActiveInChat}/>
</div>