fix: pinned chats in ref chat

This commit is contained in:
Timothy Jaeryang Baek
2025-10-14 18:06:29 -05:00
parent 9971919ca1
commit 5fe56a862b
4 changed files with 16 additions and 4 deletions

View File

@@ -112,6 +112,7 @@ export const importChat = async (
export const getChatList = async (
token: string = '',
page: number | null = null,
include_pinned: boolean = false,
include_folders: boolean = false
) => {
let error = null;
@@ -125,6 +126,10 @@ export const getChatList = async (
searchParams.append('include_folders', 'true');
}
if (include_pinned) {
searchParams.append('include_pinned', 'true');
}
const res = await fetch(`${WEBUI_API_BASE_URL}/chats/?${searchParams.toString()}`, {
method: 'GET',
headers: {

View File

@@ -31,7 +31,7 @@
const getItemsPage = async () => {
itemsLoading = true;
let res = await getChatList(localStorage.token, page, true).catch(() => {
let res = await getChatList(localStorage.token, page, true, true).catch(() => {
return [];
});