From 35f58556e37ccf88431236d0757f6a15093dda7a Mon Sep 17 00:00:00 2001 From: CorrectRoadH Date: Thu, 15 May 2025 21:20:22 +0800 Subject: [PATCH] feat: clean chunk content after add --- .../datasets/documents/detail/completed/new-child-segment.tsx | 1 + web/app/components/datasets/documents/detail/new-segment.tsx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/web/app/components/datasets/documents/detail/completed/new-child-segment.tsx b/web/app/components/datasets/documents/detail/completed/new-child-segment.tsx index e1d5701f71..0fc9580fdd 100644 --- a/web/app/components/datasets/documents/detail/completed/new-child-segment.tsx +++ b/web/app/components/datasets/documents/detail/completed/new-child-segment.tsx @@ -91,6 +91,7 @@ const NewChildSegmentModal: FC = ({ customComponent: isFullDocMode && CustomButton, }) handleCancel('add') + setContent('') if (isFullDocMode) { refreshTimer.current = setTimeout(() => { onSave() diff --git a/web/app/components/datasets/documents/detail/new-segment.tsx b/web/app/components/datasets/documents/detail/new-segment.tsx index 7a08027add..80f0f1dbb9 100644 --- a/web/app/components/datasets/documents/detail/new-segment.tsx +++ b/web/app/components/datasets/documents/detail/new-segment.tsx @@ -118,6 +118,9 @@ const NewSegmentModal: FC = ({ customComponent: CustomButton, }) handleCancel('add') + setQuestion('') + setAnswer('') + setKeywords([]) refreshTimer.current = setTimeout(() => { onSave() }, 3000)