Timothy J. Baek 10 bulan lalu
induk
melakukan
a9673c793a

+ 11 - 1
src/lib/components/chat/ChatControls.svelte

@@ -78,7 +78,17 @@
 		<div
 		<div
 			class="absolute w-full h-screen max-h-[100dvh] bg-white text-gray-700 dark:bg-black dark:text-gray-300 flex justify-center"
 			class="absolute w-full h-screen max-h-[100dvh] bg-white text-gray-700 dark:bg-black dark:text-gray-300 flex justify-center"
 		>
 		>
-			<CallOverlay bind:files {submitPrompt} {stopResponse} {modelId} {chatId} {eventTarget} />
+			<CallOverlay
+				bind:files
+				{submitPrompt}
+				{stopResponse}
+				{modelId}
+				{chatId}
+				{eventTarget}
+				on:close={() => {
+					show = false;
+				}}
+			/>
 		</div>
 		</div>
 	</div>
 	</div>
 {:else}
 {:else}

+ 4 - 1
src/lib/components/chat/MessageInput/CallOverlay.svelte

@@ -1,6 +1,8 @@
 <script lang="ts">
 <script lang="ts">
 	import { config, models, settings, showCallOverlay } from '$lib/stores';
 	import { config, models, settings, showCallOverlay } from '$lib/stores';
-	import { onMount, tick, getContext, onDestroy } from 'svelte';
+	import { onMount, tick, getContext, onDestroy, createEventDispatcher } from 'svelte';
+
+	const dispatch = createEventDispatcher();
 
 
 	import {
 	import {
 		blobToFile,
 		blobToFile,
@@ -923,6 +925,7 @@
 						stopAudioStream();
 						stopAudioStream();
 						stopVideoStream();
 						stopVideoStream();
 						showCallOverlay.set(false);
 						showCallOverlay.set(false);
+						dispatch('close');
 					}}
 					}}
 					type="button"
 					type="button"
 				>
 				>