From c91456de1b9a264bfe17288920c3fda90132d0c4 Mon Sep 17 00:00:00 2001 From: twwu Date: Tue, 10 Jun 2025 10:43:40 +0800 Subject: [PATCH 1/3] fix(ChunkStructure): add disabled prop to OptionCard component --- web/app/components/datasets/settings/chunk-structure/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/app/components/datasets/settings/chunk-structure/index.tsx b/web/app/components/datasets/settings/chunk-structure/index.tsx index 8ffe562725..4cc6d75b4c 100644 --- a/web/app/components/datasets/settings/chunk-structure/index.tsx +++ b/web/app/components/datasets/settings/chunk-structure/index.tsx @@ -29,6 +29,7 @@ const ChunkStructure = ({ effectColor={option.effectColor} showEffectColor className='gap-x-1.5 p-3 pr-4' + disabled /> )) } From d3eedaf0ecf4f3c81d8cf2a141dd980da7f110c5 Mon Sep 17 00:00:00 2001 From: twwu Date: Tue, 10 Jun 2025 14:22:09 +0800 Subject: [PATCH 2/3] feat(i18n): add new translation entries for local file, website crawl, and online document --- web/i18n/en-US/dataset-documents.ts | 3 +++ web/i18n/zh-Hans/dataset-documents.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/web/i18n/en-US/dataset-documents.ts b/web/i18n/en-US/dataset-documents.ts index 2a79324477..97948d9797 100644 --- a/web/i18n/en-US/dataset-documents.ts +++ b/web/i18n/en-US/dataset-documents.ts @@ -97,6 +97,9 @@ const translation = { upload_file: 'Upload File', notion: 'Sync form Notion', github: 'Sync form Github', + local_file: 'Local File', + website_crawl: 'Website Crawl', + online_document: 'Online Document', }, type: { book: 'Book', diff --git a/web/i18n/zh-Hans/dataset-documents.ts b/web/i18n/zh-Hans/dataset-documents.ts index 5ff1b50f85..be922f9540 100644 --- a/web/i18n/zh-Hans/dataset-documents.ts +++ b/web/i18n/zh-Hans/dataset-documents.ts @@ -96,6 +96,9 @@ const translation = { upload_file: '文件上传', notion: '从 Notion 同步的文档', github: '从 Github 同步的代码', + local_file: '本地文件', + website_crawl: '网站爬取', + online_document: '在线文档', }, type: { book: '书籍', From 5e71f7c8250f6111dfa339e01dea3ec672ade908 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Tue, 10 Jun 2025 15:09:32 +0800 Subject: [PATCH 3/3] publish as pipeline --- .../data-source-options/hooks.tsx | 2 +- .../rag-pipeline-header/publisher/popup.tsx | 11 ++++++++++- .../components/workflow/hooks/use-nodes-meta-data.ts | 4 ++-- web/app/components/workflow/hooks/use-tool-icon.ts | 4 ++-- web/service/use-pipeline.ts | 11 +++++++++++ 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source-options/hooks.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source-options/hooks.tsx index 4ceec18733..7f3a736da8 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/data-source-options/hooks.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/data-source-options/hooks.tsx @@ -24,7 +24,7 @@ export const useDatasourceIcon = (data: DataSourceNodeType) => { useDataSourceList(!!pipelineId, handleUpdateDataSourceList) const datasourceIcon = useMemo(() => { - return dataSourceList?.find(toolWithProvider => toolWithProvider.name === data.provider_id)?.icon + return dataSourceList?.find(toolWithProvider => toolWithProvider.plugin_id === data.plugin_id)?.icon }, [data, dataSourceList]) return datasourceIcon diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx index 3349192087..8b1e38b35c 100644 --- a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx +++ b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx @@ -31,7 +31,10 @@ import { useToastContext } from '@/app/components/base/toast' import { useParams, useRouter } from 'next/navigation' import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail' import { useInvalid } from '@/service/use-base' -import { publishedPipelineInfoQueryKeyPrefix } from '@/service/use-pipeline' +import { + publishedPipelineInfoQueryKeyPrefix, + usePublishAsCustomizedPipeline, +} from '@/service/use-pipeline' import Confirm from '@/app/components/base/confirm' const PUBLISH_SHORTCUT = ['⌘', '⇧', 'P'] @@ -58,6 +61,10 @@ const Popup = () => { setFalse: hidePublishing, setTrue: showPublishing, }] = useBoolean(false) + const { + mutate: publishAsCustomizedPipeline, + isPending: isPublishingAsCustomizedPipeline, + } = usePublishAsCustomizedPipeline() const invalidPublishedPipelineInfo = useInvalid([...publishedPipelineInfoQueryKeyPrefix, pipelineId]) @@ -183,6 +190,8 @@ const Popup = () => {