forked from XiaoMo/ChatGPT-Next-Web
fix: #1688 wrong clear context index
This commit is contained in:
parent
f0b4ef5917
commit
e9642c7505
@ -345,7 +345,7 @@ export const useChatStore = create<ChatStore>()(
|
|||||||
|
|
||||||
// wont send cleared context messages
|
// wont send cleared context messages
|
||||||
const clearedContextMessages = session.messages.slice(
|
const clearedContextMessages = session.messages.slice(
|
||||||
(session.clearContextIndex ?? -1) + 1,
|
(session.clearContextIndex ?? 0),
|
||||||
);
|
);
|
||||||
const messages = clearedContextMessages.filter((msg) => !msg.isError);
|
const messages = clearedContextMessages.filter((msg) => !msg.isError);
|
||||||
const n = messages.length;
|
const n = messages.length;
|
||||||
|
Loading…
Reference in New Issue
Block a user