mirror of
https://github.com/open-webui/open-webui
synced 2025-05-23 14:24:22 +00:00
refac
This commit is contained in:
parent
98ba3f8428
commit
bf0043881a
@ -276,7 +276,9 @@ class ChatTable:
|
||||
limit: Optional[int] = None,
|
||||
) -> list[ChatTitleIdResponse]:
|
||||
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:
|
||||
query = query.filter_by(archived=False)
|
||||
|
||||
|
@ -14,25 +14,16 @@
|
||||
pinnedChats,
|
||||
scrollPaginationEnabled,
|
||||
currentChatPage,
|
||||
temporaryChatEnabled,
|
||||
showArtifacts,
|
||||
showOverview,
|
||||
showControls
|
||||
temporaryChatEnabled
|
||||
} from '$lib/stores';
|
||||
import { onMount, getContext, tick, onDestroy } from 'svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
import { updateUserSettings } from '$lib/apis/users';
|
||||
import {
|
||||
deleteChatById,
|
||||
getChatList,
|
||||
getChatById,
|
||||
getChatListByTagName,
|
||||
updateChatById,
|
||||
getAllTags,
|
||||
archiveChatById,
|
||||
cloneChatById,
|
||||
getChatListBySearchText,
|
||||
createNewChat,
|
||||
getPinnedChatList,
|
||||
|
Loading…
Reference in New Issue
Block a user