From 8b38e3f79d3cd4964a489b38fca3fdc6c9833a08 Mon Sep 17 00:00:00 2001 From: wangxiaolei Date: Mon, 29 Dec 2025 10:03:15 +0800 Subject: [PATCH] feat: document batch operation tool add re-index operation (#30275) --- .../detail/completed/common/batch-action.tsx | 14 ++++++++++++- .../components/datasets/documents/list.tsx | 20 ++++++++++++++++++- web/i18n/en-US/dataset.ts | 1 + web/i18n/zh-Hans/dataset.ts | 1 + web/service/knowledge/use-document.ts | 14 ++++++++++++- 5 files changed, 47 insertions(+), 3 deletions(-) diff --git a/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx b/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx index 6cc60453dd..bf43e41dee 100644 --- a/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx +++ b/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react' -import { RiArchive2Line, RiCheckboxCircleLine, RiCloseCircleLine, RiDeleteBinLine, RiDraftLine } from '@remixicon/react' +import { RiArchive2Line, RiCheckboxCircleLine, RiCloseCircleLine, RiDeleteBinLine, RiDraftLine, RiRefreshLine } from '@remixicon/react' import { useBoolean } from 'ahooks' import * as React from 'react' import { useTranslation } from 'react-i18next' @@ -17,6 +17,7 @@ type IBatchActionProps = { onBatchDelete: () => Promise onArchive?: () => void onEditMetadata?: () => void + onBatchReIndex?: () => void onCancel: () => void } @@ -28,6 +29,7 @@ const BatchAction: FC = ({ onArchive, onBatchDelete, onEditMetadata, + onBatchReIndex, onCancel, }) => { const { t } = useTranslation() @@ -91,6 +93,16 @@ const BatchAction: FC = ({ {t(`${i18nPrefix}.archive`)} )} + {onBatchReIndex && ( + + )}