mirror of
https://github.com/open-webui/open-webui
synced 2025-05-23 22:34:31 +00:00
refac
This commit is contained in:
parent
98ba3f8428
commit
bf0043881a
@ -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)
|
||||||
|
|
||||||
|
@ -14,25 +14,16 @@
|
|||||||
pinnedChats,
|
pinnedChats,
|
||||||
scrollPaginationEnabled,
|
scrollPaginationEnabled,
|
||||||
currentChatPage,
|
currentChatPage,
|
||||||
temporaryChatEnabled,
|
temporaryChatEnabled
|
||||||
showArtifacts,
|
|
||||||
showOverview,
|
|
||||||
showControls
|
|
||||||
} 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,
|
||||||
|
Loading…
Reference in New Issue
Block a user