diff --git a/astrbot/core/db/sqlite.py b/astrbot/core/db/sqlite.py index d8c1684a7..f9faede19 100644 --- a/astrbot/core/db/sqlite.py +++ b/astrbot/core/db/sqlite.py @@ -32,6 +32,12 @@ async def initialize(self) -> None: """Initialize the database by creating tables if they do not exist.""" async with self.engine.begin() as conn: await conn.run_sync(SQLModel.metadata.create_all) + await conn.execute(text("PRAGMA journal_mode=WAL")) + await conn.execute(text("PRAGMA synchronous=NORMAL")) + await conn.execute(text("PRAGMA cache_size=20000")) + await conn.execute(text("PRAGMA temp_store=MEMORY")) + await conn.execute(text("PRAGMA mmap_size=134217728")) + await conn.execute(text("PRAGMA optimize")) await conn.commit() # ==== @@ -160,6 +166,7 @@ async def get_filtered_conversations( col(ConversationV2.title).ilike(f"%{search_query}%"), col(ConversationV2.content).ilike(f"%{search_query}%"), col(ConversationV2.user_id).ilike(f"%{search_query}%"), + col(ConversationV2.conversation_id).ilike(f"%{search_query}%"), ) ) if "message_types" in kwargs and len(kwargs["message_types"]) > 0: diff --git a/dashboard/src/views/ConversationPage.vue b/dashboard/src/views/ConversationPage.vue index 35242db78..753cd735f 100644 --- a/dashboard/src/views/ConversationPage.vue +++ b/dashboard/src/views/ConversationPage.vue @@ -10,7 +10,7 @@ + density="compact" hide-details>