export all chat messages

This commit is contained in:
Henry 2025-09-04 10:21:58 +01:00
parent 763e33b073
commit 4cc8c110d4
1 changed files with 10 additions and 0 deletions

View File

@ -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)