feat: add option to show Hypa modal button in chat menu
- feat: add accessibility setting to control visibility of Hypa V2/V3 modal button in chat menu - feat: add summarization condition tip to HypaV3 modal
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import Suggestion from './Suggestion.svelte';
|
||||
import AdvancedChatEditor from './AdvancedChatEditor.svelte';
|
||||
import { CameraIcon, DatabaseIcon, DicesIcon, GlobeIcon, ImagePlusIcon, LanguagesIcon, Laugh, MenuIcon, MicOffIcon, PackageIcon, Plus, RefreshCcwIcon, ReplyIcon, Send, StepForwardIcon, XIcon } from "lucide-svelte";
|
||||
import { CameraIcon, DatabaseIcon, DicesIcon, GlobeIcon, ImagePlusIcon, LanguagesIcon, Laugh, MenuIcon, MicOffIcon, PackageIcon, Plus, RefreshCcwIcon, ReplyIcon, Send, StepForwardIcon, XIcon, BrainIcon } from "lucide-svelte";
|
||||
import { selectedCharID, PlaygroundStore, createSimpleCharacter } from "../../ts/stores.svelte";
|
||||
import Chat from "./Chat.svelte";
|
||||
import { type Message, type character, type groupChat } from "../../ts/storage/database.svelte";
|
||||
@@ -12,7 +12,7 @@
|
||||
import { findCharacterbyId, getUserIconProtrait, messageForm, sleep } from "../../ts/util";
|
||||
import { language } from "../../lang";
|
||||
import { isExpTranslator, translate } from "../../ts/translator/translator";
|
||||
import { alertError, alertNormal, alertWait } from "../../ts/alert";
|
||||
import { alertError, alertNormal, alertWait, showHypaV2Alert, showHypaV3Alert } from "../../ts/alert";
|
||||
import sendSound from '../../etc/send.mp3'
|
||||
import { processScript } from "src/ts/process/scripts";
|
||||
import CreatorQuote from "./CreatorQuote.svelte";
|
||||
@@ -803,6 +803,30 @@
|
||||
<span class="ml-2">{language.chatList}</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if DBState.db.showMenuHypaMemoryModal}
|
||||
{#if DBState.db.supaModelType !== 'none' && (DBState.db.hypav2 || DBState.db.hypaV3)}
|
||||
<div class="flex items-center cursor-pointer hover:text-green-500 transition-colors" onclick={() => {
|
||||
if (DBState.db.hypav2) {
|
||||
DBState.db.characters[$selectedCharID].chats[DBState.db.characters[$selectedCharID].chatPage].hypaV2Data ??= {
|
||||
lastMainChunkID: 0,
|
||||
mainChunks: [],
|
||||
chunks: [],
|
||||
}
|
||||
showHypaV2Alert();
|
||||
} else if (DBState.db.hypaV3) {
|
||||
showHypaV3Alert();
|
||||
}
|
||||
|
||||
openMenu = false
|
||||
}}>
|
||||
<BrainIcon />
|
||||
<span class="ml-2">
|
||||
{DBState.db.hypav2 ? language.hypaMemoryV2Modal : language.hypaMemoryV3Modal}
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{#if DBState.db.translator !== ''}
|
||||
<div class={"flex items-center cursor-pointer "+ (DBState.db.useAutoTranslateInput ? 'text-green-500':'lg:hover:text-green-500')} onclick={() => {
|
||||
|
||||
Reference in New Issue
Block a user