mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Modify the data structure of the chunk in the conversation #3909 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
35 lines
768 B
TypeScript
35 lines
768 B
TypeScript
import { IModalProps } from '@/interfaces/common';
|
|
import { IReferenceChunk } from '@/interfaces/database/chat';
|
|
import { IChunk } from '@/interfaces/database/knowledge';
|
|
import { Drawer } from 'antd';
|
|
import DocumentPreviewer from '../pdf-previewer';
|
|
|
|
interface IProps extends IModalProps<any> {
|
|
documentId: string;
|
|
chunk: IChunk | IReferenceChunk;
|
|
}
|
|
|
|
export const PdfDrawer = ({
|
|
visible = false,
|
|
hideModal,
|
|
documentId,
|
|
chunk,
|
|
}: IProps) => {
|
|
return (
|
|
<Drawer
|
|
title="Document Previewer"
|
|
onClose={hideModal}
|
|
open={visible}
|
|
width={'50vw'}
|
|
>
|
|
<DocumentPreviewer
|
|
documentId={documentId}
|
|
chunk={chunk}
|
|
visible={visible}
|
|
></DocumentPreviewer>
|
|
</Drawer>
|
|
);
|
|
};
|
|
|
|
export default PdfDrawer;
|