Bugfix/Export all chat messages (#5169)

export all chat messages
This commit is contained in:
Henry Heng
2025-09-04 10:31:23 +01:00
committed by GitHub
parent 763e33b073
commit 23cb5f7801
@@ -361,6 +361,16 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
if ('windows' === getOS()) {
fileSeparator = '\\'
}
const resp = await chatmessageApi.getAllChatmessageFromChatflow(dialogProps.chatflow.id, {
chatType: chatTypeFilter.length ? chatTypeFilter : undefined,
feedbackType: feedbackTypeFilter.length ? feedbackTypeFilter : undefined,
startDate: startDate,
endDate: endDate,
order: 'DESC'
})
const allChatlogs = resp.data ?? []
for (let i = 0; i < allChatlogs.length; i += 1) {
const chatmsg = allChatlogs[i]
const chatPK = getChatPK(chatmsg)