feat: integrate local activation state into global lorebook rendering
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
import NumberInput from "../../UI/GUI/NumberInput.svelte";
|
import NumberInput from "../../UI/GUI/NumberInput.svelte";
|
||||||
import TextAreaInput from "../../UI/GUI/TextAreaInput.svelte";
|
import TextAreaInput from "../../UI/GUI/TextAreaInput.svelte";
|
||||||
import { tokenizeAccurate } from "src/ts/tokenizer";
|
import { tokenizeAccurate } from "src/ts/tokenizer";
|
||||||
|
import { DBState } from "src/ts/stores.svelte";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
value: loreBook;
|
value: loreBook;
|
||||||
@@ -185,7 +186,7 @@
|
|||||||
<div class="flex items-center mt-4">
|
<div class="flex items-center mt-4">
|
||||||
<Check bind:check={value.alwaysActive} name={language.alwaysActive}/>
|
<Check bind:check={value.alwaysActive} name={language.alwaysActive}/>
|
||||||
</div>
|
</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">
|
<div class="flex items-center mt-2">
|
||||||
<Check check={isLocallyActivated(value)} onChange={(check: boolean) => toggleLocalActive(check, value)} name={language.alwaysActiveInChat}/>
|
<Check check={isLocallyActivated(value)} onChange={(check: boolean) => toggleLocalActive(check, value)} name={language.alwaysActiveInChat}/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user