From 52e59cf4df3148d6e8f3afb6d064755c649343c8 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 4 Jul 2024 15:26:38 +0800 Subject: [PATCH] chore: enchance firecrawl user experience (#5958) --- web/app/components/datasets/create/website/firecrawl/index.tsx | 2 ++ .../data-source-page/data-source-website/index.tsx | 2 +- .../header/account-setting/data-source-page/panel/index.tsx | 2 +- web/i18n/en-US/dataset-creation.ts | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/app/components/datasets/create/website/firecrawl/index.tsx b/web/app/components/datasets/create/website/firecrawl/index.tsx index bdd99b6dcd..55a9f6b7ef 100644 --- a/web/app/components/datasets/create/website/firecrawl/index.tsx +++ b/web/app/components/datasets/create/website/firecrawl/index.tsx @@ -118,6 +118,7 @@ const FireCrawl: FC = ({ ...res, total: Math.min(res.total, parseFloat(crawlOptions.limit as string)), }) + onCheckedCrawlResultChange(res.data || []) // default select the crawl result await sleep(2500) return await waitForCrawlFinished(jobId) } @@ -162,6 +163,7 @@ const FireCrawl: FC = ({ } else { setCrawlResult(data) + onCheckedCrawlResultChange(data.data || []) // default select the crawl result setCrawlErrorMessage('') } } diff --git a/web/app/components/header/account-setting/data-source-page/data-source-website/index.tsx b/web/app/components/header/account-setting/data-source-page/data-source-website/index.tsx index 63ad8df0d8..19ec75c6c6 100644 --- a/web/app/components/header/account-setting/data-source-page/data-source-website/index.tsx +++ b/web/app/components/header/account-setting/data-source-page/data-source-website/index.tsx @@ -77,7 +77,7 @@ const DataSourceWebsite: FC = () => { logo: ({ className }: { className: string }) => (
🔥
), - name: 'FireCrawl', + name: 'Firecrawl', isActive: true, }))} onRemove={handleRemove(DataSourceProvider.fireCrawl)} diff --git a/web/app/components/header/account-setting/data-source-page/panel/index.tsx b/web/app/components/header/account-setting/data-source-page/panel/index.tsx index 2c27005d1d..95475059e8 100644 --- a/web/app/components/header/account-setting/data-source-page/panel/index.tsx +++ b/web/app/components/header/account-setting/data-source-page/panel/index.tsx @@ -46,7 +46,7 @@ const Panel: FC = ({
{t(`common.dataSource.${type}.title`)}
{isWebsite && (
- {t('common.dataSource.website.with')} 🔥 FireCrawl + {t('common.dataSource.website.with')} 🔥 Firecrawl
)} diff --git a/web/i18n/en-US/dataset-creation.ts b/web/i18n/en-US/dataset-creation.ts index b2090c3339..23e1aab89f 100644 --- a/web/i18n/en-US/dataset-creation.ts +++ b/web/i18n/en-US/dataset-creation.ts @@ -42,7 +42,7 @@ const translation = { notionSyncTitle: 'Notion is not connected', notionSyncTip: 'To sync with Notion, connection to Notion must be established first.', connect: 'Go to connect', - button: 'next', + button: 'Next', emptyDatasetCreation: 'I want to create an empty Knowledge', modal: { title: 'Create an empty Knowledge',