diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index eca806181..e432575b2 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -32,7 +32,8 @@ temporaryChatEnabled, mobile, showOverview, - chatTitle + chatTitle, + showArtifacts } from '$lib/stores'; import { convertMessagesToHistory, @@ -312,6 +313,11 @@ ////////////////////////// const initNewChat = async () => { + await showControls.set(false); + await showCallOverlay.set(false); + await showOverview.set(false); + await showArtifacts.set(false); + if ($page.url.pathname.includes('/c/')) { window.history.replaceState(history.state, '', `/`); } diff --git a/src/lib/components/chat/Messages/ContentRenderer.svelte b/src/lib/components/chat/Messages/ContentRenderer.svelte index fe7c7572f..d40bb4ad9 100644 --- a/src/lib/components/chat/Messages/ContentRenderer.svelte +++ b/src/lib/components/chat/Messages/ContentRenderer.svelte @@ -5,7 +5,7 @@ import Markdown from './Markdown.svelte'; import LightBlub from '$lib/components/icons/LightBlub.svelte'; - import { mobile, showArtifacts, showControls, showOverview } from '$lib/stores'; + import { chatId, mobile, showArtifacts, showControls, showOverview } from '$lib/stores'; import ChatBubble from '$lib/components/icons/ChatBubble.svelte'; export let id; @@ -113,7 +113,8 @@ if ( (['html', 'svg'].includes(lang) || (lang === 'xml' && code.includes('svg'))) && - !$mobile + !$mobile && + $chatId ) { showArtifacts.set(true); showControls.set(true); diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index d07ea43f5..0582eb574 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -294,10 +294,6 @@ if ($mobile) { showSidebar.set(false); } - - showControls.set(false); - showArtifacts.set(false); - showOverview.set(false); }, 0); }} >