mirror of
https://github.com/open-webui/open-webui.git
synced 2026-04-28 19:49:28 -05:00
refac/fix: temp chat
This commit is contained in:
@@ -2207,8 +2207,8 @@
|
||||
|
||||
selectedFolder.set(null);
|
||||
} else {
|
||||
_chatId = 'local';
|
||||
await chatId.set('local');
|
||||
_chatId = `local:${$socket?.id}`; // Use socket id for temporary chat
|
||||
await chatId.set(_chatId);
|
||||
}
|
||||
await tick();
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if $temporaryChatEnabled && $chatId === 'local'}
|
||||
{#if $temporaryChatEnabled && ($chatId ?? '').startsWith('local:')}
|
||||
<div class=" w-full z-30 text-center">
|
||||
<div class="text-xs text-gray-500">{$i18n.t('Temporary Chat')}</div>
|
||||
</div>
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
if (chat.id) {
|
||||
let chatObj = null;
|
||||
|
||||
if (chat.id === 'local' || $temporaryChatEnabled) {
|
||||
if ((chat?.id ?? '').startsWith('local') || $temporaryChatEnabled) {
|
||||
chatObj = chat;
|
||||
} else {
|
||||
chatObj = await getChatById(localStorage.token, chat.id);
|
||||
|
||||
Reference in New Issue
Block a user