mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Exclude reference from the data returned by the conversation/get interface #3909 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { EmptyConversationId, MessageType } from '@/constants/chat';
|
||||
import { Message } from '@/interfaces/database/chat';
|
||||
import { IMessage } from '@/pages/chat/interface';
|
||||
import { omit } from 'lodash';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
export const isConversationIdExist = (conversationId: string) => {
|
||||
@ -27,7 +28,7 @@ export const getMessagePureId = (id?: string) => {
|
||||
export const buildMessageListWithUuid = (messages?: Message[]) => {
|
||||
return (
|
||||
messages?.map((x: Message | IMessage) => ({
|
||||
...x,
|
||||
...omit(x, 'reference'),
|
||||
id: buildMessageUuid(x),
|
||||
})) ?? []
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user