From b5e9f3726837983185a096e56f38a54db2b7152c Mon Sep 17 00:00:00 2001 From: AceDataCloud Date: Sun, 12 May 2024 11:06:36 +0800 Subject: [PATCH] Fix conversation reverse list (#41) --- ...datacloud-hub-00b448cf-8cd3-4401-a057-afea1a70a275.json | 7 +++++++ src/store/chat/actions.ts | 2 -- src/store/chatdoc/actions.ts | 2 -- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 change/@acedatacloud-hub-00b448cf-8cd3-4401-a057-afea1a70a275.json diff --git a/change/@acedatacloud-hub-00b448cf-8cd3-4401-a057-afea1a70a275.json b/change/@acedatacloud-hub-00b448cf-8cd3-4401-a057-afea1a70a275.json new file mode 100644 index 00000000..704cc665 --- /dev/null +++ b/change/@acedatacloud-hub-00b448cf-8cd3-4401-a057-afea1a70a275.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix conversations reverse", + "packageName": "@acedatacloud/hub", + "email": "cqc@cuiqingcai.com", + "dependentChangeType": "patch" +} diff --git a/src/store/chat/actions.ts b/src/store/chat/actions.ts index 0fbe6714..0fbed877 100644 --- a/src/store/chat/actions.ts +++ b/src/store/chat/actions.ts @@ -120,8 +120,6 @@ export const getConversations = async ({ log(getConversations, 'get conversations success', response.data?.items); commit('setConversations', response.data.items); const conversations = response.data.items; - // reverse the order of conversations - conversations.reverse(); resolve(conversations); }) .catch((error) => { diff --git a/src/store/chatdoc/actions.ts b/src/store/chatdoc/actions.ts index 4f94cfb3..f2381dcb 100644 --- a/src/store/chatdoc/actions.ts +++ b/src/store/chatdoc/actions.ts @@ -267,8 +267,6 @@ export const getConversations = async ( token }) ).data.items; - // reverse the order of conversations - conversations.reverse(); log(getConversations, 'get conversations success', conversations); commit('setRepository', { id: payload.repositoryId,