diff --git a/src/frontend/src/components/bs-comp/chatComponent/messageStore.ts b/src/frontend/src/components/bs-comp/chatComponent/messageStore.ts index 2a5528e24..bbc28a2e3 100644 --- a/src/frontend/src/components/bs-comp/chatComponent/messageStore.ts +++ b/src/frontend/src/components/bs-comp/chatComponent/messageStore.ts @@ -50,7 +50,10 @@ const handleHistoryMsg = (data: any[]): ChatMessageType[] => { .replace(/\r/g, '\\r') // 转义回车符 .replace(/\t/g, '\\t') // 转义制表符 .replace(/'/g, '"'); // 将单引号替换为双引号 - return data.map(item => { + const newData = data.filter(item => + ['answer', 'question', 'processing', 'system', 'report', 'tool', 'knowledge', 'divider', 'flow'].includes(item.category) + ) + return newData.map(item => { // let count = 0 let { message, files, is_bot, intermediate_steps, ...other } = item try {