### 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)tags/v0.11.0
| import FileIcon from '../file-icon'; | import FileIcon from '../file-icon'; | ||||
| import IndentedTreeModal from '../indented-tree/modal'; | import IndentedTreeModal from '../indented-tree/modal'; | ||||
| import NewDocumentLink from '../new-document-link'; | import NewDocumentLink from '../new-document-link'; | ||||
| import { AssistantGroupButton, UserGroupButton } from './group-button'; | |||||
| // import { AssistantGroupButton, UserGroupButton } from './group-button'; | |||||
| import styles from './index.less'; | import styles from './index.less'; | ||||
| const { Text } = Typography; | const { Text } = Typography; | ||||
| )} | )} | ||||
| <Flex vertical gap={8} flex={1}> | <Flex vertical gap={8} flex={1}> | ||||
| <Space> | <Space> | ||||
| {isAssistant ? ( | |||||
| {/* {isAssistant ? ( | |||||
| <AssistantGroupButton></AssistantGroupButton> | <AssistantGroupButton></AssistantGroupButton> | ||||
| ) : ( | ) : ( | ||||
| <UserGroupButton></UserGroupButton> | <UserGroupButton></UserGroupButton> | ||||
| )} | |||||
| )} */} | |||||
| {/* <b>{isAssistant ? '' : nickname}</b> */} | |||||
| <b>{isAssistant ? '' : nickname}</b> | |||||
| </Space> | </Space> | ||||
| <div | <div | ||||
| className={ | className={ |
| if (data.retcode === 0) { | if (data.retcode === 0) { | ||||
| queryClient.invalidateQueries({ queryKey: ['fetchDialogList'] }); | queryClient.invalidateQueries({ queryKey: ['fetchDialogList'] }); | ||||
| message.success( | message.success( | ||||
| i18n.t(`message.${params.id ? 'modified' : 'created'}`), | |||||
| i18n.t(`message.${params.dialog_id ? 'modified' : 'created'}`), | |||||
| ); | ); | ||||
| } | } | ||||
| return data?.retcode; | return data?.retcode; |
| const val = JSON.parse(value?.data || ''); | const val = JSON.parse(value?.data || ''); | ||||
| const d = val?.data; | const d = val?.data; | ||||
| if (typeof d !== 'boolean') { | if (typeof d !== 'boolean') { | ||||
| console.info('data:', d); | |||||
| // console.info('data:', d); | |||||
| setAnswer({ | setAnswer({ | ||||
| ...d, | ...d, | ||||
| conversationId: body?.conversation_id, | conversationId: body?.conversation_id, |
| description: string; | description: string; | ||||
| icon: string; | icon: string; | ||||
| id: string; | id: string; | ||||
| dialog_id?: string; | |||||
| kb_ids: string[]; | kb_ids: string[]; | ||||
| kb_names: string[]; | kb_names: string[]; | ||||
| language: string; | language: string; |