Chore/cleanup warnings (#17974)

This commit is contained in:
crazywoola
2025-04-14 11:27:14 +08:00
committed by GitHub
parent f84832e0c2
commit 8f9cbe1c49
69 changed files with 89 additions and 117 deletions

View File

@@ -1,8 +1,6 @@
import React from 'react'
type Props = {}
const index = (props: Props) => {
const index = () => {
return (
<div>index</div>
)

View File

@@ -184,7 +184,7 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
await sleep(2500)
await startQueryStatus()
}
catch (e) {
catch {
await sleep(2500)
await startQueryStatus()
}

View File

@@ -40,7 +40,7 @@ const EmptyDatasetCreationModal = ({
onHide()
router.push(`/datasets/${dataset.id}/documents`)
}
catch (err) {
catch {
notify({ type: 'error', message: t('datasetCreation.stepOne.modal.failed') })
}
}

View File

@@ -130,7 +130,7 @@ const JinaReader: FC<Props> = ({
},
}
}
}, [crawlOptions.limit])
}, [crawlOptions.limit, onCheckedCrawlResultChange])
const handleRun = useCallback(async (url: string) => {
const { isValid, errorMsg } = checkValid(url)
@@ -186,7 +186,7 @@ const JinaReader: FC<Props> = ({
finally {
setStep(Step.finished)
}
}, [checkValid, crawlOptions, onJobIdChange, t, waitForCrawlFinished])
}, [checkValid, crawlOptions, onCheckedCrawlResultChange, onJobIdChange, t, waitForCrawlFinished])
return (
<div>

View File

@@ -193,7 +193,7 @@ const EmbeddingDetail: FC<IEmbeddingDetailProps> = ({
await sleep(2500)
await startQueryStatus()
}
catch (e) {
catch {
await sleep(2500)
await startQueryStatus()
}

View File

@@ -135,7 +135,7 @@ const DocumentDetail: FC<Props> = ({ datasetId, documentId }) => {
params: { metadata: 'without' },
})
const { data: documentMetadata, error: metadataErr, refetch: metadataMutate } = useDocumentMetadata({
const { data: documentMetadata } = useDocumentMetadata({
datasetId,
documentId,
params: { metadata: 'only' },
@@ -146,7 +146,6 @@ const DocumentDetail: FC<Props> = ({ datasetId, documentId }) => {
}
const isDetailLoading = !documentDetail && !error
const isMetadataLoading = !documentMetadata && !metadataErr
const embedding = ['queuing', 'indexing', 'paused'].includes((documentDetail?.display_status || '').toLowerCase())

View File

@@ -14,7 +14,7 @@ const ChildChunks: FC<Props> = ({
payload,
isShowAll,
}) => {
const { id, score, content, position } = payload
const { score, content, position } = payload
return (
<div
className={!isShowAll ? 'line-clamp-2 break-all' : ''}

View File

@@ -55,7 +55,7 @@ const RenameDatasetModal = ({ show, dataset, onSuccess, onClose }: RenameDataset
onSuccess()
onClose()
}
catch (e) {
catch {
notify({ type: 'error', message: t('common.actionMsg.modifiedUnsuccessfully') })
}
finally {

View File

@@ -160,7 +160,7 @@ const Form = () => {
mutate(unstable_serialize(getKey))
}
}
catch (e) {
catch {
notify({ type: 'error', message: t('common.actionMsg.modifiedUnsuccessfully') })
}
finally {