diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte
index be2bd3566..8d64ecbad 100644
--- a/src/lib/components/chat/Chat.svelte
+++ b/src/lib/components/chat/Chat.svelte
@@ -79,6 +79,7 @@
import EventConfirmDialog from '../common/ConfirmDialog.svelte';
import Placeholder from './Placeholder.svelte';
import { getTools } from '$lib/apis/tools';
+ import NotificationToast from '../NotificationToast.svelte';
export let chatIdProp = '';
@@ -308,7 +309,23 @@
const type = event?.data?.type ?? null;
const data = event?.data?.data ?? null;
- if (type === 'chat:title') {
+ if (type === 'chat:completion') {
+ const { done, content, title } = data;
+
+ if (done) {
+ toast.custom(NotificationToast, {
+ componentProps: {
+ onClick: () => {
+ goto(`/c/${event.chat_id}`);
+ },
+ content: content,
+ title: title
+ },
+ duration: 15000,
+ unstyled: true
+ });
+ }
+ } else if (type === 'chat:title') {
currentChatPage.set(1);
await chats.set(await getChatList(localStorage.token, $currentChatPage));
} else if (type === 'chat:tags') {
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index d92e8c2ab..1066cb675 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -219,5 +219,5 @@
: 'light'
: 'light'}
richColors
- position="top-center"
+ position="top-right"
/>