mirror of
https://mirror.skon.top/github.com/langgenius/dify.git
synced 2026-04-20 15:20:15 +08:00
refactor(web): convert file-local Step enum to as-const in website crawlers 🤖🤖🤖 (#34565)
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -2449,9 +2449,6 @@
|
||||
}
|
||||
},
|
||||
"web/app/components/datasets/create/website/firecrawl/index.tsx": {
|
||||
"erasable-syntax-only/enums": {
|
||||
"count": 1
|
||||
},
|
||||
"no-console": {
|
||||
"count": 1
|
||||
},
|
||||
@@ -2468,9 +2465,6 @@
|
||||
}
|
||||
},
|
||||
"web/app/components/datasets/create/website/jina-reader/index.tsx": {
|
||||
"erasable-syntax-only/enums": {
|
||||
"count": 1
|
||||
},
|
||||
"no-console": {
|
||||
"count": 1
|
||||
},
|
||||
@@ -2487,9 +2481,6 @@
|
||||
}
|
||||
},
|
||||
"web/app/components/datasets/create/website/watercrawl/index.tsx": {
|
||||
"erasable-syntax-only/enums": {
|
||||
"count": 1
|
||||
},
|
||||
"no-console": {
|
||||
"count": 1
|
||||
},
|
||||
|
||||
@@ -27,11 +27,12 @@ type Props = {
|
||||
crawlOptions: CrawlOptions
|
||||
onCrawlOptionsChange: (payload: CrawlOptions) => void
|
||||
}
|
||||
enum Step {
|
||||
init = 'init',
|
||||
running = 'running',
|
||||
finished = 'finished',
|
||||
}
|
||||
const Step = {
|
||||
init: 'init',
|
||||
running: 'running',
|
||||
finished: 'finished',
|
||||
} as const
|
||||
type Step = typeof Step[keyof typeof Step]
|
||||
type CrawlState = {
|
||||
current: number
|
||||
total: number
|
||||
|
||||
@@ -27,11 +27,12 @@ type Props = {
|
||||
crawlOptions: CrawlOptions
|
||||
onCrawlOptionsChange: (payload: CrawlOptions) => void
|
||||
}
|
||||
enum Step {
|
||||
init = 'init',
|
||||
running = 'running',
|
||||
finished = 'finished',
|
||||
}
|
||||
const Step = {
|
||||
init: 'init',
|
||||
running: 'running',
|
||||
finished: 'finished',
|
||||
} as const
|
||||
type Step = typeof Step[keyof typeof Step]
|
||||
const JinaReader: FC<Props> = ({ onPreview, checkedCrawlResult, onCheckedCrawlResultChange, onJobIdChange, crawlOptions, onCrawlOptionsChange }) => {
|
||||
const { t } = useTranslation()
|
||||
const [step, setStep] = useState<Step>(Step.init)
|
||||
|
||||
@@ -27,11 +27,12 @@ type Props = {
|
||||
crawlOptions: CrawlOptions
|
||||
onCrawlOptionsChange: (payload: CrawlOptions) => void
|
||||
}
|
||||
enum Step {
|
||||
init = 'init',
|
||||
running = 'running',
|
||||
finished = 'finished',
|
||||
}
|
||||
const Step = {
|
||||
init: 'init',
|
||||
running: 'running',
|
||||
finished: 'finished',
|
||||
} as const
|
||||
type Step = typeof Step[keyof typeof Step]
|
||||
const WaterCrawl: FC<Props> = ({ onPreview, checkedCrawlResult, onCheckedCrawlResultChange, onJobIdChange, crawlOptions, onCrawlOptionsChange }) => {
|
||||
const { t } = useTranslation()
|
||||
const [step, setStep] = useState<Step>(Step.init)
|
||||
|
||||
Reference in New Issue
Block a user