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; };