fix: #1688 wrong clear context index

main
Yifei Zhang 2 years ago committed by GitHub
parent f0b4ef5917
commit e9642c7505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -345,7 +345,7 @@ export const useChatStore = create<ChatStore>()(
// wont send cleared context messages
const clearedContextMessages = session.messages.slice(
(session.clearContextIndex ?? -1) + 1,
(session.clearContextIndex ?? 0),
);
const messages = clearedContextMessages.filter((msg) => !msg.isError);
const n = messages.length;

Loading…
Cancel
Save