From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001 From: wwf <yearningwang@iqtogether.com> Date: 星期三, 04 六月 2025 15:17:49 +0800 Subject: [PATCH] 初始化 --- app/components/app/configuration/dataset-config/params-config/config-content.tsx | 30 ++++++++++++++---------------- 1 files changed, 14 insertions(+), 16 deletions(-) diff --git a/app/components/app/configuration/dataset-config/params-config/config-content.tsx b/app/components/app/configuration/dataset-config/params-config/config-content.tsx index 86025f6..3744c6a 100644 --- a/app/components/app/configuration/dataset-config/params-config/config-content.tsx +++ b/app/components/app/configuration/dataset-config/params-config/config-content.tsx @@ -24,8 +24,6 @@ import { useSelectedDatasetsMode } from '@/app/components/workflow/nodes/knowledge-retrieval/hooks' import Switch from '@/app/components/base/switch' import Toast from '@/app/components/base/toast' -import Divider from '@/app/components/base/divider' -import { noop } from 'lodash-es' type Props = { datasetConfigs: DatasetConfigs @@ -42,8 +40,8 @@ onChange, isInWorkflow, singleRetrievalModelConfig: singleRetrievalConfig = {} as ModelConfig, - onSingleRetrievalModelChange = noop, - onSingleRetrievalModelParamsChange = noop, + onSingleRetrievalModelChange = () => { }, + onSingleRetrievalModelParamsChange = () => { }, selectedDatasets = [], }) => { const { t } = useTranslation() @@ -186,30 +184,30 @@ </div> {type === RETRIEVE_TYPE.multiWay && ( <> - <div className='my-2 flex h-6 items-center py-1'> - <div className='system-xs-semibold-uppercase mr-2 shrink-0 text-text-secondary'> + <div className='flex items-center my-2 py-1 h-6'> + <div className='shrink-0 mr-2 system-xs-semibold-uppercase text-text-secondary'> {t('dataset.rerankSettings')} </div> - <Divider bgStyle='gradient' className='mx-0 !h-px' /> + <div className='grow h-[1px] bg-gradient-to-l from-white to-[rgba(16,24,40,0.08)]'></div> </div> { selectedDatasetsMode.inconsistentEmbeddingModel && ( - <div className='system-xs-medium mt-4 text-text-warning'> + <div className='mt-4 system-xs-medium text-text-warning'> {t('dataset.inconsistentEmbeddingModelTip')} </div> ) } { selectedDatasetsMode.mixtureInternalAndExternal && ( - <div className='system-xs-medium mt-4 text-text-warning'> + <div className='mt-4 system-xs-medium text-text-warning'> {t('dataset.mixtureInternalAndExternalTip')} </div> ) } { selectedDatasetsMode.allExternal && ( - <div className='system-xs-medium mt-4 text-text-warning'> + <div className='mt-4 system-xs-medium text-text-warning'> {t('dataset.allExternalTip')} </div> ) @@ -217,7 +215,7 @@ { selectedDatasetsMode.mixtureHighQualityAndEconomic && ( - <div className='system-xs-medium mt-4 text-text-warning'> + <div className='mt-4 system-xs-medium text-text-warning'> {t('dataset.mixtureHighQualityAndEconomicTip')} </div> ) @@ -230,7 +228,7 @@ <div key={option.value} className={cn( - 'system-sm-medium flex h-8 w-[calc((100%-8px)/2)] cursor-pointer items-center justify-center rounded-lg border border-components-option-card-option-border bg-components-option-card-option-bg text-text-secondary', + 'flex items-center justify-center w-[calc((100%-8px)/2)] h-8 rounded-lg border border-components-option-card-option-border bg-components-option-card-option-bg cursor-pointer system-sm-medium text-text-secondary', selectedRerankMode === option.value && 'border-[1.5px] border-components-option-card-option-selected-border bg-components-option-card-option-selected-bg text-text-primary', )} onClick={() => handleRerankModeChange(option.value)} @@ -265,7 +263,7 @@ /> ) } - <div className='system-sm-semibold ml-1 leading-[32px] text-text-secondary'>{t('common.modelProvider.rerankModel.key')}</div> + <div className='leading-[32px] ml-1 text-text-secondary system-sm-semibold'>{t('common.modelProvider.rerankModel.key')}</div> <Tooltip popupContent={ <div className="w-[200px]"> @@ -354,7 +352,7 @@ {isInWorkflow && type === RETRIEVE_TYPE.oneWay && ( <div className='mt-4'> <div className='flex items-center space-x-0.5'> - <div className='text-[13px] font-medium leading-[32px] text-text-primary'>{t('common.modelProvider.systemReasoningModel.key')}</div> + <div className='leading-[32px] text-[13px] font-medium text-gray-900'>{t('common.modelProvider.systemReasoningModel.key')}</div> <Tooltip popupContent={t('common.modelProvider.systemReasoningModel.tip')} /> @@ -368,8 +366,8 @@ provider={model?.provider} completionParams={model?.completion_params} modelId={model?.name} - setModel={onSingleRetrievalModelChange} - onCompletionParamsChange={onSingleRetrievalModelParamsChange} + setModel={onSingleRetrievalModelChange as any} + onCompletionParamsChange={onSingleRetrievalModelParamsChange as any} hideDebugWithMultipleModel debugWithMultipleModel={false} /> -- Gitblit v1.8.0