From 7aa700bf2b1e00b7313fbc5a2ddc09fb9138c022 Mon Sep 17 00:00:00 2001 From: JzoNg Date: Thu, 16 Apr 2026 12:06:53 +0800 Subject: [PATCH] fix(web): fix merge --- .../app-sidebar/snippet-info/dropdown.tsx | 7 ++++--- .../app-sidebar/snippet-info/index.tsx | 10 +++++----- ...aluation-workflow-switch-confirm-dialog.tsx | 10 +++++----- .../app/workflow-log/evaluation-cell.tsx | 10 +++++----- web/app/components/apps/app-type-filter.tsx | 2 +- web/app/components/apps/creators-filter.tsx | 2 +- .../components/apps/studio-route-switch.tsx | 4 ++-- .../batch-test-panel/history-tab.tsx | 18 +++++++++--------- .../components/batch-test-panel/index.tsx | 4 ++-- .../input-fields/upload-run-popover.tsx | 12 ++++++------ .../add-condition-select.tsx | 8 ++++---- .../conditions-section/condition-group.tsx | 18 +++++++++--------- .../custom-metric-editor/workflow-selector.tsx | 11 ++++++----- .../metric-section/builtin-metric-card.tsx | 16 ++++++++-------- .../metric-section/custom-metric-card.tsx | 4 ++-- .../components/metric-selector/index.tsx | 4 ++-- .../selector-metric-section.tsx | 14 +++++++------- .../pipeline/pipeline-metric-item.tsx | 4 ++-- .../pipeline/pipeline-results-table.tsx | 18 +++++++++--------- .../evaluation/components/section-header.tsx | 8 ++++---- .../snippets/components/input-field-editor.tsx | 4 ++-- .../components/snippet-header/run-mode.tsx | 8 ++++---- .../components/snippet-import-dsl-dialog.tsx | 9 ++++----- .../workflow/block-selector/snippets/index.tsx | 2 +- .../snippets/snippet-list-item.tsx | 6 +++--- 25 files changed, 107 insertions(+), 106 deletions(-) diff --git a/web/app/components/app-sidebar/snippet-info/dropdown.tsx b/web/app/components/app-sidebar/snippet-info/dropdown.tsx index 4022c6f3ec..1e1bddf615 100644 --- a/web/app/components/app-sidebar/snippet-info/dropdown.tsx +++ b/web/app/components/app-sidebar/snippet-info/dropdown.tsx @@ -2,6 +2,7 @@ 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 { @@ -24,7 +25,7 @@ import { toast } from '@/app/components/base/ui/toast' import CreateSnippetDialog from '@/app/components/workflow/create-snippet-dialog' import { useRouter } from '@/next/navigation' import { useDeleteSnippetMutation, useExportSnippetMutation, useUpdateSnippetMutation } from '@/service/use-snippets' -import { cn } from '@/utils/classnames' + import { downloadBlob } from '@/utils/download' type SnippetInfoDropdownProps = { @@ -170,10 +171,10 @@ const SnippetInfoDropdown = ({ snippet }: SnippetInfoDropdownProps) => {
- + {t('deleteConfirmTitle')} - + {t('deleteConfirmContent')}
diff --git a/web/app/components/app-sidebar/snippet-info/index.tsx b/web/app/components/app-sidebar/snippet-info/index.tsx index e47f14fe9e..cc1f867026 100644 --- a/web/app/components/app-sidebar/snippet-info/index.tsx +++ b/web/app/components/app-sidebar/snippet-info/index.tsx @@ -1,10 +1,10 @@ 'use client' import type { SnippetDetail } from '@/models/snippet' +import { cn } from '@langgenius/dify-ui/cn' import * as React from 'react' import { useTranslation } from 'react-i18next' import AppIcon from '@/app/components/base/app-icon' -import { cn } from '@/utils/classnames' import SnippetInfoDropdown from './dropdown' type SnippetInfoProps = { @@ -19,7 +19,7 @@ const SnippetInfo = ({ const { t } = useTranslation('snippet') return ( -
+
@@ -34,16 +34,16 @@ const SnippetInfo = ({
{expand && (
-
+
{snippet.name}
-
+
{t('typeLabel')}
)} {expand && snippet.description && ( -

+

{snippet.description}

)} diff --git a/web/app/components/app/app-publisher/evaluation-workflow-switch-confirm-dialog.tsx b/web/app/components/app/app-publisher/evaluation-workflow-switch-confirm-dialog.tsx index 3e4a9cb5c7..39aad51ffd 100644 --- a/web/app/components/app/app-publisher/evaluation-workflow-switch-confirm-dialog.tsx +++ b/web/app/components/app/app-publisher/evaluation-workflow-switch-confirm-dialog.tsx @@ -2,6 +2,7 @@ import type { EvaluationWorkflowAssociatedTarget, EvaluationWorkflowAssociatedTargetType } from '@/types/evaluation' import type { I18nKeysWithPrefix } from '@/types/i18n' +import { cn } from '@langgenius/dify-ui/cn' import { useTranslation } from 'react-i18next' import { AlertDialog, @@ -13,7 +14,6 @@ import { AlertDialogTitle, } from '@/app/components/base/ui/alert-dialog' import Link from '@/next/link' -import { cn } from '@/utils/classnames' type EvaluationWorkflowSwitchConfirmDialogProps = { open: boolean @@ -80,7 +80,7 @@ const DependentTargetItem = ({ - + {targetName} @@ -108,10 +108,10 @@ const EvaluationWorkflowSwitchConfirmDialog = ({
- + {t('common.switchToStandardWorkflowConfirm.title', { ns: 'workflow' })} - + {t('common.switchToStandardWorkflowConfirm.activeIn', { ns: 'workflow', count: targets.length })} @@ -123,7 +123,7 @@ const EvaluationWorkflowSwitchConfirmDialog = ({
- + {t('common.switchToStandardWorkflowConfirm.dependentWorkflows', { ns: 'workflow' })} diff --git a/web/app/components/app/workflow-log/evaluation-cell.tsx b/web/app/components/app/workflow-log/evaluation-cell.tsx index 8cb3770681..3e49015454 100644 --- a/web/app/components/app/workflow-log/evaluation-cell.tsx +++ b/web/app/components/app/workflow-log/evaluation-cell.tsx @@ -1,6 +1,7 @@ 'use client' import type { EvaluationLogItem } from '@/models/log' +import { cn } from '@langgenius/dify-ui/cn' import { useState } from 'react' import { useTranslation } from 'react-i18next' import { @@ -9,7 +10,6 @@ import { PopoverTrigger, } from '@/app/components/base/ui/popover' import { getNodeVisual, getToneClasses } from '@/app/components/evaluation/components/metric-selector/utils' -import { cn } from '@/utils/classnames' type EvaluationCellProps = { evaluation: EvaluationLogItem[] @@ -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/apps/app-type-filter.tsx b/web/app/components/apps/app-type-filter.tsx index a7979daade..a1401100ae 100644 --- a/web/app/components/apps/app-type-filter.tsx +++ b/web/app/components/apps/app-type-filter.tsx @@ -1,6 +1,7 @@ 'use client' import type { AppListCategory } from './app-type-filter-shared' +import { cn } from '@langgenius/dify-ui/cn' import { useMemo } from 'react' import { useTranslation } from 'react-i18next' import { @@ -12,7 +13,6 @@ import { DropdownMenuTrigger, } from '@/app/components/base/ui/dropdown-menu' import { AppModeEnum } from '@/types/app' -import { cn } from '@/utils/classnames' import { isAppListCategory } from './app-type-filter-shared' const chipClassName = 'flex h-8 items-center gap-1 rounded-lg border-[0.5px] border-transparent bg-components-input-bg-normal px-2 text-[13px] leading-[18px] text-text-secondary hover:bg-components-input-bg-hover' diff --git a/web/app/components/apps/creators-filter.tsx b/web/app/components/apps/creators-filter.tsx index 4bcff660e5..9a00ccab6f 100644 --- a/web/app/components/apps/creators-filter.tsx +++ b/web/app/components/apps/creators-filter.tsx @@ -1,5 +1,6 @@ 'use client' +import { cn } from '@langgenius/dify-ui/cn' import { useCallback, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' import Checkbox from '@/app/components/base/checkbox' @@ -12,7 +13,6 @@ import { } from '@/app/components/base/ui/dropdown-menu' import { useAppContext } from '@/context/app-context' import { useMembers } from '@/service/use-common' -import { cn } from '@/utils/classnames' type CreatorsFilterProps = { value: string[] diff --git a/web/app/components/apps/studio-route-switch.tsx b/web/app/components/apps/studio-route-switch.tsx index 53f1337d06..18235f9b74 100644 --- a/web/app/components/apps/studio-route-switch.tsx +++ b/web/app/components/apps/studio-route-switch.tsx @@ -1,8 +1,8 @@ 'use client' import type { StudioPageType } from '.' +import { cn } from '@langgenius/dify-ui/cn' import Link from '@/next/link' -import { cn } from '@/utils/classnames' type Props = { pageType: StudioPageType @@ -18,7 +18,7 @@ const StudioRouteSwitch = ({ showSnippets = true, }: Props) => { return ( -
+
- + {t('history.columns.time')} - {t('history.columns.creator')} - {t('history.columns.version')} - {t('history.columns.status')} + {t('history.columns.creator')} + {t('history.columns.version')} + {t('history.columns.status')}