fix: 标题自动总结判断条件修正 - 第一次对话(2条)和每5次对话(10条)
This commit is contained in:
@@ -927,7 +927,8 @@ async function streamGenerate(userMsgIndex) {
|
|||||||
|
|
||||||
// 自动总结标题:第一次对话和每隔5次对话
|
// 自动总结标题:第一次对话和每隔5次对话
|
||||||
const totalMessages = currentConversation.messages.length;
|
const totalMessages = currentConversation.messages.length;
|
||||||
if (totalMessages === 1 || totalMessages % 5 === 0) {
|
// 第一次对话(用户+AI=2条)或每5次对话(10条)
|
||||||
|
if (totalMessages === 2 || totalMessages % 10 === 0) {
|
||||||
await generateConversationTitle();
|
await generateConversationTitle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
<meta http-equiv="Pragma" content="no-cache">
|
<meta http-equiv="Pragma" content="no-cache">
|
||||||
<meta http-equiv="Expires" content="0">
|
<meta http-equiv="Expires" content="0">
|
||||||
<title>AI助手</title>
|
<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">
|
<link rel="manifest" href="manifest.json">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script src="marked.min.js?v=2.7.3"></script>
|
<script src="marked.min.js?v=2.7.4"></script>
|
||||||
<script src="app.js?v=2.7.3"></script>
|
<script src="app.js?v=2.7.4"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user