File size: 719 Bytes
c947a89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { IModalProps } from '@/interfaces/common';
import { IFeedbackRequestBody } from '@/interfaces/request/chat';
import { Modal, Space } from 'antd';
import HightLightMarkdown from '../highlight-markdown';
import SvgIcon from '../svg-icon';

const PromptModal = ({
  visible,
  hideModal,
  prompt,
}: IModalProps<IFeedbackRequestBody> & { prompt?: string }) => {
  return (
    <Modal
      title={
        <Space>
          <SvgIcon name={`prompt`} width={18}></SvgIcon>
          Prompt
        </Space>
      }
      width={'80%'}
      open={visible}
      onCancel={hideModal}
      footer={null}
    >
      <HightLightMarkdown>{prompt}</HightLightMarkdown>
    </Modal>
  );
};

export default PromptModal;