fix(app):

1.Handling of large file upload issues;
2. Handling of abnormal display of conversation titles when the opening remarks function is enabled
This commit is contained in:
Timebomb2018
2026-03-27 16:27:09 +08:00
parent ad5dc3c138
commit 46fa99a8b8
7 changed files with 121 additions and 35 deletions

View File

@@ -214,14 +214,14 @@ class ConversationService:
conversation.message_count += 1
if conversation.message_count == 1 and role == "user":
self.db.commit()
self.db.refresh(message)
if conversation.is_first_user_message and role == "user":
conversation.title = (
content[:50] + ("..." if len(content) > 50 else "")
)
self.db.commit()
self.db.refresh(message)
logger.info(
"Message added successfully",
extra={