mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 22:30:38 +08:00
fix: 跳过楼层0(角色卡greeting)的记忆提取
This commit is contained in:
3
index.js
3
index.js
@@ -1749,7 +1749,8 @@ function isAssistantChatMessage(message) {
|
||||
|
||||
function getAssistantTurns(chat) {
|
||||
const assistantTurns = [];
|
||||
for (let index = 0; index < chat.length; index++) {
|
||||
// 从 index 1 开始:index 0 是角色卡首条消息(greeting),不参与提取
|
||||
for (let index = 1; index < chat.length; index++) {
|
||||
if (isAssistantChatMessage(chat[index])) {
|
||||
assistantTurns.push(index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user