Browse Source

fix: add dataset reset functionality and improve warning message consistency

tags/2.0.0-beta.1
twwu 3 months ago
parent
commit
e1861f5f9c

+ 3
- 0
web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx View File

@@ -11,6 +11,7 @@ import Button from '@/app/components/base/button'

import { ToastContext } from '@/app/components/base/toast'
import { createEmptyDataset } from '@/service/datasets'
import { useResetDatasetList } from '@/service/knowledge/use-dataset'

type IProps = {
show: boolean
@@ -25,6 +26,7 @@ const EmptyDatasetCreationModal = ({
const { t } = useTranslation()
const { notify } = useContext(ToastContext)
const router = useRouter()
const resetDatasetList = useResetDatasetList()

const submit = async () => {
if (!inputValue) {
@@ -37,6 +39,7 @@ const EmptyDatasetCreationModal = ({
}
try {
const dataset = await createEmptyDataset({ name: inputValue })
resetDatasetList()
onHide()
router.push(`/datasets/${dataset.id}/documents`)
}

+ 1
- 1
web/i18n/en-US/dataset-pipeline.ts View File

@@ -131,7 +131,7 @@ const translation = {
title: 'Convert to Knowledge Pipeline',
descriptionChunk1: 'You can now convert your existing knowledge base to use the Knowledge Pipeline for document processing',
descriptionChunk2: ' — a more open and flexible approach with access to plugins from our marketplace. This will apply the new processing method to all future documents.',
warning: 'This action cannot be undone',
warning: 'This action cannot be undone.',
confirm: {
title: 'Confirmation',
content: 'This action is permanent. You won\'t be able to revert to the previous method.Please confirm to convert.',

+ 1
- 1
web/i18n/zh-Hans/dataset-pipeline.ts View File

@@ -131,7 +131,7 @@ const translation = {
title: '转换为知识库 pipeline',
descriptionChunk1: '您现在可以将现有知识库转换为使用知识库 pipeline 来处理文档',
descriptionChunk2: ' —— 这是一种更开放、更灵活的方式,可以访问我们市场中的插件。新的处理方式将应用到后续添加的所有文档。',
warning: '此操作无法撤销',
warning: '此操作无法撤销',
confirm: {
title: '确认',
content: '此操作是永久性的。您将无法恢复到之前的方式。请确认转换。',

Loading…
Cancel
Save