Add Chat playground

This commit is contained in:
kwaroran
2024-04-24 22:42:27 +09:00
parent 430c162af1
commit f50e5fcd69
5 changed files with 86 additions and 28 deletions

View File

@@ -10,6 +10,7 @@
import { findCharacterbyId } from "src/ts/util";
import CheckInput from "../UI/GUI/CheckInput.svelte";
import { createMultiuserRoom } from "src/ts/sync/multiuser";
import { CurrentCharacter } from "src/ts/stores";
export let chara:character|groupChat
let editMode = false
</script>
@@ -103,23 +104,26 @@
<EditIcon size={18}/>
</button>
</div>
<div class="flex mt-2 items-center">
<CheckInput bind:check={$DataBase.jailbreakToggle} name={language.jailbreakToggle}/>
</div>
{#if $DataBase.supaMemoryType !== 'none' || $DataBase.hanuraiEnable}
{#if $DataBase.hanuraiEnable}
<div class="flex mt-2 items-center">
<CheckInput bind:check={chara.supaMemory} name={ language.hanuraiMemory}/>
</div>
{:else if $DataBase.hypaMemory}
<div class="flex mt-2 items-center">
<CheckInput bind:check={chara.supaMemory} name={language.ToggleHypaMemory}/>
</div>
{:else}
<div class="flex mt-2 items-center">
<CheckInput bind:check={chara.supaMemory} name={language.ToggleSuperMemory}/>
</div>
{#if $CurrentCharacter.chaId !== '§playground'}
<div class="flex mt-2 items-center">
<CheckInput bind:check={$DataBase.jailbreakToggle} name={language.jailbreakToggle}/>
</div>
{#if $DataBase.supaMemoryType !== 'none' || $DataBase.hanuraiEnable}
{#if $DataBase.hanuraiEnable}
<div class="flex mt-2 items-center">
<CheckInput bind:check={chara.supaMemory} name={ language.hanuraiMemory}/>
</div>
{:else if $DataBase.hypaMemory}
<div class="flex mt-2 items-center">
<CheckInput bind:check={chara.supaMemory} name={language.ToggleHypaMemory}/>
</div>
{:else}
<div class="flex mt-2 items-center">
<CheckInput bind:check={chara.supaMemory} name={language.ToggleSuperMemory}/>
</div>
{/if}
{/if}
{/if}
</div>

View File

@@ -652,6 +652,8 @@
<h1 class="text-xl">Welcome to RisuAI!</h1>
<span class="text-xs text-textcolor2">Select a bot to start chating</span>
</div>
{:else if $CurrentCharacter.chaId === '§playground'}
<SideChatList bind:chara={ $CurrentCharacter} />
{:else}
<div class="w-full h-8 min-h-8 border-l border-b border-r border-selected relative bottom-6 rounded-b-md flex">
<button on:click={() => {botMakerMode.set(false)}} class="flex-grow border-r border-r-selected rounded-bl-md" class:text-textcolor2={$botMakerMode}>{language.Chat}</button>