fix: typo fix

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
Soulter
2025-06-10 13:02:30 +08:00
committed by GitHub
parent a6d91933dc
commit 581f9b7bd3
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ class ChatRoute(Route):
username = g.get("username", "guest")
post_data = await request.json
if "conversation_id" not in post_data or "title" not in post_data:
return Response().error("Missing key: conversation_id or titke").__dict__
return Response().error("Missing key: conversation_id or title").__dict__
conversation_id = post_data["conversation_id"]
title = post_data["title"]
+3 -2
View File
@@ -308,15 +308,16 @@ export default {
saveTitle() {
if (!this.editingCid) return;
const trimmedTitle = this.editingTitle.trim();
axios.post('/api/chat/rename_conversation', {
conversation_id: this.editingCid,
title: this.editingTitle
title: trimmedTitle
})
.then(response => {
// 更新本地对话列表中的标题
const conversation = this.conversations.find(c => c.cid === this.editingCid);
if (conversation) {
conversation.title = this.editingTitle;
conversation.title = trimmedTitle;
}
this.editTitleDialog = false;
})