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:
Cesaryuan 2023-04-02 19:43:11 +08:00 committed by GitHub
parent d226090926
commit fea4f561b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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();