Skip to content

Commit 23cb5f7

Browse files
authored
Bugfix/Export all chat messages (#5169)
export all chat messages
1 parent 763e33b commit 23cb5f7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/ui/src/ui-component/dialog/ViewMessagesDialog.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,16 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
361361
if ('windows' === getOS()) {
362362
fileSeparator = '\\'
363363
}
364+
365+
const resp = await chatmessageApi.getAllChatmessageFromChatflow(dialogProps.chatflow.id, {
366+
chatType: chatTypeFilter.length ? chatTypeFilter : undefined,
367+
feedbackType: feedbackTypeFilter.length ? feedbackTypeFilter : undefined,
368+
startDate: startDate,
369+
endDate: endDate,
370+
order: 'DESC'
371+
})
372+
373+
const allChatlogs = resp.data ?? []
364374
for (let i = 0; i < allChatlogs.length; i += 1) {
365375
const chatmsg = allChatlogs[i]
366376
const chatPK = getChatPK(chatmsg)

0 commit comments

Comments
 (0)