mirror of
https://github.com/open-webui/open-webui
synced 2025-02-16 18:22:29 +00:00
fix: archived chats
This commit is contained in:
parent
466eea1a4c
commit
0b2c7046cd
@ -61,10 +61,12 @@ class ChatModel(BaseModel):
|
|||||||
class ChatForm(BaseModel):
|
class ChatForm(BaseModel):
|
||||||
chat: dict
|
chat: dict
|
||||||
|
|
||||||
|
|
||||||
class ChatTitleMessagesForm(BaseModel):
|
class ChatTitleMessagesForm(BaseModel):
|
||||||
title: str
|
title: str
|
||||||
messages: list[dict]
|
messages: list[dict]
|
||||||
|
|
||||||
|
|
||||||
class ChatTitleForm(BaseModel):
|
class ChatTitleForm(BaseModel):
|
||||||
title: str
|
title: str
|
||||||
|
|
||||||
@ -361,7 +363,7 @@ class ChatTable:
|
|||||||
with get_db() as db:
|
with get_db() as db:
|
||||||
all_chats = (
|
all_chats = (
|
||||||
db.query(Chat)
|
db.query(Chat)
|
||||||
.filter_by(user_id=user_id, pinned=True)
|
.filter_by(user_id=user_id, pinned=True, archived=False)
|
||||||
.order_by(Chat.updated_at.desc())
|
.order_by(Chat.updated_at.desc())
|
||||||
)
|
)
|
||||||
return [ChatModel.model_validate(chat) for chat in all_chats]
|
return [ChatModel.model_validate(chat) for chat in all_chats]
|
||||||
|
@ -311,6 +311,7 @@
|
|||||||
<ArchivedChatsModal
|
<ArchivedChatsModal
|
||||||
bind:show={$showArchivedChats}
|
bind:show={$showArchivedChats}
|
||||||
on:change={async () => {
|
on:change={async () => {
|
||||||
|
await pinnedChats.set(await getPinnedChatList(localStorage.token));
|
||||||
await chats.set(await getChatList(localStorage.token));
|
await chats.set(await getChatList(localStorage.token));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user