Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: fix chunk and segment detail components (#14002)
Wu Tianwei9c42626772d8
diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsxindex 51c54b7d7d5..8094739cc3d 100644--- a/web/app/components/base/markdown.tsx+++ b/web/app/components/base/markdown.tsx@@ -265,7 +265,7 @@ export function Markdown(props: { content: string; className?: string }) {}},]}- disallowedElements={['iframe', 'head', 'html', 'meta', 'link', 'style', 'body']}+ disallowedElements={['iframe', 'head', 'html', 'meta', 'link', 'style', 'body', 'input']}components={{code: CodeBlock,img: Img,diff --git a/web/app/components/datasets/documents/detail/completed/child-segment-detail.tsx b/web/app/components/datasets/documents/detail/completed/child-segment-detail.tsxindex 085bfddc163..366bb9a850f 100644--- a/web/app/components/datasets/documents/detail/completed/child-segment-detail.tsx+++ b/web/app/components/datasets/documents/detail/completed/child-segment-detail.tsx@@ -50,7 +50,6 @@ const ChildSegmentDetail: FC<IChildSegmentDetailProps> = ({const handleCancel = () => {onCancel()- setContent(childChunkInfo?.content || '')}const handleSave = () => {diff --git a/web/app/components/datasets/documents/detail/completed/index.tsx b/web/app/components/datasets/documents/detail/completed/index.tsxindex e81d3cf3be7..a3df7f6b80d 100644--- a/web/app/components/datasets/documents/detail/completed/index.tsx+++ b/web/app/components/datasets/documents/detail/completed/index.tsx@@ -80,7 +80,7 @@ export const useSegmentListContext = (selector: (value: SegmentListContextValue)return useContextSelector(SegmentListContext, selector)}-interface ICompletedProps {+type ICompletedProps = {embeddingAvailable: booleanshowNewSegmentModal: booleanonNewSegmentModalChange: (state: boolean) => void@@ -357,6 +357,7 @@ const Completed: FC<ICompletedProps> = ({if (seg.id === segmentId) {seg.answer = res.data.answerseg.content = res.data.content+ seg.sign_content = res.data.sign_contentseg.keywords = res.data.keywordsseg.word_count = res.data.word_countseg.hit_count = res.data.hit_countdiff --git a/web/app/components/datasets/documents/detail/completed/new-child-segment.tsx b/web/app/components/datasets/documents/detail/completed/new-child-segment.tsxindex 55766d8ac4a..2b93fb26002 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@@ -68,7 +68,6 @@ const NewChildSegmentModal: FC<NewChildSegmentModalProps> = ({const handleCancel = (actionType: 'esc' | 'add' = 'esc') => {if (actionType === 'esc' || !addAnother)onCancel()- setContent('')}const { mutateAsync: addChildSegment } = useAddChildSegment()diff --git a/web/app/components/datasets/documents/detail/completed/segment-card/chunk-content.tsx b/web/app/components/datasets/documents/detail/completed/segment-card/chunk-content.tsxindex 3185110d5fb..a528f5e1b1a 100644--- a/web/app/components/datasets/documents/detail/completed/segment-card/chunk-content.tsx+++ b/web/app/components/datasets/documents/detail/completed/segment-card/chunk-content.tsx@@ -49,7 +49,7 @@ const ChunkContent: FC<ChunkContentProps> = ({isFullDocMode ? 'line-clamp-3' : isCollapsed ? 'line-clamp-2' : 'line-clamp-20',className,)}- content={sign_content || content}+ content={sign_content || content || ''}/>}diff --git a/web/app/components/datasets/documents/detail/completed/segment-detail.tsx b/web/app/components/datasets/documents/detail/completed/segment-detail.tsxindex 8891ddee856..c96ec42c12b 100644--- a/web/app/components/datasets/documents/detail/completed/segment-detail.tsx+++ b/web/app/components/datasets/documents/detail/completed/segment-detail.tsx@@ -57,9 +57,6 @@ const SegmentDetail: FC<ISegmentDetailProps> = ({const handleCancel = () => {onCancel()- setQuestion(segInfo?.content || '')- setAnswer(segInfo?.answer || '')- setKeywords(segInfo?.keywords || [])}const handleSave = () => {diff --git a/web/app/components/datasets/documents/detail/new-segment.tsx b/web/app/components/datasets/documents/detail/new-segment.tsxindex e0eec87f0aa..05d43a9fec0 100644--- a/web/app/components/datasets/documents/detail/new-segment.tsx+++ b/web/app/components/datasets/documents/detail/new-segment.tsx@@ -70,9 +70,6 @@ const NewSegmentModal: FC<NewSegmentModalProps> = ({const handleCancel = (actionType: 'esc' | 'add' = 'esc') => {if (actionType === 'esc' || !addAnother)onCancel()- setQuestion('')- setAnswer('')- setKeywords([])}const { mutateAsync: addSegment } = useAddSegment()