refactor(memory): update end index of memory slice

This commit is contained in:
2026-03-29 16:15:30 +08:00
parent eb1723de97
commit 247052e318

View File

@@ -152,7 +152,7 @@ public class MemoryUpdater extends AbstractAgentModule.Running<PartnerRunningFlo
MemorySlice memorySlice = new MemorySlice(); MemorySlice memorySlice = new MemorySlice();
memorySlice.setId(UUID.randomUUID().toString()); memorySlice.setId(UUID.randomUUID().toString());
memorySlice.setStartIndex(0); memorySlice.setStartIndex(0);
memorySlice.setEndIndex(Math.max(chatMessages.size() - 1, 0)); memorySlice.setEndIndex(chatMessages.size());
memorySlice.setSummary(summarizeResult.getSummary()); memorySlice.setSummary(summarizeResult.getSummary());
memorySlice.setTimestamp(now); memorySlice.setTimestamp(now);