Skip to content

Commit

Permalink
Merge pull request #355 from cesaryuan/patch-1
Browse files Browse the repository at this point in the history
fix: fix history message count
  • Loading branch information
Yidadaa authored Apr 2, 2023
2 parents cf6f09b + a356ee8 commit fdbdd33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/store/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ export const useChatStore = create<ChatStore>()(
const config = get().config;
const n = session.messages.length;
const recentMessages = session.messages.slice(
n - config.historyMessageCount,
Math.max(0, n - config.historyMessageCount),
);

const memoryPrompt = get().getMemoryPrompt();
Expand Down

1 comment on commit fdbdd33

@vercel
Copy link

@vercel vercel bot commented on fdbdd33 Apr 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.