mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? fix: thumbnails are too large in the chat box #818 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -6,6 +6,7 @@ import {
|
||||
useSubmitKnowledgeConfiguration,
|
||||
} from './hooks';
|
||||
|
||||
import LayoutRecognize from '@/components/layout-recognize';
|
||||
import MaxTokenNumber from '@/components/max-token-number';
|
||||
import { useTranslate } from '@/hooks/commonHooks';
|
||||
import { FormInstance } from 'antd/lib';
|
||||
@ -99,11 +100,17 @@ const ConfigurationForm = ({ form }: { form: FormInstance }) => {
|
||||
const parserId = getFieldValue('parser_id');
|
||||
|
||||
if (parserId === 'naive') {
|
||||
return <MaxTokenNumber></MaxTokenNumber>;
|
||||
return (
|
||||
<>
|
||||
<MaxTokenNumber></MaxTokenNumber>
|
||||
<LayoutRecognize></LayoutRecognize>
|
||||
</>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}}
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item>
|
||||
<div className={styles.buttonWrapper}>
|
||||
<Space>
|
||||
|
||||
@ -36,6 +36,9 @@
|
||||
// .referenceIcon {
|
||||
// padding: 0 6px;
|
||||
// }
|
||||
.thumbnailImg {
|
||||
max-width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.messageItemLeft {
|
||||
|
||||
@ -105,7 +105,10 @@ const MessageItem = ({
|
||||
<List.Item>
|
||||
<Flex gap={'small'} align="center">
|
||||
{fileThumbnail ? (
|
||||
<img src={fileThumbnail}></img>
|
||||
<img
|
||||
src={fileThumbnail}
|
||||
className={styles.thumbnailImg}
|
||||
></img>
|
||||
) : (
|
||||
<SvgIcon
|
||||
name={`file-icon/${fileExtension}`}
|
||||
|
||||
@ -39,6 +39,9 @@
|
||||
.messageEmpty {
|
||||
width: 300px;
|
||||
}
|
||||
.thumbnailImg {
|
||||
max-width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.messageItemLeft {
|
||||
|
||||
@ -94,7 +94,10 @@ const MessageItem = ({
|
||||
<List.Item>
|
||||
<Flex gap={'small'} align="center">
|
||||
{fileThumbnail ? (
|
||||
<img src={fileThumbnail}></img>
|
||||
<img
|
||||
src={fileThumbnail}
|
||||
className={styles.thumbnailImg}
|
||||
></img>
|
||||
) : (
|
||||
<SvgIcon
|
||||
name={`file-icon/${fileExtension}`}
|
||||
|
||||
Reference in New Issue
Block a user