Timothy J. Baek 6 months ago
parent
commit
bf0043881a

+ 3 - 1
backend/open_webui/apps/webui/models/chats.py

@@ -276,7 +276,9 @@ class ChatTable:
         limit: Optional[int] = None,
         limit: Optional[int] = None,
     ) -> list[ChatTitleIdResponse]:
     ) -> list[ChatTitleIdResponse]:
         with get_db() as db:
         with get_db() as db:
-            query = db.query(Chat).filter_by(user_id=user_id, pinned=False)
+            query = db.query(Chat).filter_by(user_id=user_id)
+            query = query.filter(or_(Chat.pinned == False, Chat.pinned == None))
+
             if not include_archived:
             if not include_archived:
                 query = query.filter_by(archived=False)
                 query = query.filter_by(archived=False)
 
 

+ 1 - 10
src/lib/components/layout/Sidebar.svelte

@@ -14,25 +14,16 @@
 		pinnedChats,
 		pinnedChats,
 		scrollPaginationEnabled,
 		scrollPaginationEnabled,
 		currentChatPage,
 		currentChatPage,
-		temporaryChatEnabled,
-		showArtifacts,
-		showOverview,
-		showControls
+		temporaryChatEnabled
 	} from '$lib/stores';
 	} from '$lib/stores';
 	import { onMount, getContext, tick, onDestroy } from 'svelte';
 	import { onMount, getContext, tick, onDestroy } from 'svelte';
 
 
 	const i18n = getContext('i18n');
 	const i18n = getContext('i18n');
 
 
-	import { updateUserSettings } from '$lib/apis/users';
 	import {
 	import {
 		deleteChatById,
 		deleteChatById,
 		getChatList,
 		getChatList,
-		getChatById,
-		getChatListByTagName,
-		updateChatById,
 		getAllTags,
 		getAllTags,
-		archiveChatById,
-		cloneChatById,
 		getChatListBySearchText,
 		getChatListBySearchText,
 		createNewChat,
 		createNewChat,
 		getPinnedChatList,
 		getPinnedChatList,