diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte
index 64b51be96..b81315ced 100644
--- a/src/lib/components/chat/Chat.svelte
+++ b/src/lib/components/chat/Chat.svelte
@@ -26,7 +26,8 @@
socket,
showCallOverlay,
tools,
- currentChatPage
+ currentChatPage,
+ temporaryChatEnabled
} from '$lib/stores';
import {
convertMessagesToHistory,
@@ -238,7 +239,7 @@
}
});
} else {
- if (!($settings.saveChatHistory ?? true)) {
+ if ($temporaryChatEnabled) {
await goto('/');
}
}
@@ -414,7 +415,7 @@
}
if ($chatId == chatId) {
- if ($settings.saveChatHistory ?? true) {
+ if (!$temporaryChatEnabled) {
chat = await updateChatById(localStorage.token, chatId, {
models: selectedModels,
messages: messages,
@@ -462,7 +463,7 @@
}
if ($chatId == chatId) {
- if ($settings.saveChatHistory ?? true) {
+ if (!$temporaryChatEnabled) {
chat = await updateChatById(localStorage.token, chatId, {
models: selectedModels,
messages: messages,
@@ -620,7 +621,7 @@
// Create new chat if only one message in messages
if (newChat && messages.length == 2) {
- if ($settings.saveChatHistory ?? true) {
+ if (!$temporaryChatEnabled) {
chat = await createNewChat(localStorage.token, {
id: $chatId,
title: $i18n.t('New Chat'),
@@ -954,7 +955,7 @@
}
if ($chatId == _chatId) {
- if ($settings.saveChatHistory ?? true) {
+ if (!$temporaryChatEnabled) {
chat = await updateChatById(localStorage.token, _chatId, {
messages: messages,
history: history,
@@ -1227,7 +1228,7 @@
}
if ($chatId == _chatId) {
- if ($settings.saveChatHistory ?? true) {
+ if (!$temporaryChatEnabled) {
chat = await updateChatById(localStorage.token, _chatId, {
models: selectedModels,
messages: messages,
@@ -1400,7 +1401,7 @@
title = _title;
}
- if ($settings.saveChatHistory ?? true) {
+ if (!$temporaryChatEnabled) {
chat = await updateChatById(localStorage.token, _chatId, { title: _title });
currentChatPage.set(1);
diff --git a/src/lib/components/chat/Messages/Placeholder.svelte b/src/lib/components/chat/Messages/Placeholder.svelte
index 34038a608..6b4c41744 100644
--- a/src/lib/components/chat/Messages/Placeholder.svelte
+++ b/src/lib/components/chat/Messages/Placeholder.svelte
@@ -2,7 +2,7 @@
import { WEBUI_BASE_URL } from '$lib/constants';
import { marked } from 'marked';
- import { config, user, models as _models } from '$lib/stores';
+ import { config, user, models as _models, temporaryChatEnabled } from '$lib/stores';
import { onMount, getContext } from 'svelte';
import { blur, fade } from 'svelte/transition';
@@ -10,6 +10,7 @@
import Suggestions from '../MessageInput/Suggestions.svelte';
import { sanitizeResponseContent } from '$lib/utils';
import Tooltip from '$lib/components/common/Tooltip.svelte';
+ import EyeSlash from '$lib/components/icons/EyeSlash.svelte';
const i18n = getContext('i18n');
@@ -64,6 +65,18 @@
+ {#if $temporaryChatEnabled}
+