diff --git a/src/lib/Others/HypaV3Modal.svelte b/src/lib/Others/HypaV3Modal.svelte index 099e669c..690b8e61 100644 --- a/src/lib/Others/HypaV3Modal.svelte +++ b/src/lib/Others/HypaV3Modal.svelte @@ -8,7 +8,7 @@ CheckIcon, } from "lucide-svelte"; import TextAreaInput from "../UI/GUI/TextAreaInput.svelte"; - import { alertConfirm } from "../../ts/alert"; + import { alertConfirm, showHypaV3Alert } from "../../ts/alert"; import { DBState, alertStore, selectedCharID } from "src/ts/stores.svelte"; import { summarize } from "src/ts/process/memory/hypav3"; import { translateHTML } from "src/ts/translator/translator"; @@ -65,6 +65,21 @@ expandedMessageUIState = null; }); + async function confirmTwice( + firstMessage: string, + secondMessage: string + ): Promise { + let confirmed = await alertConfirm(firstMessage); + + if (confirmed) { + confirmed = await alertConfirm(secondMessage); + + if (confirmed) { + return true; + } + } + } + function getMessageFromChatMemo( chatMemo: string | null ): { role: string; data: string } | null { @@ -327,22 +342,19 @@