From fb0956025940617be40bff3e6e1c93b89083a4d9 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Sun, 26 Apr 2026 22:44:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=B9=E8=AF=9D=E6=80=BB=E7=BB=93?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=94=B9=E4=B8=BA=E4=B8=8D=E8=B6=85=E8=BF=87?= =?UTF-8?q?20=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/app.js | 4 ++-- www/index.html | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/www/app.js b/www/app.js index bc36a99..c31c5b5 100644 --- a/www/app.js +++ b/www/app.js @@ -1010,7 +1010,7 @@ async function generateConversationTitle() { `${m.role === 'user' ? '用户' : 'AI'}: ${m.content.slice(0, 200)}` ).join('\n'); - const titlePrompt = `请用不超过10个字总结以下对话的主题,只输出标题,不要其他内容: + const titlePrompt = `请用不超过20个字总结以下对话的主题,只输出标题,不要其他内容: ${conversationText}`; try { @@ -1039,7 +1039,7 @@ ${conversationText}`; if (newTitle && newTitle.length > 0) { // 去掉可能的引号和多余符号 const cleanTitle = newTitle.replace(/^["'"']+|["'"']+$/g, '').trim(); - if (cleanTitle.length > 0 && cleanTitle.length <= 20) { + if (cleanTitle.length > 0 && cleanTitle.length <= 30) { currentConversation.title = cleanTitle; currentConversation.updatedAt = Date.now(); saveConversations(); diff --git a/www/index.html b/www/index.html index 68f0809..c3a395e 100644 --- a/www/index.html +++ b/www/index.html @@ -8,12 +8,12 @@