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 @@ AI助手 - +
- - + + \ No newline at end of file