= ({
/>
|
{item.question}
|
{item.answer}
diff --git a/web/app/components/app/annotation/view-annotation-modal/index.tsx b/web/app/components/app/annotation/view-annotation-modal/index.tsx
index d9ebe093f5..8a5b53aa87 100644
--- a/web/app/components/app/annotation/view-annotation-modal/index.tsx
+++ b/web/app/components/app/annotation/view-annotation-modal/index.tsx
@@ -1,6 +1,7 @@
'use client'
import type { FC } from 'react'
import type { AnnotationItem, HitHistoryItem } from '../type'
+import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
import { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
@@ -20,7 +21,6 @@ import {
import { APP_PAGE_LIMIT } from '@/config'
import useTimestamp from '@/hooks/use-timestamp'
import { fetchHitHistoryList } from '@/service/annotation'
-import { cn } from '@/utils/classnames'
import EditItem, { EditItemType } from '../edit-annotation-modal/edit-item'
import HitHistoryNoData from './hit-history-no-data'
@@ -146,12 +146,12 @@ const ViewAnnotationModal: FC = ({
- | {t('hitHistoryTable.query', { ns: 'appAnnotation' })} |
- {t('hitHistoryTable.match', { ns: 'appAnnotation' })} |
- {t('hitHistoryTable.response', { ns: 'appAnnotation' })} |
- {t('hitHistoryTable.source', { ns: 'appAnnotation' })} |
- {t('hitHistoryTable.score', { ns: 'appAnnotation' })} |
- {t('hitHistoryTable.time', { ns: 'appAnnotation' })} |
+ {t('hitHistoryTable.query', { ns: 'appAnnotation' })} |
+ {t('hitHistoryTable.match', { ns: 'appAnnotation' })} |
+ {t('hitHistoryTable.response', { ns: 'appAnnotation' })} |
+ {t('hitHistoryTable.source', { ns: 'appAnnotation' })} |
+ {t('hitHistoryTable.score', { ns: 'appAnnotation' })} |
+ {t('hitHistoryTable.time', { ns: 'appAnnotation' })} |
@@ -161,19 +161,19 @@ const ViewAnnotationModal: FC = ({
className="cursor-pointer border-b border-divider-subtle hover:bg-background-default-hover"
>
{item.question}
|
{item.match}
|
{item.response}
@@ -250,7 +250,7 @@ const ViewAnnotationModal: FC = ({
)}
foot={id
? (
-
+
setShowModal(true)}
diff --git a/web/app/components/app/app-access-control/access-control-dialog.tsx b/web/app/components/app/app-access-control/access-control-dialog.tsx
index dd7c74e233..bbf5329c9d 100644
--- a/web/app/components/app/app-access-control/access-control-dialog.tsx
+++ b/web/app/components/app/app-access-control/access-control-dialog.tsx
@@ -1,8 +1,8 @@
import type { ReactNode } from 'react'
import { Dialog, Transition } from '@headlessui/react'
+import { cn } from '@langgenius/dify-ui/cn'
import { RiCloseLine } from '@remixicon/react'
import { Fragment, useCallback } from 'react'
-import { cn } from '@/utils/classnames'
type DialogProps = {
className?: string
@@ -46,7 +46,7 @@ const AccessControlDialog = ({
leaveTo="opacity-0 scale-95"
>
- close()} className="absolute right-5 top-5 z-10 flex h-8 w-8 cursor-pointer items-center justify-center">
+ close()} className="absolute top-5 right-5 z-10 flex h-8 w-8 cursor-pointer items-center justify-center">
{children}
diff --git a/web/app/components/app/app-access-control/access-control-item.tsx b/web/app/components/app/app-access-control/access-control-item.tsx
index da6e69c42e..cc2cf94f0c 100644
--- a/web/app/components/app/app-access-control/access-control-item.tsx
+++ b/web/app/components/app/app-access-control/access-control-item.tsx
@@ -13,7 +13,7 @@ const AccessControlItem: FC = ({ type, children }) => {
if (currentMenu !== type) {
return (
setCurrentMenu(type)}
@@ -24,7 +24,7 @@ const AccessControlItem: FC = ({ type, children }) => {
}
return (
-
{children}
diff --git a/web/app/components/app/app-access-control/add-member-or-group-pop.tsx b/web/app/components/app/app-access-control/add-member-or-group-pop.tsx
index f4c960f1bf..f457e3a2c4 100644
--- a/web/app/components/app/app-access-control/add-member-or-group-pop.tsx
+++ b/web/app/components/app/app-access-control/add-member-or-group-pop.tsx
@@ -1,6 +1,7 @@
'use client'
import type { AccessControlAccount, AccessControlGroup, Subject, SubjectAccount, SubjectGroup } from '@/models/access-control'
import { FloatingOverlay } from '@floating-ui/react'
+import { cn } from '@langgenius/dify-ui/cn'
import { RiAddCircleFill, RiArrowRightSLine, RiOrganizationChart } from '@remixicon/react'
import { useDebounce } from 'ahooks'
import { useCallback, useEffect, useRef, useState } from 'react'
@@ -10,7 +11,6 @@ import { Button } from '@/app/components/base/ui/button'
import { useSelector } from '@/context/app-context'
import { SubjectType } from '@/models/access-control'
import { useSearchForWhiteListCandidates } from '@/service/access-control'
-import { cn } from '@/utils/classnames'
import useAccessControlStore from '../../../../context/access-control-store'
import Checkbox from '../../base/checkbox'
import Input from '../../base/input'
diff --git a/web/app/components/app/app-publisher/suggested-action.tsx b/web/app/components/app/app-publisher/suggested-action.tsx
index 56879d8fea..db13364eb9 100644
--- a/web/app/components/app/app-publisher/suggested-action.tsx
+++ b/web/app/components/app/app-publisher/suggested-action.tsx
@@ -1,6 +1,6 @@
import type { HTMLProps, PropsWithChildren } from 'react'
+import { cn } from '@langgenius/dify-ui/cn'
import { RiArrowRightUpLine } from '@remixicon/react'
-import { cn } from '@/utils/classnames'
type SuggestedActionProps = PropsWithChildren & {
icon?: React.ReactNode
@@ -24,7 +24,7 @@ const SuggestedAction = ({ icon, link, disabled, children, className, onClick, .
{...props}
>
{icon}
- {children}
+ {children}
)
diff --git a/web/app/components/app/configuration/base/feature-panel/index.tsx b/web/app/components/app/configuration/base/feature-panel/index.tsx
index 77ee7bc8dd..806de18412 100644
--- a/web/app/components/app/configuration/base/feature-panel/index.tsx
+++ b/web/app/components/app/configuration/base/feature-panel/index.tsx
@@ -1,7 +1,7 @@
'use client'
import type { FC, ReactNode } from 'react'
+import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
-import { cn } from '@/utils/classnames'
type IFeaturePanelProps = {
className?: string
@@ -23,7 +23,7 @@ const FeaturePanel: FC = ({
children,
}) => {
return (
-
+
{/* Header */}
diff --git a/web/app/components/app/configuration/base/operation-btn/index.tsx b/web/app/components/app/configuration/base/operation-btn/index.tsx
index e3bdfd01ba..52b2be6494 100644
--- a/web/app/components/app/configuration/base/operation-btn/index.tsx
+++ b/web/app/components/app/configuration/base/operation-btn/index.tsx
@@ -1,5 +1,6 @@
'use client'
import type { FC } from 'react'
+import { cn } from '@langgenius/dify-ui/cn'
import {
RiAddLine,
RiEditLine,
@@ -7,7 +8,6 @@ import {
import { noop } from 'es-toolkit/function'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
-import { cn } from '@/utils/classnames'
type IOperationBtnProps = {
className?: string
@@ -30,7 +30,7 @@ const OperationBtn: FC = ({
const { t } = useTranslation()
return (
diff --git a/web/app/components/app/configuration/base/warning-mask/has-not-set-api.tsx b/web/app/components/app/configuration/base/warning-mask/has-not-set-api.tsx
index 25587c5e58..6d234c6a9c 100644
--- a/web/app/components/app/configuration/base/warning-mask/has-not-set-api.tsx
+++ b/web/app/components/app/configuration/base/warning-mask/has-not-set-api.tsx
@@ -15,21 +15,21 @@ const HasNotSetAPI: FC = ({
return (
-
-
+
- {t('noModelProviderConfigured', { ns: 'appDebug' })}
- {t('noModelProviderConfiguredTip', { ns: 'appDebug' })}
+ {t('noModelProviderConfigured', { ns: 'appDebug' })}
+ {t('noModelProviderConfiguredTip', { ns: 'appDebug' })}
diff --git a/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx
index 2cd33759f8..2783f66c3f 100644
--- a/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx
+++ b/web/app/components/app/configuration/config-prompt/advanced-prompt-input.tsx
@@ -2,6 +2,7 @@
import type { FC } from 'react'
import type { ExternalDataTool } from '@/models/common'
import type { PromptRole, PromptVariable } from '@/models/debug'
+import { cn } from '@langgenius/dify-ui/cn'
import {
RiDeleteBinLine,
RiErrorWarningFill,
@@ -30,7 +31,6 @@ import ConfigContext from '@/context/debug-configuration'
import { useEventEmitterContextContext } from '@/context/event-emitter'
import { useModalContext } from '@/context/modal-context'
import { AppModeEnum } from '@/types/app'
-import { cn } from '@/utils/classnames'
import { getNewVar, getVars } from '@/utils/var'
import ConfirmAddVar from './confirm-add-var'
import MessageTypeSelector from './message-type-selector'
diff --git a/web/app/components/app/configuration/config-prompt/message-type-selector.tsx b/web/app/components/app/configuration/config-prompt/message-type-selector.tsx
index 0b404eea90..41e16abe92 100644
--- a/web/app/components/app/configuration/config-prompt/message-type-selector.tsx
+++ b/web/app/components/app/configuration/config-prompt/message-type-selector.tsx
@@ -1,10 +1,10 @@
'use client'
import type { FC } from 'react'
+import { cn } from '@langgenius/dify-ui/cn'
import { useBoolean, useClickAway } from 'ahooks'
import * as React from 'react'
import { ChevronSelectorVertical } from '@/app/components/base/icons/src/vender/line/arrows'
import { PromptRole } from '@/models/debug'
-import { cn } from '@/utils/classnames'
type Props = {
value: PromptRole
@@ -25,10 +25,10 @@ const MessageTypeSelector: FC = ({
{showOption && (
@@ -39,7 +39,7 @@ const MessageTypeSelector: FC = ({
setHide()
onChange(type)
}}
- className="flex h-9 min-w-[44px] cursor-pointer items-center rounded-lg px-3 text-sm font-medium uppercase text-text-secondary hover:bg-state-base-hover"
+ className="flex h-9 min-w-[44px] cursor-pointer items-center rounded-lg px-3 text-sm font-medium text-text-secondary uppercase hover:bg-state-base-hover"
>
{type}
diff --git a/web/app/components/app/configuration/config-prompt/prompt-editor-height-resize-wrap.tsx b/web/app/components/app/configuration/config-prompt/prompt-editor-height-resize-wrap.tsx
index 0320169676..ac8029a2e7 100644
--- a/web/app/components/app/configuration/config-prompt/prompt-editor-height-resize-wrap.tsx
+++ b/web/app/components/app/configuration/config-prompt/prompt-editor-height-resize-wrap.tsx
@@ -1,9 +1,9 @@
'use client'
import type { FC } from 'react'
+import { cn } from '@langgenius/dify-ui/cn'
import { useDebounceFn } from 'ahooks'
import * as React from 'react'
import { useCallback, useEffect, useState } from 'react'
-import { cn } from '@/utils/classnames'
type Props = {
className?: string
diff --git a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx
index da1949af60..0f6d2b94a6 100644
--- a/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx
+++ b/web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx
@@ -3,6 +3,7 @@ import type { FC } from 'react'
import type { ExternalDataTool } from '@/models/common'
import type { PromptVariable } from '@/models/debug'
import type { GenRes } from '@/service/debug'
+import { cn } from '@langgenius/dify-ui/cn'
import { useBoolean } from 'ahooks'
import { noop } from 'es-toolkit/function'
import { produce } from 'immer'
@@ -28,7 +29,6 @@ import { useEventEmitterContextContext } from '@/context/event-emitter'
import { useModalContext } from '@/context/modal-context'
import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
import { AppModeEnum } from '@/types/app'
-import { cn } from '@/utils/classnames'
import { getNewVar, getVars } from '@/utils/var'
import ConfirmAddVar from './confirm-add-var'
import PromptEditorHeightResizeWrap from './prompt-editor-height-resize-wrap'
@@ -179,14 +179,14 @@ const Prompt: FC = ({
{!noTitle && (
-
+
- {mode !== AppModeEnum.COMPLETION ? t('chatSubTitle', { ns: 'appDebug' }) : t('completionSubTitle', { ns: 'appDebug' })}
+ {mode !== AppModeEnum.COMPLETION ? t('chatSubTitle', { ns: 'appDebug' }) : t('completionSubTitle', { ns: 'appDebug' })}
{!readonly && (
+
)}
/>
diff --git a/web/app/components/app/configuration/config-var/config-modal/field.tsx b/web/app/components/app/configuration/config-var/config-modal/field.tsx
index f9ef303252..6ed837812b 100644
--- a/web/app/components/app/configuration/config-var/config-modal/field.tsx
+++ b/web/app/components/app/configuration/config-var/config-modal/field.tsx
@@ -1,8 +1,8 @@
'use client'
import type { FC } from 'react'
+import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
-import { cn } from '@/utils/classnames'
type Props = {
className?: string
@@ -20,10 +20,10 @@ const Field: FC = ({
const { t } = useTranslation()
return (
-
+
{title}
{isOptional && (
-
+
(
{t('variableConfig.optional', { ns: 'appDebug' })}
)
diff --git a/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx b/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx
index c2a02f4710..fa318ae35d 100644
--- a/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx
+++ b/web/app/components/app/configuration/config-var/config-modal/form-fields.tsx
@@ -206,7 +206,7 @@ const ConfigModalFormFields: FC = ({
value={jsonSchemaStr}
onChange={onJSONSchemaChange}
noWrapper
- className="h-[80px] overflow-y-auto radius-lg bg-components-input-bg-normal p-1"
+ className="h-[80px] overflow-y-auto rounded-[10px] bg-components-input-bg-normal p-1"
placeholder={{jsonConfigPlaceHolder} }
/>
diff --git a/web/app/components/app/configuration/config-var/config-modal/type-select.tsx b/web/app/components/app/configuration/config-var/config-modal/type-select.tsx
index 00720b0579..5fd7c88b82 100644
--- a/web/app/components/app/configuration/config-var/config-modal/type-select.tsx
+++ b/web/app/components/app/configuration/config-var/config-modal/type-select.tsx
@@ -2,6 +2,7 @@
import type { FC } from 'react'
import type { InputVarType } from '@/app/components/workflow/types'
import { ChevronDownIcon } from '@heroicons/react/20/solid'
+import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
import { useState } from 'react'
import Badge from '@/app/components/base/badge'
@@ -12,7 +13,6 @@ import {
} from '@/app/components/base/portal-to-follow-elem'
import InputVarTypeIcon from '@/app/components/workflow/nodes/_base/components/input-var-type-icon'
import { inputVarTypeToVarType } from '@/app/components/workflow/nodes/_base/components/variable/utils'
-import { cn } from '@/utils/classnames'
export type Item = {
value: InputVarType
diff --git a/web/app/components/app/configuration/config-var/config-select/index.tsx b/web/app/components/app/configuration/config-var/config-select/index.tsx
index 6a5b12c417..24bc3b4a06 100644
--- a/web/app/components/app/configuration/config-var/config-select/index.tsx
+++ b/web/app/components/app/configuration/config-var/config-select/index.tsx
@@ -1,11 +1,11 @@
'use client'
import type { FC } from 'react'
+import { cn } from '@langgenius/dify-ui/cn'
import { RiAddLine, RiDeleteBinLine, RiDraggable } from '@remixicon/react'
import * as React from 'react'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { ReactSortable } from 'react-sortablejs'
-import { cn } from '@/utils/classnames'
export type Options = string[]
type IConfigSelectProps = {
@@ -63,13 +63,13 @@ const ConfigSelect: FC = ({
return item
}))
}}
- className="h-9 w-full grow cursor-pointer overflow-x-auto rounded-lg border-0 bg-transparent pl-1.5 pr-8 text-sm leading-9 text-text-secondary focus:outline-hidden"
+ className="h-9 w-full grow cursor-pointer overflow-x-auto rounded-lg border-0 bg-transparent pr-8 pl-1.5 text-sm leading-9 text-text-secondary focus:outline-hidden"
onFocus={() => setFocusID(index)}
onBlur={() => setFocusID(null)}
/>
{
onChange(options.filter((_, i) => index !== i))
setDeletingID(null)
@@ -87,7 +87,7 @@ const ConfigSelect: FC = ({
{ onChange([...options, '']) }}
- className="mt-1 flex h-9 cursor-pointer items-center gap-2 rounded-lg bg-components-button-tertiary-bg px-3 text-components-button-tertiary-text hover:bg-components-button-tertiary-bg-hover"
+ className="mt-1 flex h-9 cursor-pointer items-center gap-2 rounded-lg bg-components-button-tertiary-bg px-3 text-components-button-tertiary-text hover:bg-components-button-tertiary-bg-hover"
>
{t('variableConfig.addOption', { ns: 'appDebug' })}
diff --git a/web/app/components/app/configuration/config-var/index.tsx b/web/app/components/app/configuration/config-var/index.tsx
index 1c25d06f10..951680c035 100644
--- a/web/app/components/app/configuration/config-var/index.tsx
+++ b/web/app/components/app/configuration/config-var/index.tsx
@@ -4,6 +4,7 @@ import type { InputVar } from '@/app/components/workflow/types'
import type { ExternalDataTool } from '@/models/common'
import type { PromptVariable } from '@/models/debug'
import type { I18nKeysByPrefix } from '@/types/i18n'
+import { cn } from '@langgenius/dify-ui/cn'
import { useBoolean } from 'ahooks'
import { produce } from 'immer'
import * as React from 'react'
@@ -27,7 +28,6 @@ import ConfigContext from '@/context/debug-configuration'
import { useEventEmitterContextContext } from '@/context/event-emitter'
import { useModalContext } from '@/context/modal-context'
import { AppModeEnum } from '@/types/app'
-import { cn } from '@/utils/classnames'
import { getNewVar, hasDuplicateStr } from '@/utils/var'
import Panel from '../base/feature-panel'
import EditModal from './config-modal'
diff --git a/web/app/components/app/configuration/config-var/select-type-item/index.tsx b/web/app/components/app/configuration/config-var/select-type-item/index.tsx
index 7385dfd4c8..d65f5fa174 100644
--- a/web/app/components/app/configuration/config-var/select-type-item/index.tsx
+++ b/web/app/components/app/configuration/config-var/select-type-item/index.tsx
@@ -2,10 +2,10 @@
import type { FC } from 'react'
import type { InputVarType } from '@/app/components/workflow/types'
import type { I18nKeysByPrefix } from '@/types/i18n'
+import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import InputVarTypeIcon from '@/app/components/workflow/nodes/_base/components/input-var-type-icon'
-import { cn } from '@/utils/classnames'
type ISelectTypeItemProps = {
type: InputVarType
@@ -33,7 +33,7 @@ const SelectTypeItem: FC = ({
diff --git a/web/app/components/app/configuration/config-var/var-item.tsx b/web/app/components/app/configuration/config-var/var-item.tsx
index b26249dac8..80c0bf6ac6 100644
--- a/web/app/components/app/configuration/config-var/var-item.tsx
+++ b/web/app/components/app/configuration/config-var/var-item.tsx
@@ -1,6 +1,7 @@
'use client'
import type { FC } from 'react'
import type { IInputTypeIconProps } from './input-type-icon'
+import { cn } from '@langgenius/dify-ui/cn'
import {
RiDeleteBinLine,
RiDraggable,
@@ -10,7 +11,6 @@ import * as React from 'react'
import { useState } from 'react'
import Badge from '@/app/components/base/badge'
import { BracketsX as VarIcon } from '@/app/components/base/icons/src/vender/line/development'
-import { cn } from '@/utils/classnames'
import IconTypeIcon from './input-type-icon'
type ItemProps = {
@@ -39,22 +39,22 @@ const VarItem: FC = ({
const [isDeleting, setIsDeleting] = useState(false)
return (
-
+
{canDrag && (
-
+
)}
{required && }
- {type}
+ {type}
@@ -66,7 +66,7 @@ const VarItem: FC = ({
setIsDeleting(true)}
onMouseLeave={() => setIsDeleting(false)}
diff --git a/web/app/components/app/configuration/config-vision/index.tsx b/web/app/components/app/configuration/config-vision/index.tsx
index e04be8597b..aec8d808c1 100644
--- a/web/app/components/app/configuration/config-vision/index.tsx
+++ b/web/app/components/app/configuration/config-vision/index.tsx
@@ -1,5 +1,6 @@
'use client'
import type { FC } from 'react'
+import { cn } from '@langgenius/dify-ui/cn'
import { noop } from 'es-toolkit/function'
import { produce } from 'immer'
import * as React from 'react'
@@ -16,7 +17,6 @@ import { SupportUploadFileTypes } from '@/app/components/workflow/types'
// import OptionCard from '@/app/components/workflow/nodes/_base/components/option-card'
import ConfigContext from '@/context/debug-configuration'
import { Resolution } from '@/types/app'
-import { cn } from '@/utils/classnames'
import ParamConfig from './param-config'
const ConfigVision: FC = () => {
@@ -62,14 +62,14 @@ const ConfigVision: FC = () => {
return null
return (
-
+
- {t('vision.name', { ns: 'appDebug' })}
+ {t('vision.name', { ns: 'appDebug' })}
@@ -100,7 +100,7 @@ const ConfigVision: FC = () => {
selected={file?.image?.detail === Resolution.high}
onSelect={noop}
className={cn(
- 'cursor-not-allowed rounded-lg px-3 hover:shadow-none',
+ 'cursor-not-allowed rounded-lg px-3 hover:shadow-none',
file?.image?.detail !== Resolution.high && 'hover:border-components-option-card-option-border',
)}
/>
@@ -109,7 +109,7 @@ const ConfigVision: FC = () => {
selected={file?.image?.detail === Resolution.low}
onSelect={noop}
className={cn(
- 'cursor-not-allowed rounded-lg px-3 hover:shadow-none',
+ 'cursor-not-allowed rounded-lg px-3 hover:shadow-none',
file?.image?.detail !== Resolution.low && 'hover:border-components-option-card-option-border',
)}
/>
@@ -119,7 +119,7 @@ const ConfigVision: FC = () => {
: (
<>
-
+
{
diff --git a/web/app/components/app/configuration/config/agent/agent-setting/item-panel.tsx b/web/app/components/app/configuration/config/agent/agent-setting/item-panel.tsx
index 92d3239608..56f1863ec1 100644
--- a/web/app/components/app/configuration/config/agent/agent-setting/item-panel.tsx
+++ b/web/app/components/app/configuration/config/agent/agent-setting/item-panel.tsx
@@ -1,8 +1,8 @@
'use client'
import type { FC } from 'react'
+import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
import Tooltip from '@/app/components/base/tooltip'
-import { cn } from '@/utils/classnames'
type Props = {
className?: string
@@ -23,7 +23,7 @@ const ItemPanel: FC = ({
{icon}
- {name}
+ {name}
diff --git a/web/app/components/app/configuration/config/agent/agent-tools/index.tsx b/web/app/components/app/configuration/config/agent/agent-tools/index.tsx
index 16212afa73..87546b94b4 100644
--- a/web/app/components/app/configuration/config/agent/agent-tools/index.tsx
+++ b/web/app/components/app/configuration/config/agent/agent-tools/index.tsx
@@ -4,6 +4,7 @@ import type { Collection } from '@/app/components/tools/types'
import type { ToolDefaultValue, ToolValue } from '@/app/components/workflow/block-selector/types'
import type { ToolWithProvider } from '@/app/components/workflow/types'
import type { AgentTool } from '@/types/app'
+import { cn } from '@langgenius/dify-ui/cn'
import {
RiDeleteBinLine,
RiEqualizer2Line,
@@ -32,7 +33,6 @@ import ConfigContext from '@/context/debug-configuration'
import { useMittContextSelector } from '@/context/mitt-context'
import { useAllBuiltInTools, useAllCustomTools, useAllMCPTools, useAllWorkflowTools } from '@/service/use-tools'
import { canFindTool } from '@/utils'
-import { cn } from '@/utils/classnames'
import { useFormattingChangedDispatcher } from '../../../debug/hooks'
import SettingBuiltInTool from './setting-built-in-tool'
diff --git a/web/app/components/app/configuration/config/agent/agent-tools/setting-built-in-tool.tsx b/web/app/components/app/configuration/config/agent/agent-tools/setting-built-in-tool.tsx
index 757465b5ee..ae9ec962c7 100644
--- a/web/app/components/app/configuration/config/agent/agent-tools/setting-built-in-tool.tsx
+++ b/web/app/components/app/configuration/config/agent/agent-tools/setting-built-in-tool.tsx
@@ -2,6 +2,7 @@
import type { FC } from 'react'
import type { Collection, Tool } from '@/app/components/tools/types'
import type { ToolWithProvider } from '@/app/components/workflow/types'
+import { cn } from '@langgenius/dify-ui/cn'
import {
RiArrowLeftLine,
RiCloseLine,
@@ -28,7 +29,6 @@ import { toolParametersToFormSchemas } from '@/app/components/tools/utils/to-for
import { useLocale } from '@/context/i18n'
import { getLanguage } from '@/i18n-config/language'
import { fetchBuiltInToolList, fetchCustomToolList, fetchModelToolList, fetchWorkflowToolList } from '@/service/tools'
-import { cn } from '@/utils/classnames'
type Props = {
showBackButton?: boolean
diff --git a/web/app/components/app/configuration/config/assistant-type-picker/index.tsx b/web/app/components/app/configuration/config/assistant-type-picker/index.tsx
index 27adbf253e..df0baa2f36 100644
--- a/web/app/components/app/configuration/config/assistant-type-picker/index.tsx
+++ b/web/app/components/app/configuration/config/assistant-type-picker/index.tsx
@@ -1,6 +1,7 @@
'use client'
import type { FC } from 'react'
import type { AgentConfig } from '@/models/debug'
+import { cn } from '@langgenius/dify-ui/cn'
import { RiArrowDownSLine } from '@remixicon/react'
import * as React from 'react'
import { useState } from 'react'
@@ -15,7 +16,6 @@ import {
PortalToFollowElemTrigger,
} from '@/app/components/base/portal-to-follow-elem'
import Radio from '@/app/components/base/radio/ui'
-import { cn } from '@/utils/classnames'
import AgentSetting from '../agent/agent-setting'
type Props = {
@@ -45,15 +45,15 @@ const SelectItem: FC = ({ text, value, Icon, isChecked, description,
onClick={() => !disabled && onClick(value)}
>
-
- {description}
+ {description}
)
}
@@ -84,7 +84,7 @@ const AssistantTypePicker: FC = ({
<>
{
if (isAgent) {
setOpen(false)
@@ -93,15 +93,15 @@ const AssistantTypePicker: FC = ({
}}
>
-
+
- {t('agent.setting.name', { ns: 'appDebug' })}
+ {t('agent.setting.name', { ns: 'appDebug' })}
- {t('agent.setting.description', { ns: 'appDebug' })}
+ {t('agent.setting.description', { ns: 'appDebug' })}
>
)
@@ -117,7 +117,7 @@ const AssistantTypePicker: FC = ({
}}
>
setOpen(v => !v)}>
-
+
{isAgent ? : }
{t(`assistantType.${isAgent ? 'agentAssistant' : 'chatAssistant'}.name`, { ns: 'appDebug' })}
@@ -125,7 +125,7 @@ const AssistantTypePicker: FC = ({
- {t('assistantType.name', { ns: 'appDebug' })}
+ {t('assistantType.name', { ns: 'appDebug' })}
= ({
return (
- {t(`${i18nPrefix}.idealOutput`, { ns: 'appDebug' })}
+ {t(`${i18nPrefix}.idealOutput`, { ns: 'appDebug' })}
(
{t(`${i18nPrefix}.optional`, { ns: 'appDebug' })}
diff --git a/web/app/components/app/configuration/config/automatic/instruction-editor.tsx b/web/app/components/app/configuration/config/automatic/instruction-editor.tsx
index 94a8d2480a..5596b335df 100644
--- a/web/app/components/app/configuration/config/automatic/instruction-editor.tsx
+++ b/web/app/components/app/configuration/config/automatic/instruction-editor.tsx
@@ -2,6 +2,7 @@
import type { FC } from 'react'
import type { GeneratorType } from './types'
import type { Node, NodeOutPutVar, ValueSelector } from '@/app/components/workflow/types'
+import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import PromptEditor from '@/app/components/base/prompt-editor'
@@ -9,7 +10,6 @@ import { PROMPT_EDITOR_INSERT_QUICKLY } from '@/app/components/base/prompt-edito
import { Type } from '@/app/components/workflow/nodes/llm/types'
import { BlockEnum } from '@/app/components/workflow/types'
import { useEventEmitterContextContext } from '@/context/event-emitter'
-import { cn } from '@/utils/classnames'
type Props = {
editorKey: string
@@ -45,7 +45,7 @@ const InstructionEditor: FC = ({
const isCode = generatorType === 'code'
const placeholder = isCode
? (
-
+
{t(`${i18nPrefix}.codeGenInstructionPlaceHolderLine`, { ns: 'appDebug' })}
)
@@ -67,7 +67,7 @@ const InstructionEditor: FC = ({
return (
= ({
editable
isSupportFileVar={false}
/>
-
+
{t('generate.press', { ns: 'appDebug' })}
- /
+ /
{t('generate.to', { ns: 'appDebug' })}
{t('generate.insertContext', { ns: 'appDebug' })}
diff --git a/web/app/components/app/configuration/config/automatic/prompt-toast.tsx b/web/app/components/app/configuration/config/automatic/prompt-toast.tsx
index cd99e8e999..8a17e6b0ce 100644
--- a/web/app/components/app/configuration/config/automatic/prompt-toast.tsx
+++ b/web/app/components/app/configuration/config/automatic/prompt-toast.tsx
@@ -1,9 +1,9 @@
+import { cn } from '@langgenius/dify-ui/cn'
import { RiArrowDownSLine, RiSparklingFill } from '@remixicon/react'
import { useBoolean } from 'ahooks'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import { Markdown } from '@/app/components/base/markdown'
-import { cn } from '@/utils/classnames'
import s from './style.module.css'
type Props = {
@@ -43,7 +43,7 @@ const PromptToast = ({
{!isFold && (
-
+
)}
diff --git a/web/app/components/app/configuration/config/automatic/version-selector.tsx b/web/app/components/app/configuration/config/automatic/version-selector.tsx
index c345410c34..25846e9b54 100644
--- a/web/app/components/app/configuration/config/automatic/version-selector.tsx
+++ b/web/app/components/app/configuration/config/automatic/version-selector.tsx
@@ -1,10 +1,10 @@
+import { cn } from '@langgenius/dify-ui/cn'
import { RiArrowDownSLine, RiCheckLine } from '@remixicon/react'
import { useBoolean } from 'ahooks'
import * as React from 'react'
import { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger } from '@/app/components/base/portal-to-follow-elem'
-import { cn } from '@/utils/classnames'
type VersionSelectorProps = {
versionLen: number
@@ -52,14 +52,14 @@ const VersionSelector: React.FC = ({ versionLen, value, on
asChild
>
-
+
{t('generate.version', { ns: 'appDebug' })}
{' '}
{value + 1}
{isLatest && ` · ${t('generate.latest', { ns: 'appDebug' })}`}
- {moreThanOneVersion && }
+ {moreThanOneVersion && }
= ({ versionLen, value, on
'w-[208px] rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur p-1 shadow-lg',
)}
>
-
+
{t('generate.versions', { ns: 'appDebug' })}
{
@@ -79,7 +79,7 @@ const VersionSelector: React.FC = ({ versionLen, value, on
{
diff --git a/web/app/components/app/configuration/dataset-config/card-item/index.tsx b/web/app/components/app/configuration/dataset-config/card-item/index.tsx
index ac38c50e59..8eb856feb3 100644
--- a/web/app/components/app/configuration/dataset-config/card-item/index.tsx
+++ b/web/app/components/app/configuration/dataset-config/card-item/index.tsx
@@ -1,6 +1,7 @@
'use client'
import type { FC } from 'react'
import type { DataSet } from '@/models/datasets'
+import { cn } from '@langgenius/dify-ui/cn'
import {
RiDeleteBinLine,
RiEditLine,
@@ -14,7 +15,6 @@ import Badge from '@/app/components/base/badge'
import Drawer from '@/app/components/base/drawer'
import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
import { useKnowledge } from '@/hooks/use-knowledge'
-import { cn } from '@/utils/classnames'
import SettingsModal from '../settings-modal'
type ItemProps = {
@@ -68,7 +68,7 @@ const Item: FC = ({
background={iconInfo.icon_type === 'image' ? undefined : iconInfo.icon_background}
imageUrl={iconInfo.icon_type === 'image' ? iconInfo.icon_url : undefined}
/>
- {config.name}
+ {config.name}
{
diff --git a/web/app/components/app/configuration/dataset-config/context-var/index.tsx b/web/app/components/app/configuration/dataset-config/context-var/index.tsx
index 41b839681b..634277c469 100644
--- a/web/app/components/app/configuration/dataset-config/context-var/index.tsx
+++ b/web/app/components/app/configuration/dataset-config/context-var/index.tsx
@@ -1,11 +1,11 @@
'use client'
import type { FC } from 'react'
import type { Props } from './var-picker'
+import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import { BracketsX } from '@/app/components/base/icons/src/vender/line/development'
import Tooltip from '@/app/components/base/tooltip'
-import { cn } from '@/utils/classnames'
import VarPicker from './var-picker'
const ContextVar: FC = (props) => {
@@ -14,7 +14,7 @@ const ContextVar: FC = (props) => {
const currItem = options.find(item => item.value === value)
const notSetVar = !currItem
return (
-
+
diff --git a/web/app/components/app/configuration/dataset-config/context-var/var-picker.tsx b/web/app/components/app/configuration/dataset-config/context-var/var-picker.tsx
index d5c8ef4682..d29b2e34df 100644
--- a/web/app/components/app/configuration/dataset-config/context-var/var-picker.tsx
+++ b/web/app/components/app/configuration/dataset-config/context-var/var-picker.tsx
@@ -2,6 +2,7 @@
import type { FC } from 'react'
import type { IInputTypeIconProps } from '@/app/components/app/configuration/config-var/input-type-icon'
import { ChevronDownIcon } from '@heroicons/react/24/outline'
+import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
@@ -11,7 +12,6 @@ import {
PortalToFollowElemContent,
PortalToFollowElemTrigger,
} from '@/app/components/base/portal-to-follow-elem'
-import { cn } from '@/utils/classnames'
type Option = { name: string, value: string, type: string }
export type Props = {
@@ -57,11 +57,11 @@ const VarPicker: FC = ({
setOpen(v => !v)}>
@@ -82,7 +82,7 @@ const VarPicker: FC = ({
{options.length > 0
? (
-
+
{options.map(({ name, value, type }, index) => (
= ({ readonly, hideMetadataFilter }) => {
)
: (
- {t('feature.dataSet.noData', { ns: 'appDebug' })}
+ {t('feature.dataSet.noData', { ns: 'appDebug' })}
)}
diff --git a/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx b/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx
index 00fa66c426..47ece57eb0 100644
--- a/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx
+++ b/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx
@@ -9,6 +9,7 @@ import type {
import type {
DatasetConfigs,
} from '@/models/debug'
+import { cn } from '@langgenius/dify-ui/cn'
import { memo, useCallback, useEffect, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import Divider from '@/app/components/base/divider'
@@ -24,7 +25,6 @@ import ModelSelector from '@/app/components/header/account-setting/model-provide
import { useSelectedDatasetsMode } from '@/app/components/workflow/nodes/knowledge-retrieval/hooks'
import { RerankingModeEnum } from '@/models/datasets'
import { RETRIEVE_TYPE } from '@/types/app'
-import { cn } from '@/utils/classnames'
import WeightedScore from './weighted-score'
type Props = {
@@ -188,14 +188,14 @@ const ConfigContent: FC = ({
return (
- {t('retrievalSettings', { ns: 'dataset' })}
-
+ {t('retrievalSettings', { ns: 'dataset' })}
+
{t('defaultRetrievalTip', { ns: 'dataset' })}
{type === RETRIEVE_TYPE.multiWay && (
<>
-
+
{t('rerankSettings', { ns: 'dataset' })}
@@ -203,21 +203,21 @@ const ConfigContent: FC = ({
{
selectedDatasetsMode.inconsistentEmbeddingModel
&& (
-
+
{t('inconsistentEmbeddingModelTip', { ns: 'dataset' })}
)
}
{
selectedDatasetsMode.mixtureInternalAndExternal && (
-
+
{t('mixtureInternalAndExternalTip', { ns: 'dataset' })}
)
}
{
selectedDatasetsMode.allExternal && (
-
+
{t('allExternalTip', { ns: 'dataset' })}
)
@@ -225,7 +225,7 @@ const ConfigContent: FC = ({
{
selectedDatasetsMode.mixtureHighQualityAndEconomic
&& (
-
+
{t('mixtureHighQualityAndEconomicTip', { ns: 'dataset' })}
)
@@ -238,7 +238,7 @@ const ConfigContent: FC = ({
handleRerankModeChange(option.value)}
@@ -272,7 +272,7 @@ const ConfigContent: FC = ({
/>
)
}
- {t('modelProvider.rerankModel.key', { ns: 'common' })}
+ {t('modelProvider.rerankModel.key', { ns: 'common' })}
@@ -362,7 +362,7 @@ const ConfigContent: FC = ({
{isInWorkflow && type === RETRIEVE_TYPE.oneWay && (
- {t('modelProvider.systemReasoningModel.key', { ns: 'common' })}
+ {t('modelProvider.systemReasoningModel.key', { ns: 'common' })}
diff --git a/web/app/components/app/configuration/dataset-config/params-config/index.tsx b/web/app/components/app/configuration/dataset-config/params-config/index.tsx
index 5c40afba9f..ce78ad6e99 100644
--- a/web/app/components/app/configuration/dataset-config/params-config/index.tsx
+++ b/web/app/components/app/configuration/dataset-config/params-config/index.tsx
@@ -1,6 +1,7 @@
'use client'
import type { DataSet } from '@/models/datasets'
import type { DatasetConfigs } from '@/models/debug'
+import { cn } from '@langgenius/dify-ui/cn'
import { RiEqualizer2Line } from '@remixicon/react'
import { memo, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
@@ -16,7 +17,6 @@ import {
import ConfigContext from '@/context/debug-configuration'
import { RerankingModeEnum } from '@/models/datasets'
import { RETRIEVE_TYPE } from '@/types/app'
-import { cn } from '@/utils/classnames'
import ConfigContent from './config-content'
type ParamsConfigProps = {
diff --git a/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx b/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx
index 21ed5134b0..ff371fc2df 100644
--- a/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx
+++ b/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx
@@ -1,6 +1,7 @@
'use client'
import type { FC } from 'react'
import type { DataSet } from '@/models/datasets'
+import { cn } from '@langgenius/dify-ui/cn'
import { useInfiniteScroll } from 'ahooks'
import * as React from 'react'
import { useMemo, useRef, useState } from 'react'
@@ -15,7 +16,6 @@ import FeatureIcon from '@/app/components/header/account-setting/model-provider-
import { useKnowledge } from '@/hooks/use-knowledge'
import Link from '@/next/link'
import { useInfiniteDatasets } from '@/service/knowledge/use-dataset'
-import { cn } from '@/utils/classnames'
type ISelectDataSetProps = {
isShow: boolean
diff --git a/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx b/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx
index dc8823cacb..872d081307 100644
--- a/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx
+++ b/web/app/components/app/configuration/dataset-config/settings-modal/index.tsx
@@ -2,6 +2,7 @@ import type { FC } from 'react'
import type { Member } from '@/models/common'
import type { DataSet } from '@/models/datasets'
import type { RetrievalConfig } from '@/types/app'
+import { cn } from '@langgenius/dify-ui/cn'
import { RiCloseLine } from '@remixicon/react'
import { isEqual } from 'es-toolkit/predicate'
import { useEffect, useMemo, useRef, useState } from 'react'
@@ -25,7 +26,6 @@ import { useModalContext } from '@/context/modal-context'
import { DatasetPermission } from '@/models/datasets'
import { updateDatasetSetting } from '@/service/datasets'
import { useMembers } from '@/service/use-common'
-import { cn } from '@/utils/classnames'
import { RetrievalChangeTip, RetrievalSection } from './retrieval-section'
type SettingsModalProps = {
diff --git a/web/app/components/app/configuration/dataset-config/settings-modal/retrieval-section.tsx b/web/app/components/app/configuration/dataset-config/settings-modal/retrieval-section.tsx
index 6d478de908..c67c50f1d1 100644
--- a/web/app/components/app/configuration/dataset-config/settings-modal/retrieval-section.tsx
+++ b/web/app/components/app/configuration/dataset-config/settings-modal/retrieval-section.tsx
@@ -2,6 +2,7 @@ import type { FC } from 'react'
import type { DataSet } from '@/models/datasets'
import type { RetrievalConfig } from '@/types/app'
import type { DocPathWithoutLang } from '@/types/doc-paths'
+import { cn } from '@langgenius/dify-ui/cn'
import { RiCloseLine } from '@remixicon/react'
import Divider from '@/app/components/base/divider'
import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'
@@ -10,7 +11,6 @@ import EconomicalRetrievalMethodConfig from '@/app/components/datasets/common/ec
import RetrievalMethodConfig from '@/app/components/datasets/common/retrieval-method-config'
import { IndexingType } from '@/app/components/datasets/create/step-two'
import RetrievalSettings from '@/app/components/datasets/external-knowledge-base/create/RetrievalSettings'
-import { cn } from '@/utils/classnames'
type CommonSectionProps = {
rowClass: string
@@ -58,7 +58,7 @@ const ExternalRetrievalSection: FC = ({
-
+
{currentDataset?.external_knowledge_info.external_knowledge_api_name}
·
@@ -102,7 +102,7 @@ const InternalRetrievalSection: FC = ({
{t('form.retrievalSetting.title', { ns: 'datasetSettings' })}
-
+
@@ -198,10 +198,10 @@ export const RetrievalChangeTip: FC = ({
return null
return (
- | |