Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#1689 from Yidadaa/Yidadaa-patch-1
Browse files Browse the repository at this point in the history
fix: ChatGPTNextWeb#1688 wrong clear context index
  • Loading branch information
Yidadaa authored May 22, 2023
2 parents 286a419 + a1073fc commit cbc530b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/store/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cbc530b

Please sign in to comment.