From f1a4f597530d91ac5d204d0b89ba00f610a3c755 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Sat, 7 Mar 2026 23:00:26 +0800 Subject: [PATCH] =?UTF-8?q?format:=20=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/repositories/conversation_repository.py | 5 ++--- web/src/components/ChatSidebarComponent.vue | 11 ++++++++++- web/src/utils/chatExporter.js | 1 - 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/repositories/conversation_repository.py b/src/repositories/conversation_repository.py index 7f3a1746..ae8d3f0f 100644 --- a/src/repositories/conversation_repository.py +++ b/src/repositories/conversation_repository.py @@ -208,7 +208,6 @@ class ConversationRepository: The limit applies only to non-pinned conversations to ensure pinned conversations are always visible in the list. """ - from sqlalchemy import or_ base_conditions = [Conversation.status == status] if user_id: @@ -220,7 +219,7 @@ class ConversationRepository: pinned_query = ( select(Conversation) .where(*base_conditions) - .where(Conversation.is_pinned == True) + .where(Conversation.is_pinned) .order_by(Conversation.updated_at.desc()) ) result = await self.db.execute(pinned_query) @@ -242,7 +241,7 @@ class ConversationRepository: non_pinned_query = ( select(Conversation) .where(*base_conditions) - .where(Conversation.is_pinned == False) + .where(~Conversation.is_pinned) .order_by(Conversation.updated_at.desc()) .limit(remaining_limit) .offset(remaining_offset) diff --git a/web/src/components/ChatSidebarComponent.vue b/web/src/components/ChatSidebarComponent.vue index 802f82ba..78a66bba 100644 --- a/web/src/components/ChatSidebarComponent.vue +++ b/web/src/components/ChatSidebarComponent.vue @@ -96,7 +96,16 @@