- {[
- { title: t(`${i18nPrefix}.whoCanInstall`, { ns: 'plugin' }), key: 'install_permission', value: tempPrivilege?.install_permission || PermissionType.noOne },
- { title: t(`${i18nPrefix}.whoCanDebug`, { ns: 'plugin' }), key: 'debug_permission', value: tempPrivilege?.debug_permission || PermissionType.noOne },
- ].map(({ title, key, value }) => (
-
-
-
- {[PermissionType.everyone, PermissionType.admin, PermissionType.noOne].map(option => (
-
handlePrivilegeChange(key)(option)}
- selected={value === option}
- className="flex-1"
- />
- ))}
+
+
+
+
+
+ {t(`${i18nPrefix}.title`, { ns: 'plugin' })}
+
+
+ {[
+ { title: t(`${i18nPrefix}.whoCanInstall`, { ns: 'plugin' }), key: 'install_permission', value: tempPrivilege?.install_permission || PermissionType.noOne },
+ { title: t(`${i18nPrefix}.whoCanDebug`, { ns: 'plugin' }), key: 'debug_permission', value: tempPrivilege?.debug_permission || PermissionType.noOne },
+ ].map(({ title, key, value }) => (
+
+
+
+ {[PermissionType.everyone, PermissionType.admin, PermissionType.noOne].map(option => (
+ handlePrivilegeChange(key)(option)}
+ selected={value === option}
+ className="flex-1"
+ />
+ ))}
+
-
- ))}
+ ))}
+
+ {
+ enable_marketplace && (
+
+ )
+ }
+
+
+
+
- {
- enable_marketplace && (
-
- )
- }
-
-
-
-
-
-
+
+
)
}
diff --git a/web/app/components/rag-pipeline/components/__tests__/publish-as-knowledge-pipeline-modal.spec.tsx b/web/app/components/rag-pipeline/components/__tests__/publish-as-knowledge-pipeline-modal.spec.tsx
index 7a99b7ab90..e1a4af0410 100644
--- a/web/app/components/rag-pipeline/components/__tests__/publish-as-knowledge-pipeline-modal.spec.tsx
+++ b/web/app/components/rag-pipeline/components/__tests__/publish-as-knowledge-pipeline-modal.spec.tsx
@@ -17,9 +17,12 @@ vi.mock('@/app/components/workflow/store', () => ({
}),
}))
-vi.mock('@/app/components/base/modal', () => ({
- default: ({ children, isShow }: { children: React.ReactNode, isShow: boolean }) =>
- isShow ?
{children}
: null,
+vi.mock('@langgenius/dify-ui/dialog', () => ({
+ Dialog: ({ children, open }: { children: React.ReactNode, open?: boolean }) =>
+ open === false ? null : <>{children}>,
+ DialogContent: ({ children, className }: { children: React.ReactNode, className?: string }) => (
+
{children}
+ ),
}))
vi.mock('@langgenius/dify-ui/button', () => ({
diff --git a/web/app/components/rag-pipeline/components/__tests__/update-dsl-modal.spec.tsx b/web/app/components/rag-pipeline/components/__tests__/update-dsl-modal.spec.tsx
index d31a06f421..815b21ba98 100644
--- a/web/app/components/rag-pipeline/components/__tests__/update-dsl-modal.spec.tsx
+++ b/web/app/components/rag-pipeline/components/__tests__/update-dsl-modal.spec.tsx
@@ -121,18 +121,14 @@ vi.mock('@langgenius/dify-ui/button', () => ({
),
}))
-vi.mock('@/app/components/base/modal', () => ({
- default: ({ children, isShow, _onClose, className }: PropsWithChildren<{
- isShow: boolean
- _onClose: () => void
- className?: string
- }>) => isShow
- ? (
-
- {children}
-
- )
- : null,
+vi.mock('@langgenius/dify-ui/dialog', () => ({
+ Dialog: ({ children, open }: PropsWithChildren<{ open?: boolean }>) =>
+ open === false ? null : <>{children}>,
+ DialogContent: ({ children, className }: PropsWithChildren<{ className?: string }>) => (
+
+ {children}
+
+ ),
}))
vi.mock('@/app/components/workflow/constants', () => ({
diff --git a/web/app/components/rag-pipeline/components/__tests__/version-mismatch-modal.spec.tsx b/web/app/components/rag-pipeline/components/__tests__/version-mismatch-modal.spec.tsx
index 56ed88e2ae..b4b29fd0a8 100644
--- a/web/app/components/rag-pipeline/components/__tests__/version-mismatch-modal.spec.tsx
+++ b/web/app/components/rag-pipeline/components/__tests__/version-mismatch-modal.spec.tsx
@@ -31,13 +31,13 @@ describe('VersionMismatchModal', () => {
it('should render dialog when isShow is true', () => {
render(
)
- expect(screen.getByRole('dialog')).toBeInTheDocument()
+ expect(screen.getByRole('alertdialog')).toBeInTheDocument()
})
it('should not render dialog when isShow is false', () => {
render(
)
- expect(screen.queryByRole('dialog')).not.toBeInTheDocument()
+ expect(screen.queryByRole('alertdialog')).not.toBeInTheDocument()
})
it('should render error title', () => {
diff --git a/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx b/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx
index faa71f0f4e..a810ae543a 100644
--- a/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx
+++ b/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx
@@ -2,14 +2,13 @@
import type { AppIconSelection } from '@/app/components/base/app-icon-picker'
import type { IconInfo } from '@/models/datasets'
import { Button } from '@langgenius/dify-ui/button'
+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'
import { RiCloseLine } from '@remixicon/react'
-import { noop } from 'es-toolkit/function'
import { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'
import AppIcon from '@/app/components/base/app-icon'
import AppIconPicker from '@/app/components/base/app-icon-picker'
import Input from '@/app/components/base/input'
-import Modal from '@/app/components/base/modal'
import Textarea from '@/app/components/base/textarea'
import { useWorkflowStore } from '@/app/components/workflow/store'
@@ -77,71 +76,70 @@ const PublishAsKnowledgePipelineModal = ({
return (
<>
-
-
- {t('common.publishAs', { ns: 'pipeline' })}
-
-
+
-
-
-
-
- {t('common.publishAsPipeline.name', { ns: 'pipeline' })}
+
+
+
+
+ {t('common.publishAsPipeline.name', { ns: 'pipeline' })}
+
+
setPipelineName(e.target.value)}
+ placeholder={t('common.publishAsPipeline.namePlaceholder', { ns: 'pipeline' }) || ''}
+ />
-
setPipelineName(e.target.value)}
- placeholder={t('common.publishAsPipeline.namePlaceholder', { ns: 'pipeline' }) || ''}
+
{ setShowAppIconPicker(true) }}
+ className="mt-2 shrink-0 cursor-pointer"
+ iconType={pipelineIcon?.icon_type}
+ icon={pipelineIcon?.icon}
+ background={pipelineIcon?.icon_background}
+ imageUrl={pipelineIcon?.icon_url}
/>
-
{ setShowAppIconPicker(true) }}
- className="mt-2 shrink-0 cursor-pointer"
- iconType={pipelineIcon?.icon_type}
- icon={pipelineIcon?.icon}
- background={pipelineIcon?.icon_background}
- imageUrl={pipelineIcon?.icon_url}
- />
-
-
-
- {t('common.publishAsPipeline.description', { ns: 'pipeline' })}
+
+
+ {t('common.publishAsPipeline.description', { ns: 'pipeline' })}
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
{showAppIconPicker && (
- {
+ if (!open)
+ onCancel()
+ }}
>
-
-
{t('common.importDSL', { ns: 'workflow' })}
-
-
-
-
-
-
-
-
-
-
-
{t('common.importDSLTip', { ns: 'workflow' })}
-
-
+
+
+
+
{t('common.importDSL', { ns: 'workflow' })}
+
+
-
-
-
- {t('common.chooseDSL', { ns: 'workflow' })}
+
+
+
+
+
+
+
{t('common.importDSLTip', { ns: 'workflow' })}
+
+
+
+
-
-
+
+
+ {t('common.chooseDSL', { ns: 'workflow' })}
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
{
+ if (!open)
+ onClose()
+ }}
>
-
-
{t('newApp.appCreateDSLErrorTitle', { ns: 'app' })}
-
-
{t('newApp.appCreateDSLErrorPart1', { ns: 'app' })}
-
{t('newApp.appCreateDSLErrorPart2', { ns: 'app' })}
-
-
- {t('newApp.appCreateDSLErrorPart3', { ns: 'app' })}
- {versions?.importedVersion}
-
-
- {t('newApp.appCreateDSLErrorPart4', { ns: 'app' })}
- {versions?.systemVersion}
-
+
+
+
{t('newApp.appCreateDSLErrorTitle', { ns: 'app' })}
+
} className="flex grow flex-col system-md-regular text-text-secondary">
+
{t('newApp.appCreateDSLErrorPart1', { ns: 'app' })}
+
{t('newApp.appCreateDSLErrorPart2', { ns: 'app' })}
+
+
+ {t('newApp.appCreateDSLErrorPart3', { ns: 'app' })}
+ {versions?.importedVersion}
+
+
+ {t('newApp.appCreateDSLErrorPart4', { ns: 'app' })}
+ {versions?.systemVersion}
+
+
-
-
-
-
-
-
+
+ {t('newApp.Cancel', { ns: 'app' })}
+ {t('newApp.Confirm', { ns: 'app' })}
+
+
+
)
}
diff --git a/web/app/components/share/text-generation/info-modal.tsx b/web/app/components/share/text-generation/info-modal.tsx
index 29471548ef..f3b2bef5ad 100644
--- a/web/app/components/share/text-generation/info-modal.tsx
+++ b/web/app/components/share/text-generation/info-modal.tsx
@@ -1,8 +1,8 @@
import type { SiteInfo } from '@/models/share'
import { cn } from '@langgenius/dify-ui/cn'
+import { Dialog, DialogCloseButton, DialogContent } from '@langgenius/dify-ui/dialog'
import * as React from 'react'
import AppIcon from '@/app/components/base/app-icon'
-import Modal from '@/app/components/base/modal'
import { appDefaultIconBackground } from '@/config'
type Props = {
@@ -17,37 +17,42 @@ const InfoModal = ({
data,
}: Props) => {
return (
-
{
+ if (!open)
+ onClose()
+ }}
>
-
-
-
{data?.title}
-
- {/* copyright */}
- {data?.copyright && (
-
- ©
- {(new Date()).getFullYear()}
- {' '}
- {data?.copyright}
-
- )}
- {data?.custom_disclaimer && (
-
{data.custom_disclaimer}
- )}
+
+
+
+
+
+
{data?.title}
+
+ {/* copyright */}
+ {data?.copyright && (
+
+ ©
+ {(new Date()).getFullYear()}
+ {' '}
+ {data?.copyright}
+
+ )}
+ {data?.custom_disclaimer && (
+
{data.custom_disclaimer}
+ )}
+
-
-
+
+
)
}
diff --git a/web/app/components/tools/mcp/mcp-server-modal.tsx b/web/app/components/tools/mcp/mcp-server-modal.tsx
index ab4a5c36f4..cfb33f3839 100644
--- a/web/app/components/tools/mcp/mcp-server-modal.tsx
+++ b/web/app/components/tools/mcp/mcp-server-modal.tsx
@@ -3,12 +3,11 @@ import type {
MCPServerDetail,
} from '@/app/components/tools/types'
import { Button } from '@langgenius/dify-ui/button'
-import { cn } from '@langgenius/dify-ui/cn'
+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'
import { RiCloseLine } from '@remixicon/react'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import Divider from '@/app/components/base/divider'
-import Modal from '@/app/components/base/modal'
import Textarea from '@/app/components/base/textarea'
import MCPServerParamItem from '@/app/components/tools/mcp/mcp-server-param-item'
import { webSocketClient } from '@/app/components/workflow/collaboration/core/websocket-manager'
@@ -20,11 +19,19 @@ import {
type ModalProps = {
appID: string
- latestParams?: any[]
+ latestParams?: MCPServerParam[]
data?: MCPServerDetail
show: boolean
onHide: () => void
- appInfo?: any
+ appInfo?: {
+ description?: string
+ }
+}
+
+type MCPServerParam = {
+ variable?: string
+ label?: string
+ type?: string
}
const MCPServerModal = ({
@@ -42,7 +49,7 @@ const MCPServerModal = ({
const defaultDescription = data?.description || appInfo?.description || ''
const [description, setDescription] = React.useState(defaultDescription)
- const [params, setParams] = React.useState(data?.parameters || {})
+ const [params, setParams] = React.useState
>(data?.parameters || {})
const handleParamChange = (variable: string, value: string) => {
setParams(prev => ({
@@ -52,10 +59,14 @@ const MCPServerModal = ({
}
const getParamValue = () => {
- const res = {} as any
- latestParams.map((param) => {
- res[param.variable] = params[param.variable]
- return param
+ const res: Record = {}
+ latestParams.forEach((param) => {
+ if (!param.variable)
+ return
+
+ const value = params[param.variable]
+ if (value !== undefined)
+ res[param.variable] = value
})
return res
}
@@ -78,7 +89,11 @@ const MCPServerModal = ({
const submit = async () => {
if (!data) {
- const payload: any = {
+ const payload: {
+ appID: string
+ description?: string
+ parameters: Record
+ } = {
appID,
parameters: getParamValue(),
}
@@ -92,13 +107,18 @@ const MCPServerModal = ({
onHide()
}
else {
- const payload: any = {
+ const payload: {
+ appID: string
+ id: string
+ description: string
+ parameters: Record
+ } = {
appID,
id: data.id,
parameters: getParamValue(),
+ description,
}
- payload.description = description
await updateMCPServer(payload)
invalidateMCPServerDetail(appID)
emitMcpServerUpdate('updated')
@@ -107,56 +127,67 @@ const MCPServerModal = ({
}
return (
- {
+ if (!open)
+ onHide()
+ }}
>
-
-
-
-
- {!data ? t('mcp.server.modal.addTitle', { ns: 'tools' }) : t('mcp.server.modal.editTitle', { ns: 'tools' })}
-
-
-
-
-
{t('mcp.server.modal.description', { ns: 'tools' })}
-
*
-
-
+
+
+
- {latestParams.length > 0 && (
-
-
-
{t('mcp.server.modal.parameters', { ns: 'tools' })}
-
-
-
{t('mcp.server.modal.parametersTip', { ns: 'tools' })}
-
- {latestParams.map(paramItem => (
-
handleParamChange(paramItem.variable, value)}
- />
- ))}
+
+ {!data ? t('mcp.server.modal.addTitle', { ns: 'tools' }) : t('mcp.server.modal.editTitle', { ns: 'tools' })}
+
+
+
+
+
{t('mcp.server.modal.description', { ns: 'tools' })}
+
*
+
- )}
-
-
-
-
-
-
+ {latestParams.length > 0 && (
+
+
+
{t('mcp.server.modal.parameters', { ns: 'tools' })}
+
+
+
{t('mcp.server.modal.parametersTip', { ns: 'tools' })}
+
+ {latestParams.map((paramItem) => {
+ if (!paramItem.variable)
+ return null
+
+ const { variable } = paramItem
+
+ return (
+ handleParamChange(variable, value)}
+ />
+ )
+ })}
+
+
+ )}
+
+
+
+
+
+
+
)
}
diff --git a/web/app/components/tools/mcp/modal.tsx b/web/app/components/tools/mcp/modal.tsx
index 165535127d..79179ae3dc 100644
--- a/web/app/components/tools/mcp/modal.tsx
+++ b/web/app/components/tools/mcp/modal.tsx
@@ -4,17 +4,15 @@ import type { AppIconSelection } from '@/app/components/base/app-icon-picker'
import type { ToolWithProvider } from '@/app/components/workflow/types'
import type { AppIconType } from '@/types/app'
import { Button } from '@langgenius/dify-ui/button'
-import { cn } from '@langgenius/dify-ui/cn'
+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'
import { toast } from '@langgenius/dify-ui/toast'
import { RiCloseLine, RiEditLine } from '@remixicon/react'
import { useHover } from 'ahooks'
-import { noop } from 'es-toolkit/function'
import { useTranslation } from 'react-i18next'
import AppIcon from '@/app/components/base/app-icon'
import AppIconPicker from '@/app/components/base/app-icon-picker'
import { Mcp } from '@/app/components/base/icons/src/vender/other'
import Input from '@/app/components/base/input'
-import Modal from '@/app/components/base/modal'
import TabSlider from '@/app/components/base/tab-slider'
import { MCPAuthMethod } from '@/app/components/tools/types'
import { shouldUseMcpIconForAppIcon } from '@/utils/mcp'
@@ -281,18 +279,16 @@ const MCPModal: FC
= ({
const formKey = data?.id ?? 'create'
return (
-
-
-
+
)
}
diff --git a/web/app/components/workflow/nodes/http/components/authorization/index.tsx b/web/app/components/workflow/nodes/http/components/authorization/index.tsx
index b72e52911d..684f943d5f 100644
--- a/web/app/components/workflow/nodes/http/components/authorization/index.tsx
+++ b/web/app/components/workflow/nodes/http/components/authorization/index.tsx
@@ -4,12 +4,12 @@ import type { Authorization as AuthorizationPayloadType } from '../../types'
import type { Var } from '@/app/components/workflow/types'
import { Button } from '@langgenius/dify-ui/button'
import { cn } from '@langgenius/dify-ui/cn'
+import { Dialog, DialogContent, DialogTitle } from '@langgenius/dify-ui/dialog'
import { produce } from 'immer'
import * as React from 'react'
import { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'
import BaseInput from '@/app/components/base/input'
-import Modal from '@/app/components/base/modal'
import Input from '@/app/components/workflow/nodes/_base/components/input-support-select-var'
import useAvailableVarList from '@/app/components/workflow/nodes/_base/hooks/use-available-var-list'
import { VarType } from '@/app/components/workflow/types'
@@ -115,70 +115,78 @@ const Authorization: FC = ({
onHide()
}, [tempPayload, onChange, onHide])
return (
- {
+ if (!open)
+ onHide()
+ }}
>
-
-
-
-
-
+
+
+ {t(`${i18nPrefix}.authorization`, { ns: 'workflow' })}
+
- {tempPayload.type === AuthorizationType.apiKey && (
- <>
-
-
-
- {tempPayload.config?.type === APIType.custom && (
-
-
+
+
+
+
+
+ {tempPayload.type === AuthorizationType.apiKey && (
+ <>
+
+
- )}
+ {tempPayload.config?.type === APIType.custom && (
+
+
+
+ )}
-
-
-
-
-
- >
- )}
+
+
+
+
+
+ >
+ )}
+
+
+
+
+
-
-
-
-
-
-
+
+
)
}
export default React.memo(Authorization)
diff --git a/web/app/components/workflow/nodes/http/components/curl-panel.tsx b/web/app/components/workflow/nodes/http/components/curl-panel.tsx
index 8ba5fb36a9..87dc2a3427 100644
--- a/web/app/components/workflow/nodes/http/components/curl-panel.tsx
+++ b/web/app/components/workflow/nodes/http/components/curl-panel.tsx
@@ -2,11 +2,11 @@
import type { FC } from 'react'
import type { HttpNodeType } from '../types'
import { Button } from '@langgenius/dify-ui/button'
+import { Dialog, DialogContent, DialogTitle } from '@langgenius/dify-ui/dialog'
import { toast } from '@langgenius/dify-ui/toast'
import * as React from 'react'
import { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'
-import Modal from '@/app/components/base/modal'
import Textarea from '@/app/components/base/textarea'
import { useNodesInteractions } from '@/app/components/workflow/hooks'
import { parseCurl } from './curl-parser'
@@ -42,28 +42,35 @@ const CurlPanel: FC = ({ nodeId, isShow, onHide, handleCurlImport }) => {
}, [onHide, nodeId, inputString, handleNodeSelect, handleCurlImport])
return (
- {
+ if (!open)
+ onHide()
+ }}
>
-
-
-
-
-
-
-
+
+
+ {t('nodes.http.curl.title', { ns: 'workflow' })}
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/index.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/index.tsx
index 66ea3bfc59..eaa31932da 100644
--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/index.tsx
+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/index.tsx
@@ -1,7 +1,7 @@
import type { FC } from 'react'
import type { SchemaRoot } from '../../types'
+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'
import * as React from 'react'
-import Modal from '../../../../../base/modal'
import JsonSchemaConfig from './json-schema-config'
type JsonSchemaConfigModalProps = {
@@ -18,17 +18,22 @@ const JsonSchemaConfigModal: FC = ({
onClose,
}) => {
return (
- {
+ if (!open)
+ onClose()
+ }}
>
-
-
+
+
+
+
+
)
}
diff --git a/web/app/components/workflow/nodes/parameter-extractor/__tests__/integration.spec.tsx b/web/app/components/workflow/nodes/parameter-extractor/__tests__/integration.spec.tsx
index f63d9a0d50..2c5de93964 100644
--- a/web/app/components/workflow/nodes/parameter-extractor/__tests__/integration.spec.tsx
+++ b/web/app/components/workflow/nodes/parameter-extractor/__tests__/integration.spec.tsx
@@ -110,24 +110,23 @@ vi.mock('@/app/components/header/account-setting/model-provider-page/model-param
),
}))
-vi.mock('@/app/components/base/modal', () => ({
+vi.mock('@langgenius/dify-ui/dialog', () => ({
__esModule: true,
- default: ({
+ Dialog: ({
children,
- isShow,
- title,
+ open,
}: {
children: ReactNode
- isShow?: boolean
- title?: ReactNode
- }) => isShow
+ open?: boolean
+ }) => open !== false
? (
)
: null,
+ DialogContent: ({ children }: { children: ReactNode }) => <>{children}>,
+ DialogTitle: ({ children }: { children: ReactNode }) => {children}
,
}))
vi.mock('@/app/components/workflow/nodes/_base/components/collapse', () => ({
diff --git a/web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/update.tsx b/web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/update.tsx
index ddded68989..122ee16941 100644
--- a/web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/update.tsx
+++ b/web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/update.tsx
@@ -3,6 +3,7 @@ import type { FC } from 'react'
import type { Param } from '../../types'
import type { MoreInfo } from '@/app/components/workflow/types'
import { Button } from '@langgenius/dify-ui/button'
+import { Dialog, DialogContent, DialogTitle } from '@langgenius/dify-ui/dialog'
import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger } from '@langgenius/dify-ui/select'
import { Switch } from '@langgenius/dify-ui/switch'
import { toast } from '@langgenius/dify-ui/toast'
@@ -13,7 +14,6 @@ import { useTranslation } from 'react-i18next'
import Field from '@/app/components/app/configuration/config-var/config-modal/field'
import ConfigSelect from '@/app/components/app/configuration/config-var/config-select'
import Input from '@/app/components/base/input'
-import Modal from '@/app/components/base/modal'
import Textarea from '@/app/components/base/textarea'
import { ChangeType } from '@/app/components/workflow/types'
import { checkKeys } from '@/utils/var'
@@ -124,64 +124,71 @@ const AddExtractParameter: FC = ({
)}
{isShowModal && (
- {
+ if (!open)
+ hideModal()
+ }}
>
-
-
-
- handleParamChange('name')(e.target.value)}
- placeholder={t(`${i18nPrefix}.addExtractParameterContent.namePlaceholder`, { ns: 'workflow' })!}
- />
-
-
-
-
- {param.type === ParamType.select && (
-
-
+
+
+ {t(`${i18nPrefix}.addExtractParameter`, { ns: 'workflow' })}
+
+
+
+
+
+ handleParamChange('name')(e.target.value)}
+ placeholder={t(`${i18nPrefix}.addExtractParameterContent.namePlaceholder`, { ns: 'workflow' })!}
+ />
- )}
-
-
-
- <>
- {t(`${i18nPrefix}.addExtractParameterContent.requiredContent`, { ns: 'workflow' })}
-
- >
-
+
+
+
+ {param.type === ParamType.select && (
+
+
+
+ )}
+
+
+
+ <>
+ {t(`${i18nPrefix}.addExtractParameterContent.requiredContent`, { ns: 'workflow' })}
+
+ >
+
+
+
+
+
+
-
-
-
-
-
-
+
+
)}
)
diff --git a/web/app/components/workflow/panel/debug-and-preview/conversation-variable-modal.tsx b/web/app/components/workflow/panel/debug-and-preview/conversation-variable-modal.tsx
index 573d3e5642..689b2fe0b3 100644
--- a/web/app/components/workflow/panel/debug-and-preview/conversation-variable-modal.tsx
+++ b/web/app/components/workflow/panel/debug-and-preview/conversation-variable-modal.tsx
@@ -3,10 +3,10 @@ import type {
ConversationVariable,
} from '@/app/components/workflow/types'
import { cn } from '@langgenius/dify-ui/cn'
+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'
import { RiCloseLine } from '@remixicon/react'
import { useMount } from 'ahooks'
import copy from 'copy-to-clipboard'
-import { noop } from 'es-toolkit/function'
import { capitalize } from 'es-toolkit/string'
import * as React from 'react'
import { useCallback } from 'react'
@@ -16,7 +16,6 @@ import {
CopyCheck,
} from '@/app/components/base/icons/src/vender/line/files'
import { BubbleX } from '@/app/components/base/icons/src/vender/line/others'
-import Modal from '@/app/components/base/modal'
import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'
import { CodeLanguage } from '@/app/components/workflow/nodes/code/types'
import { ChatVarType } from '@/app/components/workflow/panel/chat-variable-panel/type'
@@ -76,87 +75,86 @@ const ConversationVariableModal = ({
})
return (
-
-
-
-
-
- {/* LEFT */}
-
-
{t('chatVariable.panelTitle', { ns: 'workflow' })}
-
- {varList.map(chatVar => (
-
setCurrentVar(chatVar)}>
-
-
{chatVar.name}
-
- ))}
-
+