balibabu a3a5a9966f
feat: Supports chatting with files/images #1880 (#1943)
### What problem does this PR solve?

feat: Supports chatting with files/images #1880

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2024-08-14 17:26:47 +08:00

32 lines
753 B
TypeScript

import { useFetchKnowledgeGraph } from '@/hooks/chunk-hooks';
import { Modal } from 'antd';
import { useTranslation } from 'react-i18next';
import IndentedTree from './indented-tree';
import { IModalProps } from '@/interfaces/common';
const IndentedTreeModal = ({
documentId,
visible,
hideModal,
}: IModalProps<any> & { documentId: string }) => {
const { data } = useFetchKnowledgeGraph(documentId);
const { t } = useTranslation();
return (
<Modal
title={t('chunk.graph')}
open={visible}
onCancel={hideModal}
width={'90vw'}
footer={null}
>
<section>
<IndentedTree data={data?.data?.mind_map} show></IndentedTree>
</section>
</Modal>
);
};
export default IndentedTreeModal;