This commit is contained in:
GH Action - Upstream Sync
2023-04-19 04:02:29 +00:00

View File

@@ -478,7 +478,7 @@ export const useChatStore = create<ChatStore>()(
n - config.historyMessageCount,
);
const longTermMemoryMessageIndex = session.lastSummarizeIndex;
const oldestIndex = Math.min(
const oldestIndex = Math.max(
shortTermMemoryMessageIndex,
longTermMemoryMessageIndex,
);