feat: support DeepSeek (#667)

### What problem does this PR solve?

#666 
feat: support DeepSeek
feat: preview word and excel

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-05-08 10:30:18 +08:00
committed by GitHub
parent eb27a4309e
commit a553dc8dbd
17 changed files with 1922 additions and 109 deletions

View File

@@ -1,7 +1,7 @@
import { useSelectFileList } from '@/hooks/fileManagerHooks';
import { IFile } from '@/interfaces/database/file-manager';
import { formatDate } from '@/utils/date';
import { Button, Flex, Space, Table, Tag } from 'antd';
import { Button, Flex, Space, Table, Tag, Typography } from 'antd';
import { ColumnsType } from 'antd/es/table';
import ActionCell from './action-cell';
import FileToolbar from './file-toolbar';
@@ -26,6 +26,8 @@ import ConnectToKnowledgeModal from './connect-to-knowledge-modal';
import FolderCreateModal from './folder-create-modal';
import styles from './index.less';
const { Text } = Typography;
const FileManager = () => {
const { t } = useTranslate('fileManager');
const fileList = useSelectFileList();
@@ -69,6 +71,7 @@ const FileManager = () => {
title: t('name'),
dataIndex: 'name',
key: 'name',
fixed: 'left',
render(value, record) {
return (
<Flex gap={10} align="center">
@@ -82,10 +85,10 @@ const FileManager = () => {
className={styles.linkButton}
onClick={() => navigateToOtherFolder(record.id)}
>
{value}
<Text ellipsis={{ tooltip: value }}>{value}</Text>
</Button>
) : (
value
<Text ellipsis={{ tooltip: value }}>{value}</Text>
)}
</Flex>
);
@@ -160,6 +163,7 @@ const FileManager = () => {
rowSelection={rowSelection}
loading={loading}
pagination={pagination}
scroll={{ scrollToFirstRowOnChange: true, x: '100%' }}
/>
<RenameModal
visible={fileRenameVisible}