fix: omit long file names (#608)

### What problem does this PR solve?

#607
fix: omit long file names
fix: change the parsing method from tag to select
fix: replace icon for new chat
fix: change the OK button text of the Chat Bot API modal to close


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-04-29 18:22:17 +08:00
committed by GitHub
parent 2af74cc494
commit 4c1476032d
12 changed files with 63 additions and 45 deletions

View File

@ -13,9 +13,9 @@ import {
Form,
InputNumber,
Modal,
Select,
Space,
Switch,
Tag,
Tooltip,
} from 'antd';
import omit from 'lodash/omit';
@ -25,8 +25,6 @@ import { useFetchParserListOnMount } from './hooks';
import { useTranslate } from '@/hooks/commonHooks';
import styles from './index.less';
const { CheckableTag } = Tag;
interface IProps extends Omit<IModalManagerChildrenProps, 'showModal'> {
loading: boolean;
onOk: (
@ -113,21 +111,14 @@ const ChunkMethodModal: React.FC<IProps> = ({
afterClose={afterClose}
>
<Space size={[0, 8]} wrap>
<div className={styles.tags}>
{parserList.map((x) => {
return (
<CheckableTag
key={x.value}
checked={selectedTag === x.value}
onChange={(checked) => {
handleChange(x.value, checked);
}}
>
{x.label}
</CheckableTag>
);
})}
</div>
<Form.Item label={t('chunkMethod')} className={styles.chunkMethod}>
<Select
style={{ width: 120 }}
onChange={handleChange}
value={selectedTag}
options={parserList}
/>
</Form.Item>
</Space>
{hideDivider || <Divider></Divider>}
<Form name="dynamic_form_nest_item" autoComplete="off" form={form}>