'use client' import type { createDocumentResponse, FullDocumentDetail } from '@/models/datasets' import type { RETRIEVE_METHOD } from '@/types/app' import { RiBookOpenLine } from '@remixicon/react' import * as React from 'react' import { useTranslation } from 'react-i18next' import AppIcon from '@/app/components/base/app-icon' import Divider from '@/app/components/base/divider' import { useDocLink } from '@/context/i18n' import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' import EmbeddingProcess from '../embedding-process' type StepThreeProps = { datasetId?: string datasetName?: string indexingType?: string retrievalMethod?: RETRIEVE_METHOD creationCache?: createDocumentResponse } const StepThree = ({ datasetId, datasetName, indexingType, creationCache, retrievalMethod, }: StepThreeProps) => { const { t } = useTranslation() const docLink = useDocLink() const media = useBreakpoints() const isMobile = media === MediaType.mobile const iconInfo = creationCache?.dataset?.icon_info || { icon: '📙', icon_type: 'emoji', icon_background: '#FFF4ED', icon_url: '', } return (
{!datasetId && ( <>
{t(($) => $['stepThree.creationTitle'], { ns: 'datasetCreation' })}
{t(($) => $['stepThree.creationContent'], { ns: 'datasetCreation' })}
{t(($) => $['stepThree.label'], { ns: 'datasetCreation' })}
{datasetName || creationCache?.dataset?.name}
)} {datasetId && (
{t(($) => $['stepThree.additionTitle'], { ns: 'datasetCreation' })}
{`${t(($) => $['stepThree.additionP1'], { ns: 'datasetCreation' })} ${datasetName || creationCache?.dataset?.name} ${t(($) => $['stepThree.additionP2'], { ns: 'datasetCreation' })}`}
)}
{!isMobile && (
{t(($) => $['stepThree.sideTipTitle'], { ns: 'datasetCreation' })}
{t(($) => $['stepThree.sideTipContent'], { ns: 'datasetCreation' })}
{t(($) => $['addDocuments.stepThree.learnMore'], { ns: 'datasetPipeline' })}
)}
) } export default StepThree