From 19936d23d1ee7726156cba10e2b46fe0324e0bc6 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Tue, 30 Sep 2025 21:30:15 +0800 Subject: [PATCH 1/2] chore: remove pnpm build from dev-setup command (#26504) --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index ea560c7157..19c398ec82 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,6 @@ prepare-web: @echo "🌐 Setting up web environment..." @cp -n web/.env.example web/.env 2>/dev/null || echo "Web .env already exists" @cd web && pnpm install - @cd web && pnpm build @echo "✅ Web environment prepared (not started)" # Step 3: Prepare API environment From dd71625f52d2342bb69ea145df9c23231c00199d Mon Sep 17 00:00:00 2001 From: HyaCinth <88471803+HyaCiovo@users.noreply.github.com> Date: Tue, 30 Sep 2025 23:22:43 +0800 Subject: [PATCH 2/2] fix(datasets): Resolve issue where selected list is not updated when deleting a single file (#26502) --- web/app/components/datasets/documents/list.tsx | 2 ++ .../components/datasets/documents/operations.tsx | 15 +++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/web/app/components/datasets/documents/list.tsx b/web/app/components/datasets/documents/list.tsx index f850e1870a..9659925b3a 100644 --- a/web/app/components/datasets/documents/list.tsx +++ b/web/app/components/datasets/documents/list.tsx @@ -418,6 +418,8 @@ const DocumentList: FC = ({ void datasetId: string onUpdate: (operationName?: string) => void scene?: 'list' | 'detail' @@ -60,6 +62,8 @@ const Operations = ({ embeddingAvailable, datasetId, detail, + selectedIds, + onSelectedIdChange, onUpdate, scene = 'list', className = '', @@ -116,17 +120,20 @@ const Operations = ({ const [e] = await asyncRunSafe(opApi({ datasetId, documentId: id }) as Promise) if (!e) { notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') }) + // If it is a delete operation, need to update the selectedIds state + if (selectedIds && onSelectedIdChange && operationName === DocumentActionType.delete) + onSelectedIdChange(selectedIds.filter(selectedId => selectedId !== id)) onUpdate(operationName) } else { notify({ type: 'error', message: t('common.actionMsg.modifiedUnsuccessfully') }) } - if (operationName === 'delete') + if (operationName === DocumentActionType.delete) setDeleting(false) } const { run: handleSwitch } = useDebounceFn((operationName: OperationName) => { - if (operationName === 'enable' && enabled) + if (operationName === DocumentActionType.enable && enabled) return - if (operationName === 'disable' && !enabled) + if (operationName === DocumentActionType.disable && !enabled) return onOperate(operationName) }, { wait: 500 })