Skip to content

Commit

Permalink
feat: optimize record history conversation id rule
Browse files Browse the repository at this point in the history
feat: optimize record history conversation id rule
Co-Authored-By: Minghan Zhang <[email protected]>
  • Loading branch information
Sh1n3zZ and zmh-program committed Apr 4, 2024
1 parent 807ff59 commit e60b16f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/src/store/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,14 +439,13 @@ export function useConversationActions() {
return {
toggle: async (id: number) => {
const conversation = conversations[id];
setNumberMemory("history_conversation", id);
if (!conversation) {
const data = await loadConversation(id);
const props: ConversationSerialized = {
model: data.model,
messages: data.message,
};

setNumberMemory("history_conversation", id);
dispatch(
importConversation({
conversation: props,
Expand Down

0 comments on commit e60b16f

Please sign in to comment.