diff --git a/src/lib/components/chat/ChatControls.svelte b/src/lib/components/chat/ChatControls.svelte index 68c976b5c..45d9b93dc 100644 --- a/src/lib/components/chat/ChatControls.svelte +++ b/src/lib/components/chat/ChatControls.svelte @@ -83,7 +83,7 @@ document.removeEventListener('mouseup', onMouseUp); }); - $: if (!chatId) { + const closeHandler = () => { showControls.set(false); showOverview.set(false); showArtifacts.set(false); @@ -91,6 +91,10 @@ if ($showCallOverlay) { showCallOverlay.set(false); } + }; + + $: if (!chatId) { + closeHandler(); }