Change first message to chat dependent

This commit is contained in:
kwaroran
2024-09-18 23:25:02 +09:00
parent 6ad841e931
commit 85609e890e
15 changed files with 50 additions and 61 deletions

View File

@@ -1,7 +1,7 @@
<script lang="ts">
import { ParseMarkdown, risuChatParser } from "src/ts/parser";
import { DataBase, type Database, type character, type groupChat } from "src/ts/storage/database";
import { CurrentVariablePointer, moduleBackgroundEmbedding, ReloadGUIPointer, selectedCharID } from "src/ts/stores";
import { moduleBackgroundEmbedding, ReloadGUIPointer, selectedCharID } from "src/ts/stores";
import { onDestroy } from "svelte";
let backgroundHTML = ''
@@ -43,14 +43,12 @@
{#if backgroundHTML || $moduleBackgroundEmbedding}
{#if $selectedCharID > -1}
{#key $CurrentVariablePointer}
{#key $ReloadGUIPointer}
<div class="absolute top-0 left-0 w-full h-full">
{#await ParseMarkdown(risuChatParser((backgroundHTML || '') + ($moduleBackgroundEmbedding || ''), {chara:currentChar}), currentChar, 'back') then md}
{@html md}
{/await}
</div>
{/key}
{#key $ReloadGUIPointer}
<div class="absolute top-0 left-0 w-full h-full">
{#await ParseMarkdown(risuChatParser((backgroundHTML || '') + ($moduleBackgroundEmbedding || ''), {chara:currentChar}), currentChar, 'back') then md}
{@html md}
{/await}
</div>
{/key}
{/if}
{/if}