fix: 标题自动总结判断条件修正 - 第一次对话(2条)和每5次对话(10条)

This commit is contained in:
2026-04-26 22:10:40 +08:00
parent c6bdfb15cc
commit 8451f04302
2 changed files with 5 additions and 4 deletions

View File

@@ -927,7 +927,8 @@ async function streamGenerate(userMsgIndex) {
// 自动总结标题第一次对话和每隔5次对话
const totalMessages = currentConversation.messages.length;
if (totalMessages === 1 || totalMessages % 5 === 0) {
// 第一次对话(用户+AI=2条或每5次对话10条
if (totalMessages === 2 || totalMessages % 10 === 0) {
await generateConversationTitle();
}
}

View File

@@ -8,12 +8,12 @@
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>AI助手</title>
<link rel="stylesheet" href="style.css?v=2.7.3">
<link rel="stylesheet" href="style.css?v=2.7.4">
<link rel="manifest" href="manifest.json">
</head>
<body>
<div id="app"></div>
<script src="marked.min.js?v=2.7.3"></script>
<script src="app.js?v=2.7.3"></script>
<script src="marked.min.js?v=2.7.4"></script>
<script src="app.js?v=2.7.4"></script>
</body>
</html>