mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: format code before submitting it #1251 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import {IChunk, IKnowledgeFile} from '@/interfaces/database/knowledge';
|
||||
import {IChangeParserConfigRequestBody} from '@/interfaces/request/document';
|
||||
import {api_host} from '@/utils/api';
|
||||
import {buildChunkHighlights} from '@/utils/documentUtils';
|
||||
import {UploadFile} from 'antd';
|
||||
import {useCallback, useMemo, useState} from 'react';
|
||||
import {IHighlight} from 'react-pdf-highlighter';
|
||||
import {useDispatch, useSelector} from 'umi';
|
||||
import {useGetKnowledgeSearchParams} from './routeHook';
|
||||
import {useOneNamespaceEffectsLoading} from './storeHooks';
|
||||
import { IChunk, IKnowledgeFile } from '@/interfaces/database/knowledge';
|
||||
import { IChangeParserConfigRequestBody } from '@/interfaces/request/document';
|
||||
import { api_host } from '@/utils/api';
|
||||
import { buildChunkHighlights } from '@/utils/documentUtils';
|
||||
import { UploadFile } from 'antd';
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
import { IHighlight } from 'react-pdf-highlighter';
|
||||
import { useDispatch, useSelector } from 'umi';
|
||||
import { useGetKnowledgeSearchParams } from './routeHook';
|
||||
import { useOneNamespaceEffectsLoading } from './storeHooks';
|
||||
|
||||
export const useGetDocumentUrl = (documentId?: string) => {
|
||||
const getDocumentUrl = useCallback(
|
||||
@ -211,21 +211,21 @@ export const useWebCrawl = () => {
|
||||
const dispatch = useDispatch();
|
||||
const { knowledgeId } = useGetKnowledgeSearchParams();
|
||||
return useCallback(
|
||||
(name: string, url: string) => {
|
||||
try {
|
||||
return dispatch<any>({
|
||||
type: 'kFModel/web_crawl',
|
||||
payload: {
|
||||
name,
|
||||
url,
|
||||
kb_id: knowledgeId,
|
||||
},
|
||||
});
|
||||
} catch (errorInfo) {
|
||||
console.log('Failed:', errorInfo);
|
||||
}
|
||||
},
|
||||
[dispatch],
|
||||
(name: string, url: string) => {
|
||||
try {
|
||||
return dispatch<any>({
|
||||
type: 'kFModel/web_crawl',
|
||||
payload: {
|
||||
name,
|
||||
url,
|
||||
kb_id: knowledgeId,
|
||||
},
|
||||
});
|
||||
} catch (errorInfo) {
|
||||
console.log('Failed:', errorInfo);
|
||||
}
|
||||
},
|
||||
[dispatch],
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user