fix: #915 allow send 0 history messages

This commit is contained in:
Yifei Zhang
2023-04-19 11:20:07 +08:00
committed by GitHub
parent e68f17b463
commit 072a35b4ee

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,
);