This commit is contained in:
Timothy Jaeryang Baek committed 2026-11-26 03:08:54 +04:00
1 parent e629c35c3e
commit d6812c851b
5 files changed
+30 -4

No files matched your search

+2 -2
View File
@@ -42,7 +42,7 @@
// Earlier wording, kept so i18n:parse does not drop its translations:
// $i18n.t('MCP support is experimental and its specification changes often, which can lead to incompatibilities. OpenAPI specification support is directly maintained by the Open WebUI team, making it the more reliable option for compatibility.')
// $i18n.t('Read more →')
let type = 'openapi'; // 'openapi', 'mcp'
let type = 'mcp'; // 'openapi', 'mcp'
let url = '';
@@ -422,7 +422,7 @@
show = false;
// reset form
type = 'openapi';
type = 'mcp';
url = '';
spec_type = 'url';
+11 -1
View File
@@ -211,8 +211,18 @@
'folderId' in $chatTabRequest &&
$chatTabRequest.folderId === mainTabFolder?.id
) {
const savedId = $chatTabRequest.chatId;
chatTabRequest.set(null);
if (mainTabFolder?.canEdit) openFeatureTab('chat');
if (savedId) {
// A chat in this folder opens among the folder's tabs, or shows the tab it already has.
const existing = tabs.tabs.find((tab) => tab.kind === 'chat' && tab.chatId === savedId);
openPanel({
id: existing?.id ?? uuidv4(),
kind: 'chat',
label: $i18n.t('Chat'),
chatId: savedId
});
} else if (mainTabFolder?.canEdit) openFeatureTab('chat');
}
export let mainChatHref = '/';
export let tabTitleEditor: import('svelte').Snippet | undefined = undefined;
@@ -40,6 +40,7 @@
} from '$lib/apis/chats';
import {
activeChatTabId,
chatTabRequest,
openEmbeddedChatIds,
selectedFolder,
chatId,
@@ -98,6 +99,8 @@
export let id;
export let title;
/** The folder the chat is in, when it is listed under one. */
export let folderId: string | null = null;
export let createdAt: number | null = null;
export let updatedAt: number | null = null;
export let lastReadAt: number | null = null;
@@ -223,6 +226,18 @@
event?.preventDefault();
void goto(`/c/${id}`);
showSidebar.set(false);
} else if (
// On its folder's page, the chat opens as a tab there instead of leaving the folder.
folderId &&
!$chatId &&
$selectedFolder?.id === folderId &&
!event?.metaKey &&
!event?.ctrlKey &&
!event?.altKey &&
!event?.shiftKey
) {
event?.preventDefault();
chatTabRequest.set({ folderId, chatId: id });
}
};
@@ -1057,6 +1057,7 @@
<ChatItem
id={chat.id}
title={chat.title}
{folderId}
createdAt={chat.created_at}
updatedAt={chat.updated_at}
lastReadAt={chat.last_read_at}
+1 -1
View File
@@ -237,7 +237,7 @@ export const openEmbeddedChatIds = writable<Set<string>>(new Set());
/** The saved chat whose tab is in front, when it is not the main chat. */
export const activeChatTabId = writable<string | null>(null);
export const chatTabRequest = writable<
{ parentChatId: string; prompt: string } | { folderId: string } | null
{ parentChatId: string; prompt: string } | { folderId: string; chatId?: string } | null
>(null);
export type QueryData = {