From fc172b4a79ceb62477a07a901a2648dc647ec717 Mon Sep 17 00:00:00 2001 From: balibabu Date: Tue, 27 Aug 2024 15:24:28 +0800 Subject: [PATCH] feat: Pop-up prompt message after modifying the dialog settings #2088 (#2114) ### What problem does this PR solve? feat: Pop-up prompt message after modifying the dialog settings #2088 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- web/src/components/message-item/index.tsx | 8 ++++---- web/src/hooks/chat-hooks.ts | 2 +- web/src/hooks/logic-hooks.ts | 2 +- web/src/interfaces/database/chat.ts | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/web/src/components/message-item/index.tsx b/web/src/components/message-item/index.tsx index a90e92175..176e4c708 100644 --- a/web/src/components/message-item/index.tsx +++ b/web/src/components/message-item/index.tsx @@ -17,7 +17,7 @@ import { Avatar, Button, Flex, List, Space, Typography } from 'antd'; import FileIcon from '../file-icon'; import IndentedTreeModal from '../indented-tree/modal'; import NewDocumentLink from '../new-document-link'; -import { AssistantGroupButton, UserGroupButton } from './group-button'; +// import { AssistantGroupButton, UserGroupButton } from './group-button'; import styles from './index.less'; const { Text } = Typography; @@ -111,13 +111,13 @@ const MessageItem = ({ )} - {isAssistant ? ( + {/* {isAssistant ? ( ) : ( - )} + )} */} - {/* {isAssistant ? '' : nickname} */} + {isAssistant ? '' : nickname}
{ if (data.retcode === 0) { queryClient.invalidateQueries({ queryKey: ['fetchDialogList'] }); message.success( - i18n.t(`message.${params.id ? 'modified' : 'created'}`), + i18n.t(`message.${params.dialog_id ? 'modified' : 'created'}`), ); } return data?.retcode; diff --git a/web/src/hooks/logic-hooks.ts b/web/src/hooks/logic-hooks.ts index 45ba6b0df..7c0b66e75 100644 --- a/web/src/hooks/logic-hooks.ts +++ b/web/src/hooks/logic-hooks.ts @@ -243,7 +243,7 @@ export const useSendMessageWithSse = ( const val = JSON.parse(value?.data || ''); const d = val?.data; if (typeof d !== 'boolean') { - console.info('data:', d); + // console.info('data:', d); setAnswer({ ...d, conversationId: body?.conversation_id, diff --git a/web/src/interfaces/database/chat.ts b/web/src/interfaces/database/chat.ts index 843caaf6a..cadd0b8f0 100644 --- a/web/src/interfaces/database/chat.ts +++ b/web/src/interfaces/database/chat.ts @@ -34,6 +34,7 @@ export interface IDialog { description: string; icon: string; id: string; + dialog_id?: string; kb_ids: string[]; kb_names: string[]; language: string;