Skip to content

Commit 737eb51

Browse files
committed
feat: Hide KnowledgeGraphModal infiniflow#162
1 parent 3a739e3 commit 737eb51

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

web/src/components/chunk-method-modal/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import React, { useEffect, useMemo } from 'react';
2222
import { useFetchParserListOnMount } from './hooks';
2323

2424
import { useTranslate } from '@/hooks/common-hooks';
25-
import EntityTypesForm from '../entity-types-form';
25+
import EntityTypesItem from '../entity-types-item';
2626
import LayoutRecognize from '../layout-recognize';
2727
import ParseConfiguration, {
2828
showRaptorParseConfiguration,
@@ -272,7 +272,7 @@ const ChunkMethodModal: React.FC<IProps> = ({
272272
{showRaptorParseConfiguration(selectedTag) && (
273273
<ParseConfiguration></ParseConfiguration>
274274
)}
275-
{showEntityTypes && <EntityTypesForm></EntityTypesForm>}
275+
{showEntityTypes && <EntityTypesItem></EntityTypesItem>}
276276
</Form>
277277
</Modal>
278278
);

web/src/components/entity-types-form.tsx renamed to web/src/components/entity-types-item.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const initialEntityTypes = [
1010
'time',
1111
];
1212

13-
const EntityTypesForm = () => {
13+
const EntityTypesItem = () => {
1414
const { t } = useTranslate('knowledgeConfiguration');
1515
return (
1616
<Form.Item
@@ -26,4 +26,4 @@ const EntityTypesForm = () => {
2626
);
2727
};
2828

29-
export default EntityTypesForm;
29+
export default EntityTypesItem;

web/src/pages/add-knowledge/components/knowledge-chunk/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ const Chunk = () => {
195195
onOk={onChunkUpdatingOk}
196196
/>
197197
)}
198-
<KnowledgeGraphModal></KnowledgeGraphModal>
198+
{false && <KnowledgeGraphModal></KnowledgeGraphModal>}
199199
</>
200200
);
201201
};

web/src/pages/add-knowledge/components/knowledge-setting/configuration.tsx

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
import { normFile } from '@/utils/file-util';
2-
import { PlusOutlined } from '@ant-design/icons';
3-
import { Button, Form, Input, Radio, Select, Space, Upload } from 'antd';
4-
import {
5-
useFetchKnowledgeConfigurationOnMount,
6-
useSubmitKnowledgeConfiguration,
7-
} from './hooks';
8-
9-
import EntityTypesForm from '@/components/entity-types-form';
1+
import EntityTypesItem from '@/components/entity-types-item';
102
import LayoutRecognize from '@/components/layout-recognize';
113
import MaxTokenNumber from '@/components/max-token-number';
124
import ParseConfiguration, {
135
showRaptorParseConfiguration,
146
} from '@/components/parse-configuration';
157
import { useTranslate } from '@/hooks/common-hooks';
8+
import { normFile } from '@/utils/file-util';
9+
import { PlusOutlined } from '@ant-design/icons';
10+
import { Button, Form, Input, Radio, Select, Space, Upload } from 'antd';
1611
import { FormInstance } from 'antd/lib';
12+
import {
13+
useFetchKnowledgeConfigurationOnMount,
14+
useSubmitKnowledgeConfiguration,
15+
} from './hooks';
1716
import styles from './index.less';
1817

1918
const { Option } = Select;
@@ -99,7 +98,7 @@ const ConfigurationForm = ({ form }: { form: FormInstance }) => {
9998
))}
10099
</Select>
101100
</Form.Item>
102-
<EntityTypesForm></EntityTypesForm>
101+
<EntityTypesItem></EntityTypesItem>
103102
<Form.Item noStyle dependencies={['parser_id']}>
104103
{({ getFieldValue }) => {
105104
const parserId = getFieldValue('parser_id');

0 commit comments

Comments
 (0)