From 2840f0e07b398b76db04978334e3232fe8b89c31 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 2 Nov 2026 12:47:34 +0900 Subject: [PATCH] refac --- backend/open_webui/models/chat_messages.py | 2 +- src/lib/components/layout/Sidebar/RecursiveFolder.svelte | 2 +- src/lib/stores/chatList.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/models/chat_messages.py b/backend/open_webui/models/chat_messages.py index f135372b06..352e819930 100644 --- a/backend/open_webui/models/chat_messages.py +++ b/backend/open_webui/models/chat_messages.py @@ -357,7 +357,7 @@ class ChatMessageTable: return ChatMessageModel.model_validate(message) if message else None async def get_chat_ids_with_pending_approval( - self, chat_ids: list[str], db: Optional[AsyncSession] = None + self, chat_ids: list[str], db: AsyncSession | None = None ) -> set[str]: if not chat_ids: return set() diff --git a/src/lib/components/layout/Sidebar/RecursiveFolder.svelte b/src/lib/components/layout/Sidebar/RecursiveFolder.svelte index af723984d3..4cb287c2a4 100644 --- a/src/lib/components/layout/Sidebar/RecursiveFolder.svelte +++ b/src/lib/components/layout/Sidebar/RecursiveFolder.svelte @@ -383,7 +383,7 @@ chats = mergeFolderChats(chats ?? [], [chat]); } }, - setChatActive: (chatId, active, pendingApproval) => { + setChatActive: (chatId, active, pendingApproval = false) => { if (chats) { let found = false; chats = sortFolderChats( diff --git a/src/lib/stores/chatList.ts b/src/lib/stores/chatList.ts index cdc1436260..ec66b2de64 100644 --- a/src/lib/stores/chatList.ts +++ b/src/lib/stores/chatList.ts @@ -3,6 +3,7 @@ import { getChatList, getPinnedChatList } from '$lib/apis/chats'; type ChatListItem = { id: string; + pending_approval?: boolean; [key: string]: unknown; };