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: missing imports (#281)
KVOJJJin59e59c19b256
diff --git a/web/app/components/datasets/documents/detail/embedding/index.tsx b/web/app/components/datasets/documents/detail/embedding/index.tsxindex e0e20518338..b6d4d16b0e9 100644--- a/web/app/components/datasets/documents/detail/embedding/index.tsx+++ b/web/app/components/datasets/documents/detail/embedding/index.tsx@@ -1,12 +1,13 @@import type { FC } from 'react'-import React, { useCallback, useMemo, useState } from 'react'+import React, { useCallback, useEffect, useMemo, useState } from 'react'import useSWR from 'swr'import { useRouter } from 'next/navigation'import { useContext } from 'use-context-selector'import { useTranslation } from 'react-i18next'import { omit } from 'lodash-es'-import cn from 'classnames'import { ArrowRightIcon } from '@heroicons/react/24/solid'+import { useGetState } from 'ahooks'+import cn from 'classnames'import SegmentCard from '../completed/SegmentCard'import { FieldInfo } from '../metadata'import style from '../completed/style.module.css'@@ -19,7 +20,7 @@ import type { FullDocumentDetail, ProcessRuleResponse } from '@/models/datasets'import type { CommonResponse } from '@/models/common'import { asyncRunSafe } from '@/utils'import { formatNumber } from '@/utils/format'-import { fetchIndexingEstimate, fetchProcessRule, pauseDocIndexing, resumeDocIndexing } from '@/service/datasets'+import { fetchIndexingStatus as doFetchIndexingStatus, fetchIndexingEstimate, fetchProcessRule, pauseDocIndexing, resumeDocIndexing } from '@/service/datasets'import DatasetDetailContext from '@/context/dataset-detail'import StopEmbeddingModal from '@/app/components/datasets/create/stop-embedding-modal'@@ -134,11 +135,15 @@ const EmbeddingDetail: FC<Props> = ({ detail, stopPosition = 'top', datasetId: d}const [runId, setRunId, getRunId] = useGetState<any>(null)++ const stopQueryStatus = () => {+ clearInterval(getRunId())+ }+const startQueryStatus = () => {const runId = setInterval(() => {const indexingStatusDetail = getIndexingStatusDetail()if (indexingStatusDetail?.indexing_status === 'completed') {- // eslint-disable-next-line @typescript-eslint/no-use-before-definestopQueryStatus()return}@@ -146,9 +151,6 @@ const EmbeddingDetail: FC<Props> = ({ detail, stopPosition = 'top', datasetId: d}, 2500)setRunId(runId)}- const stopQueryStatus = () => {- clearInterval(getRunId())- }useEffect(() => {fetchIndexingStatus()@@ -235,14 +237,15 @@ const EmbeddingDetail: FC<Props> = ({ detail, stopPosition = 'top', datasetId: dkey={idx}className={cn(s.progressBgItem, isEmbedding ? 'bg-primary-50' : 'bg-gray-100')}/>)}- <div className={- cn('rounded-l-md',+ <div+ className={cn(+ 'rounded-l-md',s.progressBar,(isEmbedding || isEmbeddingCompleted) && s.barProcessing,(isEmbeddingPaused || isEmbeddingError) && s.barPaused,- indexingStatusDetail?.indexing_status === 'completed' && 'rounded-r-md')- }- style={{ width: `${percent}%` }}+ indexingStatusDetail?.indexing_status === 'completed' && 'rounded-r-md',+ )}+ style={{ width: `${percent}%` }}/></div><div className={s.progressData}>