| 
									
										
										
										
											2025-04-25 17:24:47 +08:00
										 |  |  | import type { FC } from 'react' | 
					
						
							|  |  |  | import { memo } from 'react' | 
					
						
							| 
									
										
										
										
											2025-05-19 18:08:27 +08:00
										 |  |  | import { useTranslation } from 'react-i18next' | 
					
						
							| 
									
										
										
										
											2025-04-25 17:24:47 +08:00
										 |  |  | import type { KnowledgeBaseNodeType } from './types' | 
					
						
							|  |  |  | import type { NodeProps } from '@/app/components/workflow/types' | 
					
						
							| 
									
										
										
										
											2025-05-07 15:08:13 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | const Node: FC<NodeProps<KnowledgeBaseNodeType>> = ({ data }) => { | 
					
						
							| 
									
										
										
										
											2025-05-19 18:08:27 +08:00
										 |  |  |   const { t } = useTranslation() | 
					
						
							| 
									
										
										
										
											2025-04-25 17:24:47 +08:00
										 |  |  |   return ( | 
					
						
							| 
									
										
										
										
											2025-05-07 15:08:13 +08:00
										 |  |  |     <div className='mb-1 space-y-0.5 px-3 py-1'> | 
					
						
							|  |  |  |       <div className='flex h-6 items-center rounded-md bg-workflow-block-parma-bg px-1.5'> | 
					
						
							| 
									
										
										
										
											2025-05-19 18:08:27 +08:00
										 |  |  |         <div className='system-xs-medium-uppercase mr-2 shrink-0 text-text-tertiary'>{t('datasetCreation.stepTwo.indexMode')}</div> | 
					
						
							| 
									
										
										
										
											2025-05-07 15:08:13 +08:00
										 |  |  |         <div className='system-xs-medium grow truncate text-right text-text-secondary' title={data.indexing_technique}>{data.indexing_technique}</div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |       <div className='flex h-6 items-center rounded-md bg-workflow-block-parma-bg px-1.5'> | 
					
						
							| 
									
										
										
										
											2025-05-19 18:08:27 +08:00
										 |  |  |         <div className='system-xs-medium-uppercase mr-2 shrink-0 text-text-tertiary'>{t('datasetSettings.form.retrievalSetting.title')}</div> | 
					
						
							| 
									
										
										
										
											2025-05-07 15:08:13 +08:00
										 |  |  |         <div className='system-xs-medium grow truncate text-right text-text-secondary' title={data.retrieval_model.search_method}>{data.retrieval_model.search_method}</div> | 
					
						
							|  |  |  |       </div> | 
					
						
							| 
									
										
										
										
											2025-04-25 17:24:47 +08:00
										 |  |  |     </div> | 
					
						
							|  |  |  |   ) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default memo(Node) |