Skip to content

Commit bb0c383

Browse files
authored
Merge pull request ChatGPTNextWeb#1689 from Yidadaa/Yidadaa-patch-1
fix: ChatGPTNextWeb#1688 wrong clear context index
2 parents f0b4ef5 + e9642c7 commit bb0c383

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/store/chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export const useChatStore = create<ChatStore>()(
345345

346346
// wont send cleared context messages
347347
const clearedContextMessages = session.messages.slice(
348-
(session.clearContextIndex ?? -1) + 1,
348+
(session.clearContextIndex ?? 0),
349349
);
350350
const messages = clearedContextMessages.filter((msg) => !msg.isError);
351351
const n = messages.length;

0 commit comments

Comments
 (0)