mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox
This commit is contained in:
@ -26,7 +26,7 @@ type TextLabelProps = {
|
||||
}
|
||||
|
||||
const TextLabel: FC<TextLabelProps> = ({ children }) => {
|
||||
return <label className="system-sm-semibold text-text-secondary">{children}</label>
|
||||
return <label className="text-text-secondary system-sm-semibold">{children}</label>
|
||||
}
|
||||
|
||||
type GeneralChunkingOptionsProps = {
|
||||
@ -148,7 +148,7 @@ export const GeneralChunkingOptions: FC<GeneralChunkingOptionsProps> = ({
|
||||
onClick={() => onRuleToggle(rule.id)}
|
||||
>
|
||||
<Checkbox checked={rule.enabled} />
|
||||
<label className="system-sm-regular ml-2 cursor-pointer text-text-secondary">
|
||||
<label className="ml-2 cursor-pointer text-text-secondary system-sm-regular">
|
||||
{getRuleName(rule.id)}
|
||||
</label>
|
||||
</div>
|
||||
@ -183,7 +183,7 @@ export const GeneralChunkingOptions: FC<GeneralChunkingOptionsProps> = ({
|
||||
checked={currentDocForm === ChunkingMode.qa}
|
||||
disabled={hasCurrentDatasetDocForm}
|
||||
/>
|
||||
<label className="system-sm-regular ml-2 cursor-pointer text-text-secondary">
|
||||
<label className="ml-2 cursor-pointer text-text-secondary system-sm-regular">
|
||||
{t('stepTwo.useQALanguage', { ns: 'datasetCreation' })}
|
||||
</label>
|
||||
</div>
|
||||
@ -202,7 +202,7 @@ export const GeneralChunkingOptions: FC<GeneralChunkingOptionsProps> = ({
|
||||
className="mt-2 flex h-10 items-center gap-2 rounded-xl border border-components-panel-border px-3 text-xs shadow-xs backdrop-blur-[5px]"
|
||||
>
|
||||
<RiAlertFill className="size-4 text-text-warning-secondary" />
|
||||
<span className="system-xs-medium text-text-primary">
|
||||
<span className="text-text-primary system-xs-medium">
|
||||
{t('stepTwo.QATip', { ns: 'datasetCreation' })}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -70,7 +70,7 @@ export const IndexingModeSection: FC<IndexingModeSectionProps> = ({
|
||||
return (
|
||||
<>
|
||||
{/* Index Mode */}
|
||||
<div className="system-md-semibold mb-1 text-text-secondary">
|
||||
<div className="mb-1 text-text-secondary system-md-semibold">
|
||||
{t('stepTwo.indexMode', { ns: 'datasetCreation' })}
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
@ -160,7 +160,7 @@ export const IndexingModeSection: FC<IndexingModeSectionProps> = ({
|
||||
<div className="p-1">
|
||||
<AlertTriangle className="size-4 text-text-warning-secondary" />
|
||||
</div>
|
||||
<span className="system-xs-medium text-text-primary">
|
||||
<span className="text-text-primary system-xs-medium">
|
||||
{t('stepTwo.highQualityTip', { ns: 'datasetCreation' })}
|
||||
</span>
|
||||
</div>
|
||||
@ -168,7 +168,7 @@ export const IndexingModeSection: FC<IndexingModeSectionProps> = ({
|
||||
|
||||
{/* Economical index setting tip */}
|
||||
{hasSetIndexType && indexType === IndexingType.ECONOMICAL && (
|
||||
<div className="system-xs-medium mt-2 text-text-tertiary">
|
||||
<div className="mt-2 text-text-tertiary system-xs-medium">
|
||||
{t('stepTwo.indexSettingTip', { ns: 'datasetCreation' })}
|
||||
<Link className="text-text-accent" href={`/datasets/${datasetId}/settings`}>
|
||||
{t('stepTwo.datasetSettingLink', { ns: 'datasetCreation' })}
|
||||
@ -179,7 +179,7 @@ export const IndexingModeSection: FC<IndexingModeSectionProps> = ({
|
||||
{/* Embedding model */}
|
||||
{indexType === IndexingType.QUALIFIED && (
|
||||
<div className="mt-5">
|
||||
<div className={cn('system-md-semibold mb-1 text-text-secondary', datasetId && 'flex items-center justify-between')}>
|
||||
<div className={cn('mb-1 text-text-secondary system-md-semibold', datasetId && 'flex items-center justify-between')}>
|
||||
{t('form.embeddingModel', { ns: 'datasetSettings' })}
|
||||
</div>
|
||||
<ModelSelector
|
||||
@ -190,7 +190,7 @@ export const IndexingModeSection: FC<IndexingModeSectionProps> = ({
|
||||
onSelect={onEmbeddingModelChange}
|
||||
/>
|
||||
{isModelAndRetrievalConfigDisabled && (
|
||||
<div className="system-xs-medium mt-2 text-text-tertiary">
|
||||
<div className="mt-2 text-text-tertiary system-xs-medium">
|
||||
{t('stepTwo.indexSettingTip', { ns: 'datasetCreation' })}
|
||||
<Link className="text-text-accent" href={`/datasets/${datasetId}/settings`}>
|
||||
{t('stepTwo.datasetSettingLink', { ns: 'datasetCreation' })}
|
||||
@ -207,10 +207,10 @@ export const IndexingModeSection: FC<IndexingModeSectionProps> = ({
|
||||
{!isModelAndRetrievalConfigDisabled
|
||||
? (
|
||||
<div className="mb-1">
|
||||
<div className="system-md-semibold mb-0.5 text-text-secondary">
|
||||
<div className="mb-0.5 text-text-secondary system-md-semibold">
|
||||
{t('form.retrievalSetting.title', { ns: 'datasetSettings' })}
|
||||
</div>
|
||||
<div className="body-xs-regular text-text-tertiary">
|
||||
<div className="text-text-tertiary body-xs-regular">
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
@ -224,7 +224,7 @@ export const IndexingModeSection: FC<IndexingModeSectionProps> = ({
|
||||
</div>
|
||||
)
|
||||
: (
|
||||
<div className={cn('system-md-semibold mb-0.5 text-text-secondary', 'flex items-center justify-between')}>
|
||||
<div className={cn('mb-0.5 text-text-secondary system-md-semibold', 'flex items-center justify-between')}>
|
||||
<div>{t('form.retrievalSetting.title', { ns: 'datasetSettings' })}</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -24,7 +24,7 @@ export const DelimiterInput: FC<InputProps & { tooltip?: string }> = (props) =>
|
||||
return (
|
||||
<FormField label={(
|
||||
<div className="mb-1 flex items-center">
|
||||
<span className="system-sm-semibold mr-0.5">{t('stepTwo.separator', { ns: 'datasetCreation' })}</span>
|
||||
<span className="mr-0.5 system-sm-semibold">{t('stepTwo.separator', { ns: 'datasetCreation' })}</span>
|
||||
<Tooltip
|
||||
popupContent={(
|
||||
<div className="max-w-[200px]">
|
||||
@ -51,7 +51,7 @@ export const MaxLengthInput: FC<InputNumberProps> = (props) => {
|
||||
const { t } = useTranslation()
|
||||
return (
|
||||
<FormField label={(
|
||||
<div className="system-sm-semibold mb-1">
|
||||
<div className="mb-1 system-sm-semibold">
|
||||
{t('stepTwo.maxLength', { ns: 'datasetCreation' })}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -34,8 +34,8 @@ export const OptionCardHeader: FC<OptionCardHeaderProps> = (props) => {
|
||||
className={cn('absolute -bottom-1.5 left-4 text-transparent', isActive && 'text-components-panel-bg')}
|
||||
/>
|
||||
<div className="flex-1 space-y-0.5 py-3 pr-4">
|
||||
<div className="system-md-semibold text-text-secondary">{title}</div>
|
||||
<div className="system-xs-regular text-text-tertiary">{description}</div>
|
||||
<div className="text-text-secondary system-md-semibold">{title}</div>
|
||||
<div className="text-text-tertiary system-xs-regular">{description}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -26,7 +26,7 @@ type TextLabelProps = {
|
||||
}
|
||||
|
||||
const TextLabel: FC<TextLabelProps> = ({ children }) => {
|
||||
return <label className="system-sm-semibold text-text-secondary">{children}</label>
|
||||
return <label className="text-text-secondary system-sm-semibold">{children}</label>
|
||||
}
|
||||
|
||||
type ParentChildOptionsProps = {
|
||||
@ -186,7 +186,7 @@ export const ParentChildOptions: FC<ParentChildOptionsProps> = ({
|
||||
onClick={() => onRuleToggle(rule.id)}
|
||||
>
|
||||
<Checkbox checked={rule.enabled} />
|
||||
<label className="system-sm-regular ml-2 cursor-pointer text-text-secondary">
|
||||
<label className="ml-2 cursor-pointer text-text-secondary system-sm-regular">
|
||||
{getRuleName(rule.id)}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@ -197,7 +197,7 @@ const StepTwo: FC<StepTwoProps> = ({
|
||||
return (
|
||||
<div className="flex h-full w-full">
|
||||
<div className={cn('relative h-full w-1/2 overflow-y-auto py-6', isMobile ? 'px-4' : 'px-12')}>
|
||||
<div className="system-md-semibold mb-1 text-text-secondary">{t('stepTwo.segmentation', { ns: 'datasetCreation' })}</div>
|
||||
<div className="mb-1 text-text-secondary system-md-semibold">{t('stepTwo.segmentation', { ns: 'datasetCreation' })}</div>
|
||||
{showGeneralOption && (
|
||||
<GeneralChunkingOptions
|
||||
segmentIdentifier={segmentation.segmentIdentifier}
|
||||
|
||||
@ -31,7 +31,7 @@ const LanguageSelect: FC<ILanguageSelectProps> = ({
|
||||
className="inline-flex w-full cursor-pointer items-center justify-between rounded-lg px-3 py-2 hover:bg-state-base-hover"
|
||||
onClick={() => onSelect(prompt_name)}
|
||||
>
|
||||
<span className="system-sm-medium text-text-secondary">{prompt_name}</span>
|
||||
<span className="text-text-secondary system-sm-medium">{prompt_name}</span>
|
||||
{(currentLanguage === prompt_name) && <RiCheckLine className="size-4 text-text-accent" />}
|
||||
</div>
|
||||
))}
|
||||
@ -40,7 +40,7 @@ const LanguageSelect: FC<ILanguageSelectProps> = ({
|
||||
btnElement={(
|
||||
<div className={cn('inline-flex items-center gap-x-[1px]', disabled && 'cursor-not-allowed')}>
|
||||
<span className={cn(
|
||||
'system-xs-semibold px-[3px] text-components-button-tertiary-text',
|
||||
'px-[3px] text-components-button-tertiary-text system-xs-semibold',
|
||||
disabled ? 'text-components-button-tertiary-text-disabled' : '',
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user