mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 15:46:06 +08:00
fix: fix history message count
Bug: The length of `new Array(20).slice(20 - 24) ` is 4 which should be 24.
This commit is contained in:
@@ -384,7 +384,7 @@ export const useChatStore = create<ChatStore>()(
|
||||
const config = get().config;
|
||||
const n = session.messages.length;
|
||||
const recentMessages = session.messages.slice(
|
||||
n - config.historyMessageCount,
|
||||
- config.historyMessageCount,
|
||||
);
|
||||
|
||||
const memoryPrompt = get().getMemoryPrompt();
|
||||
|
Reference in New Issue
Block a user