mirror of
https://github.com/open-webui/open-webui
synced 2025-06-04 03:37:35 +00:00
refac
This commit is contained in:
parent
297835628a
commit
1c1e6a7172
@ -32,7 +32,8 @@
|
|||||||
temporaryChatEnabled,
|
temporaryChatEnabled,
|
||||||
mobile,
|
mobile,
|
||||||
showOverview,
|
showOverview,
|
||||||
chatTitle
|
chatTitle,
|
||||||
|
showArtifacts
|
||||||
} from '$lib/stores';
|
} from '$lib/stores';
|
||||||
import {
|
import {
|
||||||
convertMessagesToHistory,
|
convertMessagesToHistory,
|
||||||
@ -312,6 +313,11 @@
|
|||||||
//////////////////////////
|
//////////////////////////
|
||||||
|
|
||||||
const initNewChat = async () => {
|
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/')) {
|
if ($page.url.pathname.includes('/c/')) {
|
||||||
window.history.replaceState(history.state, '', `/`);
|
window.history.replaceState(history.state, '', `/`);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import Markdown from './Markdown.svelte';
|
import Markdown from './Markdown.svelte';
|
||||||
import LightBlub from '$lib/components/icons/LightBlub.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';
|
import ChatBubble from '$lib/components/icons/ChatBubble.svelte';
|
||||||
|
|
||||||
export let id;
|
export let id;
|
||||||
@ -113,7 +113,8 @@
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
(['html', 'svg'].includes(lang) || (lang === 'xml' && code.includes('svg'))) &&
|
(['html', 'svg'].includes(lang) || (lang === 'xml' && code.includes('svg'))) &&
|
||||||
!$mobile
|
!$mobile &&
|
||||||
|
$chatId
|
||||||
) {
|
) {
|
||||||
showArtifacts.set(true);
|
showArtifacts.set(true);
|
||||||
showControls.set(true);
|
showControls.set(true);
|
||||||
|
@ -294,10 +294,6 @@
|
|||||||
if ($mobile) {
|
if ($mobile) {
|
||||||
showSidebar.set(false);
|
showSidebar.set(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
showControls.set(false);
|
|
||||||
showArtifacts.set(false);
|
|
||||||
showOverview.set(false);
|
|
||||||
}, 0);
|
}, 0);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user