This commit is contained in:
Timothy J. Baek 2024-10-15 03:11:03 -07:00
parent 98ba3f8428
commit bf0043881a
2 changed files with 4 additions and 11 deletions

View File

@ -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)

View File

@ -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,