diff --git a/web/app/components/rag-pipeline/components/publish-toast.tsx b/web/app/components/rag-pipeline/components/publish-toast.tsx
new file mode 100644
index 0000000000..1f89b60e01
--- /dev/null
+++ b/web/app/components/rag-pipeline/components/publish-toast.tsx
@@ -0,0 +1,47 @@
+import {
+ memo,
+ useState,
+} from 'react'
+import { useTranslation } from 'react-i18next'
+import {
+ RiCloseLine,
+ RiInformation2Fill,
+} from '@remixicon/react'
+import { useStore } from '@/app/components/workflow/store'
+
+const PublishToast = () => {
+ const { t } = useTranslation()
+ const publishedAt = useStore(s => s.publishedAt)
+ const [hideToast, setHideToast] = useState(false)
+
+ if (publishedAt || hideToast)
+ return null
+
+ return (
+
+
+
+
+
+
+
+
+
{t('pipeline.publishToast.title')}
+
+ {t('pipeline.publishToast.desc')}
+
+
+
setHideToast(true)}
+ >
+
+
+
+
+ )
+}
+
+export default memo(PublishToast)
diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-children.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-children.tsx
index 7a2e3df4eb..4c53389d7e 100644
--- a/web/app/components/rag-pipeline/components/rag-pipeline-children.tsx
+++ b/web/app/components/rag-pipeline/components/rag-pipeline-children.tsx
@@ -16,6 +16,7 @@ import {
usePanelInteractions,
} from '@/app/components/workflow/hooks'
import { useEventEmitterContextContext } from '@/context/event-emitter'
+import PublishToast from './publish-toast'
const RagPipelineChildren = () => {
const { eventEmitter } = useEventEmitterContextContext()
@@ -62,6 +63,7 @@ const RagPipelineChildren = () => {
{
showInputFieldDialog && ()
}
+
>
)
}
diff --git a/web/i18n/en-US/pipeline.ts b/web/i18n/en-US/pipeline.ts
index 5f895eb250..66059810b8 100644
--- a/web/i18n/en-US/pipeline.ts
+++ b/web/i18n/en-US/pipeline.ts
@@ -15,6 +15,10 @@ const translation = {
create: 'Create user input field',
manage: 'Manage',
},
+ publishToast: {
+ title: 'This pipeline has not yet been published',
+ desc: 'When the pipeline is not published, you can modify the chunk structure in the knowledge base node, and the pipeline orchestration and changes will be automatically saved as a draft.',
+ },
}
export default translation
diff --git a/web/i18n/zh-Hans/pipeline.ts b/web/i18n/zh-Hans/pipeline.ts
index 3197e66170..de3890eaf4 100644
--- a/web/i18n/zh-Hans/pipeline.ts
+++ b/web/i18n/zh-Hans/pipeline.ts
@@ -15,6 +15,10 @@ const translation = {
create: '创建用户输入字段',
manage: '管理',
},
+ publishToast: {
+ title: '此 Pipeline 尚未发布',
+ desc: '当 Pipeline 未发布时,您可以修改知识库节点中的分块结构,Pipeline 编排和更改将自动保存为草稿。',
+ },
}
export default translation