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)
This commit is contained in:
balibabu 2024-08-27 15:24:28 +08:00 committed by GitHub
parent 0bea7f21ae
commit fc172b4a79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 6 deletions

View File

@ -17,7 +17,7 @@ import { Avatar, Button, Flex, List, Space, Typography } from 'antd';
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;
@ -111,13 +111,13 @@ const MessageItem = ({
)} )}
<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={

View File

@ -94,7 +94,7 @@ export const useSetNextDialog = () => {
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;

View File

@ -243,7 +243,7 @@ export const useSendMessageWithSse = (
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,

View File

@ -34,6 +34,7 @@ export interface IDialog {
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;