balibabu
commited on
Commit
·
f23d414
1
Parent(s):
0874636
feat: Pop-up prompt message after modifying the dialog settings #2088 (#2114)
Browse files### 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
CHANGED
@@ -17,7 +17,7 @@ import { Avatar, Button, Flex, List, Space, Typography } from 'antd';
|
|
17 |
import FileIcon from '../file-icon';
|
18 |
import IndentedTreeModal from '../indented-tree/modal';
|
19 |
import NewDocumentLink from '../new-document-link';
|
20 |
-
import { AssistantGroupButton, UserGroupButton } from './group-button';
|
21 |
import styles from './index.less';
|
22 |
|
23 |
const { Text } = Typography;
|
@@ -111,13 +111,13 @@ const MessageItem = ({
|
|
111 |
)}
|
112 |
<Flex vertical gap={8} flex={1}>
|
113 |
<Space>
|
114 |
-
{isAssistant ? (
|
115 |
<AssistantGroupButton></AssistantGroupButton>
|
116 |
) : (
|
117 |
<UserGroupButton></UserGroupButton>
|
118 |
-
)}
|
119 |
|
120 |
-
|
121 |
</Space>
|
122 |
<div
|
123 |
className={
|
|
|
17 |
import FileIcon from '../file-icon';
|
18 |
import IndentedTreeModal from '../indented-tree/modal';
|
19 |
import NewDocumentLink from '../new-document-link';
|
20 |
+
// import { AssistantGroupButton, UserGroupButton } from './group-button';
|
21 |
import styles from './index.less';
|
22 |
|
23 |
const { Text } = Typography;
|
|
|
111 |
)}
|
112 |
<Flex vertical gap={8} flex={1}>
|
113 |
<Space>
|
114 |
+
{/* {isAssistant ? (
|
115 |
<AssistantGroupButton></AssistantGroupButton>
|
116 |
) : (
|
117 |
<UserGroupButton></UserGroupButton>
|
118 |
+
)} */}
|
119 |
|
120 |
+
<b>{isAssistant ? '' : nickname}</b>
|
121 |
</Space>
|
122 |
<div
|
123 |
className={
|
web/src/hooks/chat-hooks.ts
CHANGED
@@ -94,7 +94,7 @@ export const useSetNextDialog = () => {
|
|
94 |
if (data.retcode === 0) {
|
95 |
queryClient.invalidateQueries({ queryKey: ['fetchDialogList'] });
|
96 |
message.success(
|
97 |
-
i18n.t(`message.${params.
|
98 |
);
|
99 |
}
|
100 |
return data?.retcode;
|
|
|
94 |
if (data.retcode === 0) {
|
95 |
queryClient.invalidateQueries({ queryKey: ['fetchDialogList'] });
|
96 |
message.success(
|
97 |
+
i18n.t(`message.${params.dialog_id ? 'modified' : 'created'}`),
|
98 |
);
|
99 |
}
|
100 |
return data?.retcode;
|
web/src/hooks/logic-hooks.ts
CHANGED
@@ -243,7 +243,7 @@ export const useSendMessageWithSse = (
|
|
243 |
const val = JSON.parse(value?.data || '');
|
244 |
const d = val?.data;
|
245 |
if (typeof d !== 'boolean') {
|
246 |
-
console.info('data:', d);
|
247 |
setAnswer({
|
248 |
...d,
|
249 |
conversationId: body?.conversation_id,
|
|
|
243 |
const val = JSON.parse(value?.data || '');
|
244 |
const d = val?.data;
|
245 |
if (typeof d !== 'boolean') {
|
246 |
+
// console.info('data:', d);
|
247 |
setAnswer({
|
248 |
...d,
|
249 |
conversationId: body?.conversation_id,
|
web/src/interfaces/database/chat.ts
CHANGED
@@ -34,6 +34,7 @@ export interface IDialog {
|
|
34 |
description: string;
|
35 |
icon: string;
|
36 |
id: string;
|
|
|
37 |
kb_ids: string[];
|
38 |
kb_names: string[];
|
39 |
language: string;
|
|
|
34 |
description: string;
|
35 |
icon: string;
|
36 |
id: string;
|
37 |
+
dialog_id?: string;
|
38 |
kb_ids: string[];
|
39 |
kb_names: string[];
|
40 |
language: string;
|