feat: Add custom toggles

This commit is contained in:
kwaroran
2024-05-27 11:18:15 +09:00
parent eb992a5c6b
commit 1d5a829f88
7 changed files with 62 additions and 6 deletions

View File

@@ -29,6 +29,7 @@
import { updateInlayScreen } from "src/ts/process/inlayScreen";
import { registerOnnxModel } from "src/ts/process/transformers";
import MultiLangInput from "../UI/GUI/MultiLangInput.svelte";
import { getCustomToggles } from "src/ts/process/prompt";
let subMenu = 0
@@ -246,6 +247,14 @@
<div class="flex mt-6 items-center">
<Check bind:check={$DataBase.jailbreakToggle} name={language.jailbreakToggle}/>
</div>
{#each getCustomToggles($DataBase.customPromptTemplateToggle) as toggle}
<div class="flex mt-2 items-center">
<Check check={$DataBase.globalChatVariables[`toggle_${toggle[0]}`] === '1'} name={toggle[1]} onChange={() => {
$DataBase.globalChatVariables[`toggle_${toggle[0]}`] = $DataBase.globalChatVariables[`toggle_${toggle[0]}`] === '1' ? '0' : '1'
}} />
</div>
{/each}
{#if $DataBase.supaMemoryType !== 'none' || $DataBase.hanuraiEnable}
{#if $DataBase.hanuraiEnable}