diff --git a/web/app/components/app-sidebar/snippet-info/dropdown.tsx b/web/app/components/app-sidebar/snippet-info/dropdown.tsx
index 2856bc1dc7..c4edbda8cd 100644
--- a/web/app/components/app-sidebar/snippet-info/dropdown.tsx
+++ b/web/app/components/app-sidebar/snippet-info/dropdown.tsx
@@ -2,9 +2,6 @@
import type { AppIconSelection } from '@/app/components/base/app-icon-picker'
import type { SnippetDetail } from '@/models/snippet'
-import { cn } from '@langgenius/dify-ui/cn'
-import * as React from 'react'
-import { useTranslation } from 'react-i18next'
import {
AlertDialog,
AlertDialogActions,
@@ -13,7 +10,8 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogTitle,
-} from '@/app/components/base/ui/alert-dialog'
+} from '@langgenius/dify-ui/alert-dialog'
+import { cn } from '@langgenius/dify-ui/cn'
import {
DropdownMenu,
DropdownMenuContent,
@@ -22,6 +20,8 @@ import {
DropdownMenuTrigger,
} from '@langgenius/dify-ui/dropdown-menu'
import { toast } from '@langgenius/dify-ui/toast'
+import * as React from 'react'
+import { useTranslation } from 'react-i18next'
import CreateSnippetDialog from '@/app/components/workflow/create-snippet-dialog'
import { useRouter } from '@/next/navigation'
import { useDeleteSnippetMutation, useExportSnippetMutation, useUpdateSnippetMutation } from '@/service/use-snippets'
@@ -53,10 +53,10 @@ const SnippetInfoDropdown = ({ snippet }: SnippetInfoDropdownProps) => {
description: snippet.description,
icon: snippet.icon
? {
- type: 'emoji' as const,
- icon: snippet.icon,
- background: snippet.iconBackground || FALLBACK_ICON.background,
- }
+ type: 'emoji' as const,
+ icon: snippet.icon,
+ background: snippet.iconBackground || FALLBACK_ICON.background,
+ }
: FALLBACK_ICON,
}), [snippet.description, snippet.icon, snippet.iconBackground, snippet.name])
diff --git a/web/app/components/app/workflow-log/evaluation-cell.tsx b/web/app/components/app/workflow-log/evaluation-cell.tsx
index 3e49015454..539ae5b538 100644
--- a/web/app/components/app/workflow-log/evaluation-cell.tsx
+++ b/web/app/components/app/workflow-log/evaluation-cell.tsx
@@ -2,13 +2,13 @@
import type { EvaluationLogItem } from '@/models/log'
import { cn } from '@langgenius/dify-ui/cn'
-import { useState } from 'react'
-import { useTranslation } from 'react-i18next'
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from '@/app/components/base/ui/popover'
+} from '@langgenius/dify-ui/popover'
+import { useState } from 'react'
+import { useTranslation } from 'react-i18next'
import { getNodeVisual, getToneClasses } from '@/app/components/evaluation/components/metric-selector/utils'
type EvaluationCellProps = {
@@ -30,7 +30,7 @@ const EvaluationCell = ({
if (!evaluation.length) {
return (
-
+
-
)
@@ -73,19 +73,19 @@ const EvaluationCell = ({
)}
>
-
{item.name}
+
{item.name}
{item.nodeInfo && nodeVisual && nodeToneClasses && (
-
+
{item.nodeInfo.title}
)}
-
+
{formatEvaluationValue(item.value)}
diff --git a/web/app/components/evaluation/components/batch-test-panel/input-fields/upload-run-popover.tsx b/web/app/components/evaluation/components/batch-test-panel/input-fields/upload-run-popover.tsx
index de25671489..a9c293297d 100644
--- a/web/app/components/evaluation/components/batch-test-panel/input-fields/upload-run-popover.tsx
+++ b/web/app/components/evaluation/components/batch-test-panel/input-fields/upload-run-popover.tsx
@@ -1,14 +1,14 @@
import type { ChangeEvent, DragEvent } from 'react'
import type { InputField } from './input-fields-utils'
-import { cn } from '@langgenius/dify-ui/cn'
-import { useRef } from 'react'
-import { useTranslation } from 'react-i18next'
import { Button } from '@langgenius/dify-ui/button'
+import { cn } from '@langgenius/dify-ui/cn'
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from '@/app/components/base/ui/popover'
+} from '@langgenius/dify-ui/popover'
+import { useRef } from 'react'
+import { useTranslation } from 'react-i18next'
import { getExampleValue } from './input-fields-utils'
type UploadRunPopoverProps = {
@@ -87,71 +87,71 @@ const UploadRunPopover = ({
/>
{currentFileName
? (
-
-
-
-
-
-
- {currentFileName}
+
+
+
-
- {!!currentFileExtension &&
{currentFileExtension}}
- {!!currentFileExtension && !!currentFileSize &&
·}
- {!!currentFileSize &&
{currentFileSize}}
+
+
+ {currentFileName}
+
+
+ {!!currentFileExtension && {currentFileExtension}}
+ {!!currentFileExtension && !!currentFileSize && ·}
+ {!!currentFileSize && {currentFileSize}}
+
-
-
- {isFileUploading && (
-
- )}
-
-
-
- )
- : (
-
event.preventDefault()}
- onDrop={handleDropFile}
- >
-
-
-
- {t('batch.uploadDropzonePrefix')}
- {' '}
- {t('batch.uploadDropzoneEmphasis')}
- {' '}
- {t('batch.uploadDropzoneSuffix')}
-
-
- {t('batch.uploadDropzoneDownloadPrefix')}
- {' '}
+
+ {isFileUploading && (
+
+ )}
-
- )}
+ )
+ : (
+
event.preventDefault()}
+ onDrop={handleDropFile}
+ >
+
+
+
+ {t('batch.uploadDropzonePrefix')}
+ {' '}
+ {t('batch.uploadDropzoneEmphasis')}
+ {' '}
+ {t('batch.uploadDropzoneSuffix')}
+
+
+ {t('batch.uploadDropzoneDownloadPrefix')}
+ {' '}
+
+
+
+
+ )}
{!!previewFields.length && (
@@ -159,10 +159,10 @@ const UploadRunPopover = ({
{previewFields.map((field, index) => (
-
+
{field.name}
-
+
{getExampleValue(field, booleanExampleValue)}
diff --git a/web/app/components/evaluation/components/conditions-section/add-condition-select.tsx b/web/app/components/evaluation/components/conditions-section/add-condition-select.tsx
index a37a8d7bad..2a17fadf83 100644
--- a/web/app/components/evaluation/components/conditions-section/add-condition-select.tsx
+++ b/web/app/components/evaluation/components/conditions-section/add-condition-select.tsx
@@ -2,8 +2,6 @@
import type { ConditionMetricOptionGroup, EvaluationResourceProps } from '../../types'
import { cn } from '@langgenius/dify-ui/cn'
-import { useState } from 'react'
-import { useTranslation } from 'react-i18next'
import {
Select,
SelectContent,
@@ -11,7 +9,9 @@ import {
SelectItem,
SelectLabel,
SelectTrigger,
-} from '@/app/components/base/ui/select'
+} from '@langgenius/dify-ui/select'
+import { useState } from 'react'
+import { useTranslation } from 'react-i18next'
import { useEvaluationStore } from '../../store'
import { getConditionMetricValueTypeTranslationKey } from '../../utils'
diff --git a/web/app/components/evaluation/components/conditions-section/condition-group.tsx b/web/app/components/evaluation/components/conditions-section/condition-group.tsx
index 5896f43c60..15b9246834 100644
--- a/web/app/components/evaluation/components/conditions-section/condition-group.tsx
+++ b/web/app/components/evaluation/components/conditions-section/condition-group.tsx
@@ -6,11 +6,8 @@ import type {
EvaluationResourceProps,
JudgmentConditionItem,
} from '../../types'
-import { cn } from '@langgenius/dify-ui/cn'
-import { useMemo } from 'react'
-import { useTranslation } from 'react-i18next'
-import Input from '@/app/components/base/input'
import { Button } from '@langgenius/dify-ui/button'
+import { cn } from '@langgenius/dify-ui/cn'
import {
Select,
SelectContent,
@@ -19,7 +16,10 @@ import {
SelectLabel,
SelectTrigger,
SelectValue,
-} from '@/app/components/base/ui/select'
+} from '@langgenius/dify-ui/select'
+import { useMemo } from 'react'
+import { useTranslation } from 'react-i18next'
+import Input from '@/app/components/base/input'
import { getAllowedOperators, requiresConditionValue, useEvaluationResource, useEvaluationStore } from '../../store'
import {
buildConditionMetricOptions,
diff --git a/web/app/components/evaluation/components/custom-metric-editor/workflow-selector.tsx b/web/app/components/evaluation/components/custom-metric-editor/workflow-selector.tsx
index c85c192aff..e2b93e7f22 100644
--- a/web/app/components/evaluation/components/custom-metric-editor/workflow-selector.tsx
+++ b/web/app/components/evaluation/components/custom-metric-editor/workflow-selector.tsx
@@ -2,24 +2,24 @@
import type { AvailableEvaluationWorkflow } from '@/types/evaluation'
import { cn } from '@langgenius/dify-ui/cn'
-import { useInfiniteScroll } from 'ahooks'
-import * as React from 'react'
-import { useDeferredValue, useMemo, useRef, useState } from 'react'
-import { useTranslation } from 'react-i18next'
-import Input from '@/app/components/base/input'
-import Loading from '@/app/components/base/loading'
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from '@/app/components/base/ui/popover'
+} from '@langgenius/dify-ui/popover'
import {
ScrollAreaContent,
ScrollAreaRoot,
ScrollAreaScrollbar,
ScrollAreaThumb,
ScrollAreaViewport,
-} from '@/app/components/base/ui/scroll-area'
+} from '@langgenius/dify-ui/scroll-area'
+import { useInfiniteScroll } from 'ahooks'
+import * as React from 'react'
+import { useDeferredValue, useMemo, useRef, useState } from 'react'
+import { useTranslation } from 'react-i18next'
+import Input from '@/app/components/base/input'
+import Loading from '@/app/components/base/loading'
import { useAvailableEvaluationWorkflows } from '@/service/use-evaluation'
type WorkflowSelectorProps = {
@@ -119,7 +119,7 @@ const WorkflowSelector = ({
@@ -158,7 +158,7 @@ const WorkflowSelector = ({
)
: !workflows.length
? (
-
+
{t('noData', { ns: 'common' })}
)
@@ -184,7 +184,7 @@ const WorkflowSelector = ({
-
+
{getWorkflowName(workflow)}
{workflow.id === value && (
diff --git a/web/app/components/evaluation/components/metric-selector/index.tsx b/web/app/components/evaluation/components/metric-selector/index.tsx
index 2e1cc89ec8..24e200421e 100644
--- a/web/app/components/evaluation/components/metric-selector/index.tsx
+++ b/web/app/components/evaluation/components/metric-selector/index.tsx
@@ -2,16 +2,16 @@
import type { ChangeEvent } from 'react'
import type { MetricSelectorProps } from './types'
-import { cn } from '@langgenius/dify-ui/cn'
-import { useState } from 'react'
-import { useTranslation } from 'react-i18next'
-import Input from '@/app/components/base/input'
import { Button } from '@langgenius/dify-ui/button'
+import { cn } from '@langgenius/dify-ui/cn'
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from '@/app/components/base/ui/popover'
+} from '@langgenius/dify-ui/popover'
+import { useState } from 'react'
+import { useTranslation } from 'react-i18next'
+import Input from '@/app/components/base/input'
import { useEvaluationResource, useEvaluationStore } from '../../store'
import SelectorEmptyState from './selector-empty-state'
import SelectorFooter from './selector-footer'
@@ -68,17 +68,17 @@ const MetricSelector = ({
render={(
triggerStyle === 'text'
? (
-
- )
+
+ )
: (
-
- )
+
+ )
)}
/>
diff --git a/web/app/components/evaluation/components/pipeline/pipeline-metric-item.tsx b/web/app/components/evaluation/components/pipeline/pipeline-metric-item.tsx
index 1e9f9cc4c1..4496f71edb 100644
--- a/web/app/components/evaluation/components/pipeline/pipeline-metric-item.tsx
+++ b/web/app/components/evaluation/components/pipeline/pipeline-metric-item.tsx
@@ -2,10 +2,10 @@
import type { MetricOption } from '../../types'
import { cn } from '@langgenius/dify-ui/cn'
+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'
import { useTranslation } from 'react-i18next'
import Checkbox from '@/app/components/base/checkbox'
import Input from '@/app/components/base/input'
-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'
import { getTranslatedMetricDescription } from '../../default-metric-descriptions'
import { DEFAULT_PIPELINE_METRIC_THRESHOLD } from '../../store-utils'
@@ -37,7 +37,7 @@ const PipelineMetricItem = ({
onClick={onToggle}
>
- {metric.label}
+ {metric.label}
{title}
- {description &&
{description}
}
+ {description &&
{description}
}
{action}