format: 代码格式化检查
This commit is contained in:
parent
1f6258e78c
commit
f1a4f59753
@ -208,7 +208,6 @@ class ConversationRepository:
|
|||||||
The limit applies only to non-pinned conversations to ensure pinned
|
The limit applies only to non-pinned conversations to ensure pinned
|
||||||
conversations are always visible in the list.
|
conversations are always visible in the list.
|
||||||
"""
|
"""
|
||||||
from sqlalchemy import or_
|
|
||||||
|
|
||||||
base_conditions = [Conversation.status == status]
|
base_conditions = [Conversation.status == status]
|
||||||
if user_id:
|
if user_id:
|
||||||
@ -220,7 +219,7 @@ class ConversationRepository:
|
|||||||
pinned_query = (
|
pinned_query = (
|
||||||
select(Conversation)
|
select(Conversation)
|
||||||
.where(*base_conditions)
|
.where(*base_conditions)
|
||||||
.where(Conversation.is_pinned == True)
|
.where(Conversation.is_pinned)
|
||||||
.order_by(Conversation.updated_at.desc())
|
.order_by(Conversation.updated_at.desc())
|
||||||
)
|
)
|
||||||
result = await self.db.execute(pinned_query)
|
result = await self.db.execute(pinned_query)
|
||||||
@ -242,7 +241,7 @@ class ConversationRepository:
|
|||||||
non_pinned_query = (
|
non_pinned_query = (
|
||||||
select(Conversation)
|
select(Conversation)
|
||||||
.where(*base_conditions)
|
.where(*base_conditions)
|
||||||
.where(Conversation.is_pinned == False)
|
.where(~Conversation.is_pinned)
|
||||||
.order_by(Conversation.updated_at.desc())
|
.order_by(Conversation.updated_at.desc())
|
||||||
.limit(remaining_limit)
|
.limit(remaining_limit)
|
||||||
.offset(remaining_offset)
|
.offset(remaining_offset)
|
||||||
|
|||||||
@ -96,7 +96,16 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { computed, h, ref } from 'vue'
|
import { computed, h, ref } from 'vue'
|
||||||
import { message, Modal } from 'ant-design-vue'
|
import { message, Modal } from 'ant-design-vue'
|
||||||
import { PanelLeftClose, MessageSquarePlus, LoaderCircle, Pin, PinOff, Pencil, Trash2, MoreVertical } from 'lucide-vue-next'
|
import {
|
||||||
|
PanelLeftClose,
|
||||||
|
MessageSquarePlus,
|
||||||
|
LoaderCircle,
|
||||||
|
Pin,
|
||||||
|
PinOff,
|
||||||
|
Pencil,
|
||||||
|
Trash2,
|
||||||
|
MoreVertical
|
||||||
|
} from 'lucide-vue-next'
|
||||||
import dayjs, { parseToShanghai } from '@/utils/time'
|
import dayjs, { parseToShanghai } from '@/utils/time'
|
||||||
import { useChatUIStore } from '@/stores/chatUI'
|
import { useChatUIStore } from '@/stores/chatUI'
|
||||||
import { useInfoStore } from '@/stores/info'
|
import { useInfoStore } from '@/stores/info'
|
||||||
|
|||||||
@ -95,7 +95,6 @@ export class ChatExporter {
|
|||||||
}
|
}
|
||||||
: null
|
: null
|
||||||
})
|
})
|
||||||
|
|
||||||
;(messages || []).forEach((item) => {
|
;(messages || []).forEach((item) => {
|
||||||
if (!item) return
|
if (!item) return
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user