Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
refactor(dify-ui): finish primitive migration from web/base/ui to @langgenius/dify-ui (#35349)
yyhdfcc0f8863b5
diff --git a/.github/workflows/web-tests.yml b/.github/workflows/web-tests.ymlindex f3ab4c62c73..dcee8863ce2 100644--- a/.github/workflows/web-tests.yml+++ b/.github/workflows/web-tests.yml@@ -89,3 +89,34 @@ jobs:flags: webenv:CODECOV_TOKEN: ${{ env.CODECOV_TOKEN }}++ dify-ui-test:+ name: dify-ui Tests+ runs-on: ubuntu-latest+ env:+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}+ defaults:+ run:+ shell: bash+ working-directory: ./packages/dify-ui++ steps:+ - name: Checkout code+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2+ with:+ persist-credentials: false++ - name: Setup web environment+ uses: ./.github/actions/setup-web++ - name: Run dify-ui tests+ run: vp test run --coverage --silent=passed-only++ - name: Report coverage+ if: ${{ env.CODECOV_TOKEN != '' }}+ uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0+ with:+ directory: packages/dify-ui/coverage+ flags: dify-ui+ env:+ CODECOV_TOKEN: ${{ env.CODECOV_TOKEN }}diff --git a/codecov.yml b/codecov.ymlindex 54ac2a4b36b..a5060876986 100644--- a/codecov.yml+++ b/codecov.yml@@ -3,6 +3,10 @@ coverage:project:default:target: auto+ # Absorb sub-percent coverage noise (rounding, trivial added lines, CVA variants, etc).+ threshold: 1%+ # Deleting covered code during refactors/migrations must not regress base.+ removed_code_behavior: adjust_baseflags:web:@@ -10,6 +14,11 @@ flags:- "web/"carryforward: true+ dify-ui:+ paths:+ - "packages/dify-ui/"+ carryforward: true+api:paths:- "api/"diff --git a/eslint-suppressions.json b/eslint-suppressions.jsonindex 173a3a7bd77..477391e2dee 100644--- a/eslint-suppressions.json+++ b/eslint-suppressions.json@@ -2113,11 +2113,6 @@"count": 1}},- "web/app/components/base/switch/index.stories.tsx": {- "ts/no-explicit-any": {- "count": 1- }- },"web/app/components/base/tab-slider/index.tsx": {"react/set-state-in-effect": {"count": 2diff --git a/packages/dify-ui/.gitignore b/packages/dify-ui/.gitignorenew file mode 100644index 00000000000..befe881885d--- /dev/null+++ b/packages/dify-ui/.gitignore@@ -0,0 +1,3 @@+/coverage+/dist+/storybook-staticdiff --git a/packages/dify-ui/.storybook/main.ts b/packages/dify-ui/.storybook/main.tsnew file mode 100644index 00000000000..c8b7ee8e3f5--- /dev/null+++ b/packages/dify-ui/.storybook/main.ts@@ -0,0 +1,27 @@+import type { StorybookConfig } from '@storybook/react-vite'+import tailwindcss from '@tailwindcss/vite'+import { mergeConfig } from 'vite'++const config: StorybookConfig = {+ stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],+ addons: [+ '@storybook/addon-links',+ '@storybook/addon-docs',+ '@storybook/addon-themes',+ '@chromatic-com/storybook',+ ],+ framework: '@storybook/react-vite',+ core: {+ disableWhatsNewNotifications: true,+ },+ docs: {+ defaultName: 'Documentation',+ },+ async viteFinal(config) {+ return mergeConfig(config, {+ plugins: [tailwindcss()],+ })+ },+}++export default configdiff --git a/packages/dify-ui/.storybook/preview.tsx b/packages/dify-ui/.storybook/preview.tsxnew file mode 100644index 00000000000..a5bfc5d8af6--- /dev/null+++ b/packages/dify-ui/.storybook/preview.tsx@@ -0,0 +1,31 @@+import type { Preview } from '@storybook/react-vite'+import { withThemeByDataAttribute } from '@storybook/addon-themes'+import './storybook.css'++export const decorators = [+ withThemeByDataAttribute({+ themes: {+ light: 'light',+ dark: 'dark',+ },+ defaultTheme: 'light',+ attributeName: 'data-theme',+ }),+]++const preview: Preview = {+ parameters: {+ controls: {+ matchers: {+ color: /(background|color)$/i,+ date: /Date$/i,+ },+ },+ docs: {+ toc: true,+ },+ },+ tags: ['autodocs'],+}++export default previewdiff --git a/packages/dify-ui/.storybook/storybook.css b/packages/dify-ui/.storybook/storybook.cssnew file mode 100644index 00000000000..e9796fd046f--- /dev/null+++ b/packages/dify-ui/.storybook/storybook.css@@ -0,0 +1,19 @@+@import 'tailwindcss';++@config '../tailwind.config.ts';++@import '../src/styles/styles.css';++html {+ color-scheme: light;+}++html[data-theme='dark'] {+ color-scheme: dark;+}++body {+ background: var(--color-components-panel-bg);+ color: var(--color-text-primary, #101828);+ font-family: Inter, ui-sans-serif, system-ui, sans-serif;+}diff --git a/packages/dify-ui/AGENTS.md b/packages/dify-ui/AGENTS.mdindex ecc968e130c..651b1170708 100644--- a/packages/dify-ui/AGENTS.md+++ b/packages/dify-ui/AGENTS.md@@ -1,6 +1,15 @@# @langgenius/dify-ui-This package provides shared design tokens (colors, shadows, typography), the `cn()` utility, and a Tailwind CSS preset consumed by `web/`.+Shared design tokens, the `cn()` utility, a Tailwind CSS preset, and headless primitive components consumed by `web/`.++## Component Authoring Rules++- Use `@base-ui/react` primitives + `cva` + `cn`.+- Inside dify-ui, cross-component imports use relative paths (`../button`). External consumers use subpath exports (`@langgenius/dify-ui/button`).+- No imports from `web/`. No dependencies on next / i18next / ky / jotai / zustand.+- One component per folder: `src/<name>/index.tsx`, optional `index.stories.tsx` and `__tests__/index.spec.tsx`. Add a matching `./<name>` subpath to `package.json#exports`.+- Props pattern: `Omit<BaseXxx.Root.Props, 'className' | ...> & VariantProps<typeof xxxVariants> & { /* custom */ }`.+- When a component accepts a prop typed from a shared internal module, `export type` it from that component so consumers import it from the component subpath.## Border Radius: Figma Token → Tailwind Class Mappingdiff --git a/packages/dify-ui/package.json b/packages/dify-ui/package.jsonindex b54fde9b89d..2b78b25ed61 100644--- a/packages/dify-ui/package.json+++ b/packages/dify-ui/package.json@@ -12,18 +12,109 @@"./cn": {"types": "./src/cn.ts","import": "./src/cn.ts"+ },+ "./alert-dialog": {+ "types": "./src/alert-dialog/index.tsx",+ "import": "./src/alert-dialog/index.tsx"+ },+ "./avatar": {+ "types": "./src/avatar/index.tsx",+ "import": "./src/avatar/index.tsx"+ },+ "./button": {+ "types": "./src/button/index.tsx",+ "import": "./src/button/index.tsx"+ },+ "./context-menu": {+ "types": "./src/context-menu/index.tsx",+ "import": "./src/context-menu/index.tsx"+ },+ "./dialog": {+ "types": "./src/dialog/index.tsx",+ "import": "./src/dialog/index.tsx"+ },+ "./dropdown-menu": {+ "types": "./src/dropdown-menu/index.tsx",+ "import": "./src/dropdown-menu/index.tsx"+ },+ "./number-field": {+ "types": "./src/number-field/index.tsx",+ "import": "./src/number-field/index.tsx"+ },+ "./popover": {+ "types": "./src/popover/index.tsx",+ "import": "./src/popover/index.tsx"+ },+ "./scroll-area": {+ "types": "./src/scroll-area/index.tsx",+ "import": "./src/scroll-area/index.tsx"+ },+ "./select": {+ "types": "./src/select/index.tsx",+ "import": "./src/select/index.tsx"+ },+ "./slider": {+ "types": "./src/slider/index.tsx",+ "import": "./src/slider/index.tsx"+ },+ "./switch": {+ "types": "./src/switch/index.tsx",+ "import": "./src/switch/index.tsx"+ },+ "./toast": {+ "types": "./src/toast/index.tsx",+ "import": "./src/toast/index.tsx"+ },+ "./tooltip": {+ "types": "./src/tooltip/index.tsx",+ "import": "./src/tooltip/index.tsx"}},"scripts": {+ "storybook": "storybook dev",+ "storybook:build": "storybook build",+ "test": "vp test",+ "test:watch": "vp test --watch","type-check": "tsc"},+ "peerDependencies": {+ "@base-ui/react": "catalog:",+ "class-variance-authority": "catalog:",+ "react": "catalog:",+ "react-dom": "catalog:",+ "tailwindcss": "catalog:"+ },"dependencies": {"clsx": "catalog:","tailwind-merge": "catalog:"},"devDependencies": {+ "@base-ui/react": "catalog:",+ "@chromatic-com/storybook": "catalog:","@dify/tsconfig": "workspace:*",+ "@egoist/tailwindcss-icons": "catalog:",+ "@iconify-json/ri": "catalog:",+ "@storybook/addon-docs": "catalog:",+ "@storybook/addon-links": "catalog:",+ "@storybook/addon-themes": "catalog:",+ "@storybook/react-vite": "catalog:",+ "@tailwindcss/vite": "catalog:",+ "@testing-library/jest-dom": "catalog:",+ "@testing-library/react": "catalog:",+ "@testing-library/user-event": "catalog:",+ "@types/react": "catalog:",+ "@types/react-dom": "catalog:",+ "@vitejs/plugin-react": "catalog:",+ "@vitest/coverage-v8": "catalog:",+ "class-variance-authority": "catalog:",+ "happy-dom": "catalog:",+ "react": "catalog:",+ "react-dom": "catalog:",+ "storybook": "catalog:","tailwindcss": "catalog:",- "typescript": "catalog:"+ "typescript": "catalog:",+ "vite": "catalog:",+ "vite-plus": "catalog:",+ "vitest": "catalog:"}}diff --git a/web/app/components/base/ui/alert-dialog/__tests__/index.spec.tsx b/packages/dify-ui/src/alert-dialog/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/alert-dialog/__tests__/index.spec.tsxrename to packages/dify-ui/src/alert-dialog/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/alert-dialog/index.stories.tsx b/packages/dify-ui/src/alert-dialog/index.stories.tsxsimilarity index 99%rename from web/app/components/base/ui/alert-dialog/index.stories.tsxrename to packages/dify-ui/src/alert-dialog/index.stories.tsxindex c9deaa53ed8..0b6f60f01ef 100644--- a/web/app/components/base/ui/alert-dialog/index.stories.tsx+++ b/packages/dify-ui/src/alert-dialog/index.stories.tsx@@ -1,4 +1,4 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'import { useState } from 'react'import {AlertDialog,diff --git a/web/app/components/base/ui/alert-dialog/index.tsx b/packages/dify-ui/src/alert-dialog/index.tsxsimilarity index 94%rename from web/app/components/base/ui/alert-dialog/index.tsxrename to packages/dify-ui/src/alert-dialog/index.tsxindex 5f2af43df86..7b432c87dc6 100644--- a/web/app/components/base/ui/alert-dialog/index.tsx+++ b/packages/dify-ui/src/alert-dialog/index.tsx@@ -1,10 +1,10 @@'use client'import type { ComponentPropsWithoutRef, ReactNode } from 'react'-import type { ButtonProps } from '@/app/components/base/ui/button'+import type { ButtonProps } from '../button'import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'-import { cn } from '@langgenius/dify-ui/cn'-import { Button } from '@/app/components/base/ui/button'+import { Button } from '../button'+import { cn } from '../cn'export const AlertDialog = BaseAlertDialog.Rootexport const AlertDialogTrigger = BaseAlertDialog.Triggerdiff --git a/web/app/components/base/ui/avatar/__tests__/index.spec.tsx b/packages/dify-ui/src/avatar/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/avatar/__tests__/index.spec.tsxrename to packages/dify-ui/src/avatar/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/avatar/index.stories.tsx b/packages/dify-ui/src/avatar/index.stories.tsxsimilarity index 97%rename from web/app/components/base/ui/avatar/index.stories.tsxrename to packages/dify-ui/src/avatar/index.stories.tsxindex 22de82e6db8..f8b90c0b16b 100644--- a/web/app/components/base/ui/avatar/index.stories.tsx+++ b/packages/dify-ui/src/avatar/index.stories.tsx@@ -1,4 +1,4 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'import { Avatar, AvatarFallback, AvatarRoot } from '.'const meta = {diff --git a/web/app/components/base/ui/avatar/index.tsx b/packages/dify-ui/src/avatar/index.tsxsimilarity index 98%rename from web/app/components/base/ui/avatar/index.tsxrename to packages/dify-ui/src/avatar/index.tsxindex 6fca2e87dc2..8cf893fbbd1 100644--- a/web/app/components/base/ui/avatar/index.tsx+++ b/packages/dify-ui/src/avatar/index.tsx@@ -1,6 +1,6 @@import type { ImageLoadingStatus } from '@base-ui/react/avatar'import { Avatar as BaseAvatar } from '@base-ui/react/avatar'-import { cn } from '@langgenius/dify-ui/cn'+import { cn } from '../cn'const avatarSizeClasses = {'xxs': { root: 'size-4', text: 'text-[7px]' },diff --git a/web/app/components/base/ui/button/__tests__/index.spec.tsx b/packages/dify-ui/src/button/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/button/__tests__/index.spec.tsxrename to packages/dify-ui/src/button/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/button/index.stories.tsx b/packages/dify-ui/src/button/index.stories.tsxsimilarity index 97%rename from web/app/components/base/ui/button/index.stories.tsxrename to packages/dify-ui/src/button/index.stories.tsxindex 40dce31dd41..b70a76f431f 100644--- a/web/app/components/base/ui/button/index.stories.tsx+++ b/packages/dify-ui/src/button/index.stories.tsx@@ -1,4 +1,4 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'import { Button } from '.'diff --git a/web/app/components/base/ui/button/index.tsx b/packages/dify-ui/src/button/index.tsxsimilarity index 99%rename from web/app/components/base/ui/button/index.tsxrename to packages/dify-ui/src/button/index.tsxindex 73d5ecc3c94..03e5c4a937a 100644--- a/web/app/components/base/ui/button/index.tsx+++ b/packages/dify-ui/src/button/index.tsx@@ -1,8 +1,8 @@import type { Button as BaseButtonNS } from '@base-ui/react/button'import type { VariantProps } from 'class-variance-authority'import { Button as BaseButton } from '@base-ui/react/button'-import { cn } from '@langgenius/dify-ui/cn'import { cva } from 'class-variance-authority'+import { cn } from '../cn'const buttonVariants = cva('inline-flex cursor-pointer items-center justify-center whitespace-nowrap outline-hidden focus-visible:ring-2 focus-visible:ring-state-accent-solid data-[disabled]:cursor-not-allowed',diff --git a/web/app/components/base/ui/context-menu/__tests__/index.spec.tsx b/packages/dify-ui/src/context-menu/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/context-menu/__tests__/index.spec.tsxrename to packages/dify-ui/src/context-menu/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/context-menu/index.stories.tsx b/packages/dify-ui/src/context-menu/index.stories.tsxsimilarity index 99%rename from web/app/components/base/ui/context-menu/index.stories.tsxrename to packages/dify-ui/src/context-menu/index.stories.tsxindex b3b43399f60..0be5727e7a5 100644--- a/web/app/components/base/ui/context-menu/index.stories.tsx+++ b/packages/dify-ui/src/context-menu/index.stories.tsx@@ -1,4 +1,4 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'import { useState } from 'react'import {ContextMenu,diff --git a/web/app/components/base/ui/context-menu/index.tsx b/packages/dify-ui/src/context-menu/index.tsxsimilarity index 95%rename from web/app/components/base/ui/context-menu/index.tsxrename to packages/dify-ui/src/context-menu/index.tsxindex c92c4d6ab94..fc2ae1d454f 100644--- a/web/app/components/base/ui/context-menu/index.tsx+++ b/packages/dify-ui/src/context-menu/index.tsx@@ -1,10 +1,10 @@'use client'import type { ReactNode } from 'react'-import type { OverlayItemVariant } from '@/app/components/base/ui/overlay-shared'-import type { Placement } from '@/app/components/base/ui/placement'+import type { OverlayItemVariant } from '../overlay-shared'+import type { Placement } from '../placement'import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'-import { cn } from '@langgenius/dify-ui/cn'+import { cn } from '../cn'import {overlayBackdropClassName,overlayDestructiveClassName,@@ -14,8 +14,11 @@ import {overlayPopupBaseClassName,overlayRowClassName,overlaySeparatorClassName,-} from '@/app/components/base/ui/overlay-shared'-import { parsePlacement } from '@/app/components/base/ui/placement'+} from '../overlay-shared'+import { parsePlacement } from '../placement'++/** @public */+export type { Placement }export const ContextMenu = BaseContextMenu.Rootexport const ContextMenuTrigger = BaseContextMenu.Triggerdiff --git a/web/app/components/base/ui/dialog/__tests__/index.spec.tsx b/packages/dify-ui/src/dialog/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/dialog/__tests__/index.spec.tsxrename to packages/dify-ui/src/dialog/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/dialog/index.stories.tsx b/packages/dify-ui/src/dialog/index.stories.tsxsimilarity index 99%rename from web/app/components/base/ui/dialog/index.stories.tsxrename to packages/dify-ui/src/dialog/index.stories.tsxindex 0e8f478520b..f9caa0d8c5d 100644--- a/web/app/components/base/ui/dialog/index.stories.tsx+++ b/packages/dify-ui/src/dialog/index.stories.tsx@@ -1,4 +1,4 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'import { useState } from 'react'import {Dialog,diff --git a/web/app/components/base/ui/dialog/index.tsx b/packages/dify-ui/src/dialog/index.tsxsimilarity index 98%rename from web/app/components/base/ui/dialog/index.tsxrename to packages/dify-ui/src/dialog/index.tsxindex bc82230f58c..c24acd59240 100644--- a/web/app/components/base/ui/dialog/index.tsx+++ b/packages/dify-ui/src/dialog/index.tsx@@ -9,7 +9,7 @@import type { ReactNode } from 'react'import { Dialog as BaseDialog } from '@base-ui/react/dialog'-import { cn } from '@langgenius/dify-ui/cn'+import { cn } from '../cn'export const Dialog = BaseDialog.Root/** @public */diff --git a/web/app/components/base/ui/dropdown-menu/__tests__/index.spec.tsx b/packages/dify-ui/src/dropdown-menu/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/dropdown-menu/__tests__/index.spec.tsxrename to packages/dify-ui/src/dropdown-menu/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/dropdown-menu/index.stories.tsx b/packages/dify-ui/src/dropdown-menu/index.stories.tsxsimilarity index 99%rename from web/app/components/base/ui/dropdown-menu/index.stories.tsxrename to packages/dify-ui/src/dropdown-menu/index.stories.tsxindex ae0ad61c688..f73b33ac8be 100644--- a/web/app/components/base/ui/dropdown-menu/index.stories.tsx+++ b/packages/dify-ui/src/dropdown-menu/index.stories.tsx@@ -1,4 +1,4 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'import { useState } from 'react'import {DropdownMenu,diff --git a/web/app/components/base/ui/dropdown-menu/index.tsx b/packages/dify-ui/src/dropdown-menu/index.tsxsimilarity index 95%rename from web/app/components/base/ui/dropdown-menu/index.tsxrename to packages/dify-ui/src/dropdown-menu/index.tsxindex b0c034f3cb5..f742625964e 100644--- a/web/app/components/base/ui/dropdown-menu/index.tsx+++ b/packages/dify-ui/src/dropdown-menu/index.tsx@@ -1,10 +1,10 @@'use client'import type { ReactNode } from 'react'-import type { OverlayItemVariant } from '@/app/components/base/ui/overlay-shared'-import type { Placement } from '@/app/components/base/ui/placement'+import type { OverlayItemVariant } from '../overlay-shared'+import type { Placement } from '../placement'import { Menu } from '@base-ui/react/menu'-import { cn } from '@langgenius/dify-ui/cn'+import { cn } from '../cn'import {overlayDestructiveClassName,overlayIndicatorClassName,@@ -13,8 +13,10 @@ import {overlayPopupBaseClassName,overlayRowClassName,overlaySeparatorClassName,-} from '@/app/components/base/ui/overlay-shared'-import { parsePlacement } from '@/app/components/base/ui/placement'+} from '../overlay-shared'+import { parsePlacement } from '../placement'++export type { Placement }export const DropdownMenu = Menu.Rootexport const DropdownMenuTrigger = Menu.Triggerdiff --git a/web/app/components/base/ui/number-field/__tests__/index.spec.tsx b/packages/dify-ui/src/number-field/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/number-field/__tests__/index.spec.tsxrename to packages/dify-ui/src/number-field/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/number-field/index.stories.tsx b/packages/dify-ui/src/number-field/index.stories.tsxsimilarity index 98%rename from web/app/components/base/ui/number-field/index.stories.tsxrename to packages/dify-ui/src/number-field/index.stories.tsxindex 6abb93bf111..a436d997e62 100644--- a/web/app/components/base/ui/number-field/index.stories.tsx+++ b/packages/dify-ui/src/number-field/index.stories.tsx@@ -1,5 +1,4 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'-import { cn } from '@langgenius/dify-ui/cn'+import type { Meta, StoryObj } from '@storybook/react-vite'import { useId, useState } from 'react'import {NumberField,@@ -10,6 +9,7 @@ import {NumberFieldInput,NumberFieldUnit,} from '.'+import { cn } from '../cn'type DemoFieldProps = {label: stringdiff --git a/web/app/components/base/ui/number-field/index.tsx b/packages/dify-ui/src/number-field/index.tsxsimilarity index 99%rename from web/app/components/base/ui/number-field/index.tsxrename to packages/dify-ui/src/number-field/index.tsxindex 944aa52470a..70e66dd91b6 100644--- a/web/app/components/base/ui/number-field/index.tsx+++ b/packages/dify-ui/src/number-field/index.tsx@@ -3,8 +3,8 @@import type { VariantProps } from 'class-variance-authority'import type { HTMLAttributes } from 'react'import { NumberField as BaseNumberField } from '@base-ui/react/number-field'-import { cn } from '@langgenius/dify-ui/cn'import { cva } from 'class-variance-authority'+import { cn } from '../cn'export const NumberField = BaseNumberField.Rootexport type NumberFieldRootProps = BaseNumberField.Root.Propsdiff --git a/web/app/components/base/ui/overlay-shared.ts b/packages/dify-ui/src/overlay-shared.tssimilarity index 100%rename from web/app/components/base/ui/overlay-shared.tsrename to packages/dify-ui/src/overlay-shared.tsdiff --git a/web/app/components/base/ui/placement.ts b/packages/dify-ui/src/placement.tssimilarity index 100%rename from web/app/components/base/ui/placement.tsrename to packages/dify-ui/src/placement.tsdiff --git a/web/app/components/base/ui/popover/__tests__/index.spec.tsx b/packages/dify-ui/src/popover/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/popover/__tests__/index.spec.tsxrename to packages/dify-ui/src/popover/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/popover/index.stories.tsx b/packages/dify-ui/src/popover/index.stories.tsxsimilarity index 97%rename from web/app/components/base/ui/popover/index.stories.tsxrename to packages/dify-ui/src/popover/index.stories.tsxindex 8dbae184de2..dcea5018abf 100644--- a/web/app/components/base/ui/popover/index.stories.tsx+++ b/packages/dify-ui/src/popover/index.stories.tsx@@ -1,5 +1,6 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'-import type { Placement } from '../placement'+import type { Meta, StoryObj } from '@storybook/react-vite'+import type { Placement } from '.'+import { Button } from '@langgenius/dify-ui/button'import { useState } from 'react'import {Popover,@@ -9,7 +10,6 @@ import {PopoverTitle,PopoverTrigger,} from '.'-import { Button } from '../button'const triggerButtonClassName = 'rounded-lg border border-divider-subtle bg-components-button-secondary-bg px-3 py-1.5 text-sm text-text-secondary shadow-xs hover:bg-state-base-hover'diff --git a/web/app/components/base/ui/popover/index.tsx b/packages/dify-ui/src/popover/index.tsxsimilarity index 91%rename from web/app/components/base/ui/popover/index.tsxrename to packages/dify-ui/src/popover/index.tsxindex dbde17ae212..32d111a1b8c 100644--- a/web/app/components/base/ui/popover/index.tsx+++ b/packages/dify-ui/src/popover/index.tsx@@ -1,10 +1,12 @@'use client'import type { ReactNode } from 'react'-import type { Placement } from '@/app/components/base/ui/placement'+import type { Placement } from '../placement'import { Popover as BasePopover } from '@base-ui/react/popover'-import { cn } from '@langgenius/dify-ui/cn'-import { parsePlacement } from '@/app/components/base/ui/placement'+import { cn } from '../cn'+import { parsePlacement } from '../placement'++export type { Placement }export const Popover = BasePopover.Rootexport const PopoverTrigger = BasePopover.Triggerdiff --git a/web/app/components/base/ui/scroll-area/__tests__/index.spec.tsx b/packages/dify-ui/src/scroll-area/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/scroll-area/__tests__/index.spec.tsxrename to packages/dify-ui/src/scroll-area/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/scroll-area/index.stories.tsx b/packages/dify-ui/src/scroll-area/index.stories.tsxsimilarity index 98%rename from web/app/components/base/ui/scroll-area/index.stories.tsxrename to packages/dify-ui/src/scroll-area/index.stories.tsxindex dbe8161f8f7..e1f8f9cfb59 100644--- a/web/app/components/base/ui/scroll-area/index.stories.tsx+++ b/packages/dify-ui/src/scroll-area/index.stories.tsx@@ -1,8 +1,6 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'import type { ReactNode } from 'react'-import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'-import AppIcon from '@/app/components/base/app-icon'import {ScrollAreaContent,ScrollAreaCorner,@@ -11,6 +9,7 @@ import {ScrollAreaThumb,ScrollAreaViewport,} from '.'+import { cn } from '../cn'const meta = {title: 'Base/UI/ScrollArea',@@ -490,12 +489,13 @@ const ExploreSidebarWebAppsPane = () => {)}><div className="flex min-w-0 grow items-center gap-2">- <AppIcon- size="tiny"- iconType="emoji"- icon={item.icon}- background={item.iconBackground}- />+ <div+ aria-hidden+ className="flex size-6 shrink-0 items-center justify-center rounded-md text-xs"+ style={{ background: item.iconBackground }}+ >+ {item.icon}+ </div><span className="min-w-0 truncate system-sm-regular">{item.name}</span>diff --git a/web/app/components/base/ui/scroll-area/index.tsx b/packages/dify-ui/src/scroll-area/index.tsxsimilarity index 98%rename from web/app/components/base/ui/scroll-area/index.tsxrename to packages/dify-ui/src/scroll-area/index.tsxindex 300946b1bf4..4e1832e6618 100644--- a/web/app/components/base/ui/scroll-area/index.tsx+++ b/packages/dify-ui/src/scroll-area/index.tsx@@ -2,7 +2,7 @@import type { ReactNode } from 'react'import { ScrollArea as BaseScrollArea } from '@base-ui/react/scroll-area'-import { cn } from '@langgenius/dify-ui/cn'+import { cn } from '../cn'export const ScrollAreaRoot = BaseScrollArea.Roottype ScrollAreaRootProps = BaseScrollArea.Root.Propsdiff --git a/web/app/components/base/ui/select/__tests__/index.spec.tsx b/packages/dify-ui/src/select/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/select/__tests__/index.spec.tsxrename to packages/dify-ui/src/select/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/select/index.stories.tsx b/packages/dify-ui/src/select/index.stories.tsxsimilarity index 99%rename from web/app/components/base/ui/select/index.stories.tsxrename to packages/dify-ui/src/select/index.stories.tsxindex 027d0f74dfe..6dc832a291f 100644--- a/web/app/components/base/ui/select/index.stories.tsx+++ b/packages/dify-ui/src/select/index.stories.tsx@@ -1,4 +1,4 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'import { useState } from 'react'import {Select,diff --git a/web/app/components/base/ui/select/index.tsx b/packages/dify-ui/src/select/index.tsxsimilarity index 96%rename from web/app/components/base/ui/select/index.tsxrename to packages/dify-ui/src/select/index.tsxindex 7de0088af4e..62478fad21b 100644--- a/web/app/components/base/ui/select/index.tsx+++ b/packages/dify-ui/src/select/index.tsx@@ -2,15 +2,18 @@import type { VariantProps } from 'class-variance-authority'import type { ReactNode } from 'react'-import type { Placement } from '@/app/components/base/ui/placement'+import type { Placement } from '../placement'import { Select as BaseSelect } from '@base-ui/react/select'-import { cn } from '@langgenius/dify-ui/cn'import { cva } from 'class-variance-authority'+import { cn } from '../cn'import {overlayLabelClassName,overlaySeparatorClassName,-} from '@/app/components/base/ui/overlay-shared'-import { parsePlacement } from '@/app/components/base/ui/placement'+} from '../overlay-shared'+import { parsePlacement } from '../placement'++/** @public */+export type { Placement }export const Select = BaseSelect.Rootexport const SelectValue = BaseSelect.Valuediff --git a/web/app/components/base/ui/slider/__tests__/index.spec.tsx b/packages/dify-ui/src/slider/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/slider/__tests__/index.spec.tsxrename to packages/dify-ui/src/slider/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/slider/index.stories.tsx b/packages/dify-ui/src/slider/index.stories.tsxsimilarity index 96%rename from web/app/components/base/ui/slider/index.stories.tsxrename to packages/dify-ui/src/slider/index.stories.tsxindex 91bc0d3ecb2..a48e202142e 100644--- a/web/app/components/base/ui/slider/index.stories.tsx+++ b/packages/dify-ui/src/slider/index.stories.tsx@@ -1,4 +1,4 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'import type * as React from 'react'import { useState } from 'react'import { Slider } from '.'diff --git a/web/app/components/base/ui/slider/index.tsx b/packages/dify-ui/src/slider/index.tsxsimilarity index 98%rename from web/app/components/base/ui/slider/index.tsxrename to packages/dify-ui/src/slider/index.tsxindex ad1bc0ba8f1..cfe13615987 100644--- a/web/app/components/base/ui/slider/index.tsx+++ b/packages/dify-ui/src/slider/index.tsx@@ -1,7 +1,7 @@'use client'import { Slider as BaseSlider } from '@base-ui/react/slider'-import { cn } from '@langgenius/dify-ui/cn'+import { cn } from '../cn'/** @public */export const SliderRoot = BaseSlider.Rootdiff --git a/web/app/components/base/switch/__tests__/index.spec.tsx b/packages/dify-ui/src/switch/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/switch/__tests__/index.spec.tsxrename to packages/dify-ui/src/switch/__tests__/index.spec.tsxindex 0d46095ebd0..055b6e0791b 100644--- a/web/app/components/base/switch/__tests__/index.spec.tsx+++ b/packages/dify-ui/src/switch/__tests__/index.spec.tsx@@ -1,8 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import Switch from '../index'-import { SwitchSkeleton } from '../skeleton'+import { Switch, SwitchSkeleton } from '../index'const getThumb = (switchElement: HTMLElement) => switchElement.querySelector('span')diff --git a/web/app/components/base/switch/index.stories.tsx b/packages/dify-ui/src/switch/index.stories.tsxsimilarity index 96%rename from web/app/components/base/switch/index.stories.tsxrename to packages/dify-ui/src/switch/index.stories.tsxindex 1b3a52dcc4c..f43b9ae1545 100644--- a/web/app/components/base/switch/index.stories.tsx+++ b/packages/dify-ui/src/switch/index.stories.tsx@@ -1,16 +1,16 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'+import type { ComponentProps } from 'react'import { useState, useTransition } from 'react'-import Switch from '.'-import { SwitchSkeleton } from './skeleton'+import { Switch, SwitchSkeleton } from '.'const meta = {- title: 'Base/Data Entry/Switch',+ title: 'Base/UI/Switch',component: Switch,parameters: {layout: 'centered',docs: {description: {- component: 'Toggle switch built on Base UI with CVA variants, Figma-aligned design tokens, loading spinner, and skeleton placeholder. Import `Switch` for the toggle and `SwitchSkeleton` from `./skeleton` for loading placeholders.',+ component: 'Toggle switch built on Base UI with CVA variants, Figma-aligned design tokens, loading spinner, and skeleton placeholder. Import `Switch` and `SwitchSkeleton` from `@langgenius/dify-ui/switch`.',},},},@@ -42,7 +42,7 @@ const meta = {export default metatype Story = StoryObj<typeof meta>-const SwitchDemo = (args: any) => {+const SwitchDemo = (args: Partial<ComponentProps<typeof Switch>>) => {const [enabled, setEnabled] = useState(args.checked ?? false)return (@@ -338,7 +338,7 @@ export const Skeleton: Story = {parameters: {docs: {description: {- story: '`SwitchSkeleton` renders a non-interactive placeholder with `bg-text-quaternary opacity-20`. Imported separately from `./skeleton`.',+ story: '`SwitchSkeleton` renders a non-interactive placeholder with `bg-text-quaternary opacity-20`. Exported from `@langgenius/dify-ui/switch` alongside `Switch`.',},},},diff --git a/web/app/components/base/switch/index.tsx b/packages/dify-ui/src/switch/index.tsxsimilarity index 72%rename from web/app/components/base/switch/index.tsxrename to packages/dify-ui/src/switch/index.tsxindex 942a2291d09..dd15ef6f797 100644--- a/web/app/components/base/switch/index.tsx+++ b/packages/dify-ui/src/switch/index.tsx@@ -1,10 +1,11 @@'use client'+import type { Switch as BaseSwitchNS } from '@base-ui/react/switch'import type { VariantProps } from 'class-variance-authority'+import type { HTMLAttributes } from 'react'import { Switch as BaseSwitch } from '@base-ui/react/switch'-import { cn } from '@langgenius/dify-ui/cn'import { cva } from 'class-variance-authority'-import * as React from 'react'+import { cn } from '../cn'const switchRootStateClassName = 'bg-components-toggle-bg-unchecked hover:bg-components-toggle-bg-unchecked-hover data-checked:bg-components-toggle-bg data-checked:hover:bg-components-toggle-bg-hover data-disabled:cursor-not-allowed data-disabled:bg-components-toggle-bg-unchecked-disabled data-disabled:hover:bg-components-toggle-bg-unchecked-disabled data-disabled:data-checked:bg-components-toggle-bg-disabled data-disabled:data-checked:hover:bg-components-toggle-bg-disabled'@@ -61,46 +62,35 @@ const spinnerSizeConfig: Partial<Record<SwitchSize, {},}-type SwitchProps = {- 'checked': boolean- 'onCheckedChange'?: (checked: boolean) => void- 'size'?: SwitchSize- 'disabled'?: boolean- 'loading'?: boolean- 'className'?: string- 'aria-label'?: string- 'aria-labelledby'?: string- 'data-testid'?: string-}+export type SwitchProps+ = Omit<BaseSwitchNS.Root.Props, 'className' | 'size' | 'onCheckedChange'>+ & VariantProps<typeof switchRootVariants>+ & {+ onCheckedChange?: (checked: boolean) => void+ loading?: boolean+ className?: string+ }-const Switch = ({- ref,+export function Switch({checked,- onCheckedChange,size = 'md',- disabled = false,+ disabled,loading = false,className,- 'aria-label': ariaLabel,- 'aria-labelledby': ariaLabelledBy,- 'data-testid': dataTestid,-}: SwitchProps & {- ref?: React.Ref<HTMLElement>-}) => {+ onCheckedChange,+ ...props+}: SwitchProps) {const isDisabled = disabled || loading- const spinner = loading ? spinnerSizeConfig[size] : undefined+ const spinner = loading && size ? spinnerSizeConfig[size] : undefinedreturn (<BaseSwitch.Root- ref={ref}checked={checked}- onCheckedChange={value => onCheckedChange?.(value)}disabled={isDisabled}aria-busy={loading || undefined}- aria-label={ariaLabel}- aria-labelledby={ariaLabelledBy}className={cn(switchRootVariants({ size }), className)}- data-testid={dataTestid}+ onCheckedChange={value => onCheckedChange?.(value)}+ {...props}><BaseSwitch.ThumbclassName={switchThumbVariants({ size })}@@ -123,6 +113,39 @@ const Switch = ({)}-Switch.displayName = 'Switch'+const switchSkeletonVariants = cva(+ 'bg-text-quaternary opacity-20',+ {+ variants: {+ size: {+ xs: 'h-2.5 w-3.5 rounded-xs',+ sm: 'h-3 w-5 rounded-[3.5px]',+ md: 'h-4 w-7 rounded-[5px]',+ lg: 'h-5 w-9 rounded-md',+ },+ },+ defaultVariants: {+ size: 'md',+ },+ },+)++export type SwitchSkeletonProps+ = Omit<HTMLAttributes<HTMLDivElement>, 'className'>+ & VariantProps<typeof switchSkeletonVariants>+ & {+ className?: string+ }-export default React.memo(Switch)+export function SwitchSkeleton({+ size = 'md',+ className,+ ...props+}: SwitchSkeletonProps) {+ return (+ <div+ className={cn(switchSkeletonVariants({ size }), className)}+ {...props}+ />+ )+}diff --git a/web/app/components/base/ui/toast/__tests__/index.spec.tsx b/packages/dify-ui/src/toast/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/toast/__tests__/index.spec.tsxrename to packages/dify-ui/src/toast/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/toast/index.stories.tsx b/packages/dify-ui/src/toast/index.stories.tsxsimilarity index 99%rename from web/app/components/base/ui/toast/index.stories.tsxrename to packages/dify-ui/src/toast/index.stories.tsxindex d292e3434d8..cbfb944f19a 100644--- a/web/app/components/base/ui/toast/index.stories.tsx+++ b/packages/dify-ui/src/toast/index.stories.tsx@@ -1,4 +1,4 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'+import type { Meta, StoryObj } from '@storybook/react-vite'import type { ReactNode } from 'react'import { toast } from '.'diff --git a/web/app/components/base/ui/toast/index.tsx b/packages/dify-ui/src/toast/index.tsxsimilarity index 99%rename from web/app/components/base/ui/toast/index.tsxrename to packages/dify-ui/src/toast/index.tsxindex 1f9fea51730..a479621563f 100644--- a/web/app/components/base/ui/toast/index.tsx+++ b/packages/dify-ui/src/toast/index.tsx@@ -7,7 +7,7 @@ import type {} from '@base-ui/react/toast'import type { ReactNode } from 'react'import { Toast as BaseToast } from '@base-ui/react/toast'-import { cn } from '@langgenius/dify-ui/cn'+import { cn } from '../cn'type ToastData = Record<string, never>type ToastToneStyle = {diff --git a/web/app/components/base/ui/tooltip/__tests__/index.spec.tsx b/packages/dify-ui/src/tooltip/__tests__/index.spec.tsxsimilarity index 100%rename from web/app/components/base/ui/tooltip/__tests__/index.spec.tsxrename to packages/dify-ui/src/tooltip/__tests__/index.spec.tsxdiff --git a/web/app/components/base/ui/tooltip/index.stories.tsx b/packages/dify-ui/src/tooltip/index.stories.tsxsimilarity index 98%rename from web/app/components/base/ui/tooltip/index.stories.tsxrename to packages/dify-ui/src/tooltip/index.stories.tsxindex 16d0675c440..dca3be32f3a 100644--- a/web/app/components/base/ui/tooltip/index.stories.tsx+++ b/packages/dify-ui/src/tooltip/index.stories.tsx@@ -1,5 +1,5 @@-import type { Meta, StoryObj } from '@storybook/nextjs-vite'-import type { Placement } from '../placement'+import type { Meta, StoryObj } from '@storybook/react-vite'+import type { Placement } from '.'import { useState } from 'react'import {Tooltip,diff --git a/web/app/components/base/ui/tooltip/index.tsx b/packages/dify-ui/src/tooltip/index.tsxsimilarity index 90%rename from web/app/components/base/ui/tooltip/index.tsxrename to packages/dify-ui/src/tooltip/index.tsxindex b84921e351c..e0fcd7c5c39 100644--- a/web/app/components/base/ui/tooltip/index.tsx+++ b/packages/dify-ui/src/tooltip/index.tsx@@ -1,10 +1,12 @@'use client'import type { ReactNode } from 'react'-import type { Placement } from '@/app/components/base/ui/placement'+import type { Placement } from '../placement'import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip'-import { cn } from '@langgenius/dify-ui/cn'-import { parsePlacement } from '@/app/components/base/ui/placement'+import { cn } from '../cn'+import { parsePlacement } from '../placement'++export type { Placement }type TooltipContentVariant = 'default' | 'plain'diff --git a/packages/dify-ui/tailwind.config.ts b/packages/dify-ui/tailwind.config.tsnew file mode 100644index 00000000000..bcf17317757--- /dev/null+++ b/packages/dify-ui/tailwind.config.ts@@ -0,0 +1,23 @@+import type { Config } from 'tailwindcss'+import { getIconCollections, iconsPlugin } from '@egoist/tailwindcss-icons'+import difyUIPreset from './src/tailwind-preset'++const config: Config = {+ content: [+ './src/**/*.{js,ts,jsx,tsx,mdx}',+ './.storybook/**/*.{js,ts,jsx,tsx,mdx}',+ ],+ presets: [difyUIPreset],+ plugins: [+ iconsPlugin({+ collections: getIconCollections(['ri']),+ extraProperties: {+ width: '1rem',+ height: '1rem',+ display: 'block',+ },+ }),+ ],+}++export default configdiff --git a/packages/dify-ui/tests/setup.ts b/packages/dify-ui/tests/setup.tsnew file mode 100644index 00000000000..e1ea15af2b5--- /dev/null+++ b/packages/dify-ui/tests/setup.ts@@ -0,0 +1,44 @@+import { act, cleanup } from '@testing-library/react'+import '@testing-library/jest-dom/vitest'++if (typeof Element !== 'undefined' && !Element.prototype.getAnimations)+ Element.prototype.getAnimations = () => []++if (typeof document !== 'undefined' && !document.getAnimations)+ document.getAnimations = () => []++if (typeof globalThis.ResizeObserver === 'undefined') {+ globalThis.ResizeObserver = class {+ observe() {+ return undefined+ }++ unobserve() {+ return undefined+ }++ disconnect() {+ return undefined+ }+ }+}++if (typeof globalThis.IntersectionObserver === 'undefined') {+ globalThis.IntersectionObserver = class {+ readonly root: Element | Document | null = null+ readonly rootMargin: string = ''+ readonly scrollMargin: string = ''+ readonly thresholds: ReadonlyArray<number> = []+ constructor(_callback: IntersectionObserverCallback, _options?: IntersectionObserverInit) { /* noop */ }+ observe(_target: Element) { /* noop */ }+ unobserve(_target: Element) { /* noop */ }+ disconnect() { /* noop */ }+ takeRecords(): IntersectionObserverEntry[] { return [] }+ }+}++afterEach(async () => {+ await act(async () => {+ cleanup()+ })+})diff --git a/packages/dify-ui/tsconfig.json b/packages/dify-ui/tsconfig.jsonindex b31c48ead6a..678e1de897a 100644--- a/packages/dify-ui/tsconfig.json+++ b/packages/dify-ui/tsconfig.json@@ -1,14 +1,10 @@{- "extends": "@dify/tsconfig/base.json",+ "extends": "@dify/tsconfig/react.json","compilerOptions": {- "rootDir": "src",- "declaration": true,- "declarationMap": true,- "noEmit": false,- "outDir": "dist",- "sourceMap": true,+ "rootDir": ".",+ "types": ["vitest/globals", "@testing-library/jest-dom"],"isolatedModules": true,"verbatimModuleSyntax": true},- "include": ["src"]+ "include": ["src", "tests", ".storybook", "tailwind.config.ts", "vite.config.ts"]}diff --git a/packages/dify-ui/vite.config.ts b/packages/dify-ui/vite.config.tsnew file mode 100644index 00000000000..a20b7fb35cd--- /dev/null+++ b/packages/dify-ui/vite.config.ts@@ -0,0 +1,27 @@+import react from '@vitejs/plugin-react'+import { defineConfig } from 'vite-plus'++const isCI = !!process.env.CI++export default defineConfig({+ plugins: [react()],+ resolve: {+ tsconfigPaths: true,+ },+ test: {+ environment: 'happy-dom',+ globals: true,+ setupFiles: ['./tests/setup.ts'],+ coverage: {+ provider: 'v8',+ include: ['src/**/*.{ts,tsx}'],+ exclude: [+ 'src/**/*.stories.{ts,tsx}',+ 'src/**/__tests__/**',+ 'src/themes/**',+ 'src/styles/**',+ ],+ reporter: isCI ? ['json', 'json-summary'] : ['text', 'json', 'json-summary'],+ },+ },+})diff --git a/packages/tsconfig/nextjs.json b/packages/tsconfig/nextjs.jsonindex 81c6436a97f..5beddd55ed8 100644--- a/packages/tsconfig/nextjs.json+++ b/packages/tsconfig/nextjs.json@@ -1,5 +1,5 @@{- "extends": "./web.json",+ "extends": "./react.json","compilerOptions": {"plugins": [{diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.jsonindex 52cafc5bb31..7a5b20c1db0 100644--- a/packages/tsconfig/package.json+++ b/packages/tsconfig/package.json@@ -6,6 +6,6 @@"./base.json": "./base.json","./nextjs.json": "./nextjs.json","./node.json": "./node.json",- "./web.json": "./web.json"+ "./react.json": "./react.json"}}diff --git a/packages/tsconfig/web.json b/packages/tsconfig/react.jsonsimilarity index 100%rename from packages/tsconfig/web.jsonrename to packages/tsconfig/react.jsondiff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 914bc342e25..1e0994d0a2b 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -135,6 +135,9 @@ catalogs:'@storybook/react':specifier: 10.3.5version: 10.3.5+ '@storybook/react-vite':+ specifier: 10.3.5+ version: 10.3.5'@streamdown/math':specifier: 1.0.2version: 1.0.2@@ -632,15 +635,87 @@ importers:specifier: 'catalog:'version: 3.5.0devDependencies:+ '@base-ui/react':+ specifier: 'catalog:'+ version: 1.4.0(@date-fns/[email protected])(@types/[email protected])([email protected])([email protected]([email protected]))([email protected])+ '@chromatic-com/storybook':+ specifier: 'catalog:'+ version: 5.1.2([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))'@dify/tsconfig':specifier: workspace:*version: link:../tsconfig+ '@egoist/tailwindcss-icons':+ specifier: 'catalog:'+ version: 1.9.2([email protected])+ '@iconify-json/ri':+ specifier: 'catalog:'+ version: 1.2.10+ '@storybook/addon-docs':+ specifier: 'catalog:'+ version: 10.3.5(@types/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))+ '@storybook/addon-links':+ specifier: 'catalog:'+ version: 10.3.5([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))+ '@storybook/addon-themes':+ specifier: 'catalog:'+ version: 10.3.5([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))+ '@storybook/react-vite':+ specifier: 'catalog:'+ version: 10.3.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))+ '@tailwindcss/vite':+ specifier: 'catalog:'+ version: 4.2.2(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ '@testing-library/jest-dom':+ specifier: 'catalog:'+ version: 6.9.1+ '@testing-library/react':+ specifier: 'catalog:'+ version: 16.3.2(@testing-library/[email protected])(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@testing-library/user-event':+ specifier: 'catalog:'+ version: 14.6.1(@testing-library/[email protected])+ '@types/react':+ specifier: 'catalog:'+ version: 19.2.14+ '@types/react-dom':+ specifier: 'catalog:'+ version: 19.2.3(@types/[email protected])+ '@vitejs/plugin-react':+ specifier: 'catalog:'+ version: 6.0.1(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))+ '@vitest/coverage-v8':+ specifier: 'catalog:'+ version: 4.1.4(@voidzero-dev/[email protected])+ class-variance-authority:+ specifier: 'catalog:'+ version: 0.7.1+ happy-dom:+ specifier: 'catalog:'+ version: 20.9.0+ react:+ specifier: 'catalog:'+ version: 19.2.5+ react-dom:+ specifier: 'catalog:'+ version: 19.2.5([email protected])+ storybook:+ specifier: 'catalog:'+ version: 10.3.5(@testing-library/[email protected])([email protected]([email protected]))([email protected])tailwindcss:specifier: 'catalog:'version: 4.2.2typescript:specifier: 'catalog:'version: 6.0.2+ vite:+ specifier: npm:@voidzero-dev/[email protected]+ version: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ vite-plus:+ specifier: 'catalog:'+ version: 0.1.18(@types/[email protected])(@vitest/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ vitest:+ specifier: npm:@voidzero-dev/[email protected]+ version: '@voidzero-dev/[email protected](@types/[email protected])(@vitest/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'packages/iconify-collections:devDependencies:@@ -11202,6 +11277,23 @@ snapshots:- vite- webpack+ '@storybook/[email protected](@types/[email protected])(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))':+ dependencies:+ '@mdx-js/react': 3.1.1(@types/[email protected])([email protected])+ '@storybook/csf-plugin': 10.3.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))+ '@storybook/react-dom-shim': 10.3.5([email protected]([email protected]))([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))+ react: 19.2.5+ react-dom: 19.2.5([email protected])+ storybook: 10.3.5(@testing-library/[email protected])([email protected]([email protected]))([email protected])+ ts-dedent: 2.2.0+ transitivePeerDependencies:+ - '@types/react'+ - esbuild+ - rollup+ - vite+ - webpack+'@storybook/[email protected]([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))':dependencies:'@storybook/global': 5.0.0@@ -11229,6 +11321,17 @@ snapshots:- rollup- webpack+ '@storybook/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))':+ dependencies:+ '@storybook/csf-plugin': 10.3.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))+ storybook: 10.3.5(@testing-library/[email protected])([email protected]([email protected]))([email protected])+ ts-dedent: 2.2.0+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ transitivePeerDependencies:+ - esbuild+ - rollup+ - webpack+'@storybook/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected])([email protected]))':dependencies:storybook: 10.3.5(@testing-library/[email protected])([email protected]([email protected]))([email protected])@@ -11239,6 +11342,16 @@ snapshots:vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'webpack: 5.105.4([email protected])([email protected])+ '@storybook/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))':+ dependencies:+ storybook: 10.3.5(@testing-library/[email protected])([email protected]([email protected]))([email protected])+ unplugin: 2.3.11+ optionalDependencies:+ esbuild: 0.27.2+ rollup: 4.59.0+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ webpack: 5.105.4([email protected])+'@storybook/[email protected]': {}@@ -11296,6 +11409,28 @@ snapshots:- typescript- webpack+ '@storybook/[email protected](@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))':+ dependencies:+ '@joshwooding/vite-plugin-react-docgen-typescript': 0.7.0(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ '@rollup/pluginutils': 5.3.0([email protected])+ '@storybook/builder-vite': 10.3.5(@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))+ '@storybook/react': 10.3.5([email protected]([email protected]))([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected])+ empathic: 2.0.0+ magic-string: 0.30.21+ react: 19.2.5+ react-docgen: 8.0.3+ react-dom: 19.2.5([email protected])+ resolve: 1.22.11+ storybook: 10.3.5(@testing-library/[email protected])([email protected]([email protected]))([email protected])+ tsconfig-paths: 4.2.0+ vite: '@voidzero-dev/[email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])'+ transitivePeerDependencies:+ - esbuild+ - rollup+ - supports-color+ - typescript+ - webpack+'@storybook/[email protected]([email protected]([email protected]))([email protected])([email protected](@testing-library/[email protected])([email protected]([email protected]))([email protected]))([email protected])':dependencies:'@storybook/global': 5.0.0@@ -16589,6 +16724,17 @@ snapshots:esbuild: 0.27.2uglify-js: 3.19.3+ dependencies:+ '@jridgewell/trace-mapping': 0.3.31+ jest-worker: 27.5.1+ schema-utils: 4.3.3+ terser: 5.46.1+ webpack: 5.105.4([email protected])+ optionalDependencies:+ esbuild: 0.27.2+ optional: true+dependencies:'@jridgewell/source-map': 0.3.11@@ -17118,6 +17264,39 @@ snapshots:+ dependencies:+ '@types/eslint-scope': 3.7.7+ '@types/estree': 1.0.8+ '@types/json-schema': 7.0.15+ '@webassemblyjs/ast': 1.14.1+ '@webassemblyjs/wasm-edit': 1.14.1+ '@webassemblyjs/wasm-parser': 1.14.1+ acorn: 8.16.0+ acorn-import-phases: 1.0.4([email protected])+ browserslist: 4.28.1+ chrome-trace-event: 1.0.4+ enhanced-resolve: 5.20.1+ es-module-lexer: 2.0.0+ eslint-scope: 5.1.1+ events: 3.3.0+ glob-to-regexp: 0.4.1+ graceful-fs: 4.2.11+ json-parse-even-better-errors: 2.3.1+ loader-runner: 4.3.1+ mime-types: 2.1.35+ neo-async: 2.6.2+ schema-utils: 4.3.3+ tapable: 2.3.2+ watchpack: 2.5.1+ webpack-sources: 3.3.4+ transitivePeerDependencies:+ - '@swc/core'+ - esbuild+ - uglify-js+ optional: true+dependencies:'@types/eslint-scope': 3.7.7diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex 0bd1303fb3f..12fea26d685 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -55,6 +55,7 @@ catalog:'@storybook/addon-themes': 10.3.5'@storybook/nextjs-vite': 10.3.5'@storybook/react': 10.3.5+ '@storybook/react-vite': 10.3.5'@streamdown/math': 1.0.2'@svgdotjs/svg.js': 3.2.5'@t3-oss/env-nextjs': 0.13.11diff --git a/web/.storybook/preview.tsx b/web/.storybook/preview.tsxindex a9144e71280..92b5baab0d0 100644--- a/web/.storybook/preview.tsx+++ b/web/.storybook/preview.tsx@@ -1,8 +1,8 @@import type { Preview } from '@storybook/react'import type { Resource } from 'i18next'+import { ToastHost } from '@langgenius/dify-ui/toast'import { withThemeByDataAttribute } from '@storybook/addon-themes'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'-import { ToastHost } from '../app/components/base/ui/toast'import { I18nClientProvider as I18N } from '../app/components/provider/i18n'import commonEnUS from '../i18n/en-US/common.json'diff --git a/web/__tests__/app/app-publisher-flow.test.tsx b/web/__tests__/app/app-publisher-flow.test.tsxindex 4f24fc310c9..9c09acf6a12 100644--- a/web/__tests__/app/app-publisher-flow.test.tsx+++ b/web/__tests__/app/app-publisher-flow.test.tsx@@ -106,7 +106,7 @@ vi.mock('@/service/apps', () => ({fetchAppDetailDirect: (...args: unknown[]) => mockFetchAppDetailDirect(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => mockToastError(...args),},diff --git a/web/__tests__/apps/app-card-operations-flow.test.tsx b/web/__tests__/apps/app-card-operations-flow.test.tsxindex 4b1c05e7ae4..8c3219794dc 100644--- a/web/__tests__/apps/app-card-operations-flow.test.tsx+++ b/web/__tests__/apps/app-card-operations-flow.test.tsx@@ -31,7 +31,7 @@ const toastMocks = vi.hoisted(() => ({}))const mockRouterPush = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string, options?: Record<string, unknown>) => toastMocks.mockNotify({ type: 'success', message, ...options }),error: (message: string, options?: Record<string, unknown>) => toastMocks.mockNotify({ type: 'error', message, ...options }),diff --git a/web/__tests__/billing/cloud-plan-payment-flow.test.tsx b/web/__tests__/billing/cloud-plan-payment-flow.test.tsxindex 0c1efbe1afb..de145a73e6b 100644--- a/web/__tests__/billing/cloud-plan-payment-flow.test.tsx+++ b/web/__tests__/billing/cloud-plan-payment-flow.test.tsx@@ -8,10 +8,10 @@* and workspace manager permission enforcement.*/import type { BasicPlan } from '@/app/components/billing/type'+import { toast, ToastHost } from '@langgenius/dify-ui/toast'import { cleanup, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'-import { toast, ToastHost } from '@/app/components/base/ui/toast'import { ALL_PLANS } from '@/app/components/billing/config'import { PlanRange } from '@/app/components/billing/pricing/plan-switcher/plan-range-switcher'import CloudPlanItem from '@/app/components/billing/pricing/plans/cloud-plan-item'diff --git a/web/__tests__/billing/self-hosted-plan-flow.test.tsx b/web/__tests__/billing/self-hosted-plan-flow.test.tsxindex a3386d0092a..f2b5cd3531c 100644--- a/web/__tests__/billing/self-hosted-plan-flow.test.tsx+++ b/web/__tests__/billing/self-hosted-plan-flow.test.tsx@@ -1,3 +1,4 @@+import { toast, ToastHost } from '@langgenius/dify-ui/toast'/*** Integration test: Self-Hosted Plan Flow*@@ -10,7 +11,6 @@import { cleanup, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'-import { toast, ToastHost } from '@/app/components/base/ui/toast'import { contactSalesUrl, getStartedWithCommunityUrl, getWithPremiumUrl } from '@/app/components/billing/config'import SelfHostedPlanItem from '@/app/components/billing/pricing/plans/self-hosted-plan-item'import { SelfHostedPlan } from '@/app/components/billing/type'diff --git a/web/__tests__/datasets/create-dataset-flow.test.tsx b/web/__tests__/datasets/create-dataset-flow.test.tsxindex 34d64d8c439..c8504a10c73 100644--- a/web/__tests__/datasets/create-dataset-flow.test.tsx+++ b/web/__tests__/datasets/create-dataset-flow.test.tsx@@ -33,7 +33,7 @@ vi.mock('@/service/knowledge/use-dataset', () => ({useInvalidDatasetList: () => vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: { notify: vi.fn() },toast: {success: vi.fn(),diff --git a/web/__tests__/datasets/dataset-settings-flow.test.tsx b/web/__tests__/datasets/dataset-settings-flow.test.tsxindex 7c53401b158..eaafcafe626 100644--- a/web/__tests__/datasets/dataset-settings-flow.test.tsx+++ b/web/__tests__/datasets/dataset-settings-flow.test.tsx@@ -59,7 +59,7 @@ vi.mock('@/app/components/datasets/common/check-rerank-model', () => ({isReRankModelSelected: () => true,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,success: vi.fn(),@@ -318,7 +318,7 @@ describe('Dataset Settings Flow - Cross-Module Configuration Cascade', () => {describe('Form Submission Validation → All Fields Together', () => {it('should reject empty name on save', async () => {- const { toast } = await import('@/app/components/base/ui/toast')+ const { toast } = await import('@langgenius/dify-ui/toast')const { result } = renderHook(() => useFormState())act(() => {diff --git a/web/__tests__/explore/sidebar-lifecycle-flow.test.tsx b/web/__tests__/explore/sidebar-lifecycle-flow.test.tsxindex 64dd5321ac5..35c8175a368 100644--- a/web/__tests__/explore/sidebar-lifecycle-flow.test.tsx+++ b/web/__tests__/explore/sidebar-lifecycle-flow.test.tsx@@ -53,8 +53,8 @@ vi.mock('@/service/use-explore', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/__tests__/plugins/plugin-install-flow.test.ts b/web/__tests__/plugins/plugin-install-flow.test.tsindex dd5a18b7245..d975eb71679 100644--- a/web/__tests__/plugins/plugin-install-flow.test.ts+++ b/web/__tests__/plugins/plugin-install-flow.test.ts@@ -10,7 +10,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'import { checkForUpdates, fetchReleases, handleUpload } from '@/app/components/plugins/install-plugin/hooks'const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }), {success: (message: string) => mockToastNotify({ type: 'success', message }),error: (message: string) => mockToastNotify({ type: 'error', message }),diff --git a/web/__tests__/rag-pipeline/dsl-export-import-flow.test.ts b/web/__tests__/rag-pipeline/dsl-export-import-flow.test.tsindex cdf7aba4f6a..cc97065d8f8 100644--- a/web/__tests__/rag-pipeline/dsl-export-import-flow.test.ts+++ b/web/__tests__/rag-pipeline/dsl-export-import-flow.test.ts@@ -20,7 +20,7 @@ const mockToast = {promise: vi.fn(),}-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))const mockEventEmitter = { emit: vi.fn() }diff --git a/web/__tests__/tools/tool-provider-detail-flow.test.tsx b/web/__tests__/tools/tool-provider-detail-flow.test.tsxindex c52871c946b..9cf47721520 100644--- a/web/__tests__/tools/tool-provider-detail-flow.test.tsx+++ b/web/__tests__/tools/tool-provider-detail-flow.test.tsx@@ -133,7 +133,7 @@ vi.mock('@/app/components/base/drawer', () => ({),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: { notify: vi.fn() },toast: {success: vi.fn(),diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view.tsxindex 289e50c2577..8ef0b65e0f0 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view.tsx+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view.tsx@@ -5,6 +5,7 @@ import type { BlockEnum } from '@/app/components/workflow/types'import type { UpdateAppSiteCodeResponse } from '@/models/app'import type { App } from '@/types/app'import type { I18nKeysByPrefix } from '@/types/i18n'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useEffect, useMemo } from 'react'import { useTranslation } from 'react-i18next'@@ -12,7 +13,6 @@ import AppCard from '@/app/components/app/overview/app-card'import TriggerCard from '@/app/components/app/overview/trigger-card'import { useStore as useAppStore } from '@/app/components/app/store'import Loading from '@/app/components/base/loading'-import { toast } from '@/app/components/base/ui/toast'import MCPServiceCard from '@/app/components/tools/mcp/mcp-service-card'import { collaborationManager } from '@/app/components/workflow/collaboration/core/collaboration-manager'import { webSocketClient } from '@/app/components/workflow/collaboration/core/websocket-manager'diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsxindex 3efd58ac409..471ab86e12b 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx@@ -2,12 +2,12 @@import type { FC, JSX } from 'react'import type { AliyunConfig, ArizeConfig, DatabricksConfig, LangFuseConfig, LangSmithConfig, MLflowConfig, OpikConfig, PhoenixConfig, TencentConfig, WeaveConfig } from './type'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { useBoolean } from 'ahooks'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import Indicator from '@/app/components/header/indicator'import ProviderConfigModal from './provider-config-modal'diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsxindex 9c42f858254..35fafb2a797 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx@@ -3,6 +3,7 @@ import type { FC } from 'react'import type { AliyunConfig, ArizeConfig, DatabricksConfig, LangFuseConfig, LangSmithConfig, MLflowConfig, OpikConfig, PhoenixConfig, TencentConfig, WeaveConfig } from './type'import type { TracingStatus } from '@/models/app'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {RiArrowDownDoubleLine,RiEqualizer2Line,@@ -14,7 +15,6 @@ import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import { AliyunIcon, ArizeIcon, DatabricksIcon, LangfuseIcon, LangsmithIcon, MlflowIcon, OpikIcon, PhoenixIcon, TencentIcon, WeaveIcon } from '@/app/components/base/icons/src/public/tracing'import Loading from '@/app/components/base/loading'-import { toast } from '@/app/components/base/ui/toast'import Indicator from '@/app/components/header/indicator'import { useAppContext } from '@/context/app-context'import { usePathname } from '@/next/navigation'diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsxindex 6ff8725f63f..4f2497ad71d 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx@@ -1,6 +1,17 @@'use client'import type { FC } from 'react'import type { AliyunConfig, ArizeConfig, DatabricksConfig, LangFuseConfig, LangSmithConfig, MLflowConfig, OpikConfig, PhoenixConfig, TencentConfig, WeaveConfig } from './type'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import * as React from 'react'import { useCallback, useState } from 'react'@@ -12,17 +23,6 @@ import {PortalToFollowElem,PortalToFollowElemContent,} from '@/app/components/base/portal-to-follow-elem'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { addTracingConfig, removeTracingConfig, updateTracingConfig } from '@/service/apps'import { docURL } from './config'import Field from './field'diff --git a/web/app/(humanInputLayout)/form/[token]/form.tsx b/web/app/(humanInputLayout)/form/[token]/form.tsxindex be305851010..76dcd24293e 100644--- a/web/app/(humanInputLayout)/form/[token]/form.tsx+++ b/web/app/(humanInputLayout)/form/[token]/form.tsx@@ -1,8 +1,9 @@'use client'-import type { ButtonProps } from '@/app/components/base/ui/button'+import type { ButtonProps } from '@langgenius/dify-ui/button'import type { FormInputItem, UserAction } from '@/app/components/workflow/nodes/human-input/types'import type { SiteInfo } from '@/models/share'import type { HumanInputFormError } from '@/service/use-share'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiCheckboxCircleFill,@@ -19,7 +20,6 @@ import ExpirationTime from '@/app/components/base/chat/chat/answer/human-input-cimport { getButtonStyle } from '@/app/components/base/chat/chat/answer/human-input-content/utils'import Loading from '@/app/components/base/loading'import DifyLogo from '@/app/components/base/logo/dify-logo'-import { Button } from '@/app/components/base/ui/button'import useDocumentTitle from '@/hooks/use-document-title'import { useParams } from '@/next/navigation'import { useGetHumanInputForm, useSubmitHumanInputForm } from '@/service/use-share'diff --git a/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx b/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsxindex d19e5a7d2d9..d5b3237b124 100644--- a/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx+++ b/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx@@ -1,10 +1,10 @@'use client'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowLeftLine, RiMailSendFill } from '@remixicon/react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Countdown from '@/app/components/signin/countdown'import { useLocale } from '@/context/i18n'diff --git a/web/app/(shareLayout)/webapp-reset-password/page.tsx b/web/app/(shareLayout)/webapp-reset-password/page.tsxindex cb6ece219c1..2174ac0e8e8 100644--- a/web/app/(shareLayout)/webapp-reset-password/page.tsx+++ b/web/app/(shareLayout)/webapp-reset-password/page.tsx@@ -1,11 +1,11 @@'use client'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowLeftLine, RiLockPasswordLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { COUNT_DOWN_KEY, COUNT_DOWN_TIME_MS } from '@/app/components/signin/countdown'import { emailRegex } from '@/config'import { useLocale } from '@/context/i18n'diff --git a/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx b/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsxindex df102e609a9..9a290f8789b 100644--- a/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx+++ b/web/app/(shareLayout)/webapp-reset-password/set-password/page.tsx@@ -1,12 +1,12 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCheckboxCircleFill } from '@remixicon/react'import { useCountDown } from 'ahooks'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { validPassword } from '@/config'import { useRouter, useSearchParams } from '@/next/navigation'import { changeWebAppPasswordWithToken } from '@/service/common'diff --git a/web/app/(shareLayout)/webapp-signin/check-code/page.tsx b/web/app/(shareLayout)/webapp-signin/check-code/page.tsxindex b17fff4e524..c8d3351dede 100644--- a/web/app/(shareLayout)/webapp-signin/check-code/page.tsx+++ b/web/app/(shareLayout)/webapp-signin/check-code/page.tsx@@ -1,11 +1,11 @@'use client'import type { FormEvent } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowLeftLine, RiMailSendFill } from '@remixicon/react'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Countdown from '@/app/components/signin/countdown'import { useLocale } from '@/context/i18n'import { useWebAppStore } from '@/context/web-app-context'diff --git a/web/app/(shareLayout)/webapp-signin/components/external-member-sso-auth.tsx b/web/app/(shareLayout)/webapp-signin/components/external-member-sso-auth.tsxindex 9b4a369908a..fe6b157c1e5 100644--- a/web/app/(shareLayout)/webapp-signin/components/external-member-sso-auth.tsx+++ b/web/app/(shareLayout)/webapp-signin/components/external-member-sso-auth.tsx@@ -1,9 +1,9 @@'use client'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useEffect } from 'react'import AppUnavailable from '@/app/components/base/app-unavailable'import Loading from '@/app/components/base/loading'-import { toast } from '@/app/components/base/ui/toast'import { useGlobalPublicStore } from '@/context/global-public-context'import { useRouter, useSearchParams } from '@/next/navigation'import { fetchWebOAuth2SSOUrl, fetchWebOIDCSSOUrl, fetchWebSAMLSSOUrl } from '@/service/share'diff --git a/web/app/(shareLayout)/webapp-signin/components/mail-and-code-auth.tsx b/web/app/(shareLayout)/webapp-signin/components/mail-and-code-auth.tsxindex f600dba8b2a..2d2fde18085 100644--- a/web/app/(shareLayout)/webapp-signin/components/mail-and-code-auth.tsx+++ b/web/app/(shareLayout)/webapp-signin/components/mail-and-code-auth.tsx@@ -1,9 +1,9 @@+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { COUNT_DOWN_KEY, COUNT_DOWN_TIME_MS } from '@/app/components/signin/countdown'import { emailRegex } from '@/config'import { useLocale } from '@/context/i18n'diff --git a/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx b/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsxindex 7fe53639278..79607a77df6 100644--- a/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx+++ b/web/app/(shareLayout)/webapp-signin/components/mail-and-password-auth.tsx@@ -1,10 +1,10 @@'use client'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { emailRegex } from '@/config'import { useLocale } from '@/context/i18n'import { useWebAppStore } from '@/context/web-app-context'diff --git a/web/app/(shareLayout)/webapp-signin/components/sso-auth.tsx b/web/app/(shareLayout)/webapp-signin/components/sso-auth.tsxindex d8759cc1d60..53ff80ced5c 100644--- a/web/app/(shareLayout)/webapp-signin/components/sso-auth.tsx+++ b/web/app/(shareLayout)/webapp-signin/components/sso-auth.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import { Lock01 } from '@/app/components/base/icons/src/vender/solid/security'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useRouter, useSearchParams } from '@/next/navigation'import { fetchMembersOAuth2SSOUrl, fetchMembersOIDCSSOUrl, fetchMembersSAMLSSOUrl } from '@/service/share'import { SSOProtocol } from '@/types/feature'diff --git a/web/app/account/(commonLayout)/account-page/AvatarWithEdit.tsx b/web/app/account/(commonLayout)/account-page/AvatarWithEdit.tsxindex 05048008b43..429eece3833 100644--- a/web/app/account/(commonLayout)/account-page/AvatarWithEdit.tsx+++ b/web/app/account/(commonLayout)/account-page/AvatarWithEdit.tsx@@ -1,9 +1,13 @@'use client'+import type { AvatarProps } from '@langgenius/dify-ui/avatar'import type { Area } from 'react-easy-crop'import type { OnImageInput } from '@/app/components/base/app-icon-picker/ImageInput'-import type { AvatarProps } from '@/app/components/base/ui/avatar'import type { ImageFile } from '@/types/app'+import { Avatar } from '@langgenius/dify-ui/avatar'+import { Button } from '@langgenius/dify-ui/button'+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'+import { toast } from '@langgenius/dify-ui/toast'import { RiDeleteBin5Line, RiPencilLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useState } from 'react'@@ -12,10 +16,6 @@ import ImageInput from '@/app/components/base/app-icon-picker/ImageInput'import getCroppedImg from '@/app/components/base/app-icon-picker/utils'import Divider from '@/app/components/base/divider'import { useLocalFileUploader } from '@/app/components/base/image-uploader/hooks'-import { Avatar } from '@/app/components/base/ui/avatar'-import { Button } from '@/app/components/base/ui/button'-import { Dialog, DialogContent } from '@/app/components/base/ui/dialog'-import { toast } from '@/app/components/base/ui/toast'import { DISABLE_UPLOAD_IMAGE_AS_ICON } from '@/config'import { updateUserProfile } from '@/service/common'diff --git a/web/app/account/(commonLayout)/account-page/email-change-modal.tsx b/web/app/account/(commonLayout)/account-page/email-change-modal.tsxindex 1b91c801bd5..f3bb71c2d24 100644--- a/web/app/account/(commonLayout)/account-page/email-change-modal.tsx+++ b/web/app/account/(commonLayout)/account-page/email-change-modal.tsx@@ -1,12 +1,12 @@import type { ResponseError } from '@/service/fetch'+import { Button } from '@langgenius/dify-ui/button'+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useState } from 'react'import { Trans, useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { Dialog, DialogContent } from '@/app/components/base/ui/dialog'-import { toast } from '@/app/components/base/ui/toast'import { useRouter } from '@/next/navigation'import {checkEmailExisted,diff --git a/web/app/account/(commonLayout)/account-page/index.tsx b/web/app/account/(commonLayout)/account-page/index.tsxindex 8ad1b45467f..a26fa942db4 100644--- a/web/app/account/(commonLayout)/account-page/index.tsx+++ b/web/app/account/(commonLayout)/account-page/index.tsx@@ -1,6 +1,9 @@'use client'import type { IItem } from '@/app/components/header/account-setting/collapse'import type { App } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'+import { toast } from '@langgenius/dify-ui/toast'import {RiGraduationCapFill,} from '@remixicon/react'@@ -10,9 +13,6 @@ import { useTranslation } from 'react-i18next'import AppIcon from '@/app/components/base/app-icon'import Input from '@/app/components/base/input'import PremiumBadge from '@/app/components/base/premium-badge'-import { Button } from '@/app/components/base/ui/button'-import { Dialog, DialogContent } from '@/app/components/base/ui/dialog'-import { toast } from '@/app/components/base/ui/toast'import Collapse from '@/app/components/header/account-setting/collapse'import { IS_CE_EDITION, validPassword } from '@/config'import { useGlobalPublicStore } from '@/context/global-public-context'diff --git a/web/app/account/(commonLayout)/avatar.tsx b/web/app/account/(commonLayout)/avatar.tsxindex 538e09b0fd9..0893b130c45 100644--- a/web/app/account/(commonLayout)/avatar.tsx+++ b/web/app/account/(commonLayout)/avatar.tsx@@ -1,5 +1,6 @@'use client'import { Menu, MenuButton, MenuItem, MenuItems, Transition } from '@headlessui/react'+import { Avatar } from '@langgenius/dify-ui/avatar'import {RiGraduationCapFill,} from '@remixicon/react'@@ -8,7 +9,6 @@ import { useTranslation } from 'react-i18next'import { resetUser } from '@/app/components/base/amplitude/utils'import { LogOut01 } from '@/app/components/base/icons/src/vender/line/general'import PremiumBadge from '@/app/components/base/premium-badge'-import { Avatar } from '@/app/components/base/ui/avatar'import { useProviderContext } from '@/context/provider-context'import { useRouter } from '@/next/navigation'import { useLogout, useUserProfile } from '@/service/use-common'diff --git a/web/app/account/(commonLayout)/delete-account/components/check-email.tsx b/web/app/account/(commonLayout)/delete-account/components/check-email.tsxindex 3c7b7112f31..7e3351a10a2 100644--- a/web/app/account/(commonLayout)/delete-account/components/check-email.tsx+++ b/web/app/account/(commonLayout)/delete-account/components/check-email.tsx@@ -1,8 +1,8 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'import { useAppContext } from '@/context/app-context'import Link from '@/next/link'import { useSendDeleteAccountEmail } from '../state'diff --git a/web/app/account/(commonLayout)/delete-account/components/feed-back.tsx b/web/app/account/(commonLayout)/delete-account/components/feed-back.tsxindex 9690bf8ed15..ee1e72e6e72 100644--- a/web/app/account/(commonLayout)/delete-account/components/feed-back.tsx+++ b/web/app/account/(commonLayout)/delete-account/components/feed-back.tsx@@ -1,10 +1,10 @@'use client'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import CustomDialog from '@/app/components/base/dialog'import Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { useRouter } from '@/next/navigation'import { useLogout } from '@/service/use-common'diff --git a/web/app/account/(commonLayout)/delete-account/components/verify-email.tsx b/web/app/account/(commonLayout)/delete-account/components/verify-email.tsxindex 01e19e51b16..91c0d7737dd 100644--- a/web/app/account/(commonLayout)/delete-account/components/verify-email.tsx+++ b/web/app/account/(commonLayout)/delete-account/components/verify-email.tsx@@ -1,8 +1,8 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'import Countdown from '@/app/components/signin/countdown'import Link from '@/next/link'import { useAccountDeleteStore, useConfirmDeleteAccount, useSendDeleteAccountEmail } from '../state'diff --git a/web/app/account/(commonLayout)/header.tsx b/web/app/account/(commonLayout)/header.tsxindex 688a1d77290..f0912d45d52 100644--- a/web/app/account/(commonLayout)/header.tsx+++ b/web/app/account/(commonLayout)/header.tsx@@ -1,9 +1,9 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowRightUpLine, RiRobot2Line } from '@remixicon/react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import DifyLogo from '@/app/components/base/logo/dify-logo'-import { Button } from '@/app/components/base/ui/button'import { useGlobalPublicStore } from '@/context/global-public-context'import { useRouter } from '@/next/navigation'import Avatar from './avatar'diff --git a/web/app/account/oauth/authorize/page.tsx b/web/app/account/oauth/authorize/page.tsxindex f370efcd3e4..cd035ce16f3 100644--- a/web/app/account/oauth/authorize/page.tsx+++ b/web/app/account/oauth/authorize/page.tsx@@ -1,5 +1,8 @@'use client'+import { Avatar } from '@langgenius/dify-ui/avatar'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import {RiAccountCircleLine,RiGlobalLine,@@ -11,9 +14,6 @@ import * as React from 'react'import { useEffect, useRef } from 'react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { Avatar } from '@/app/components/base/ui/avatar'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'import { setPostLoginRedirect } from '@/app/signin/utils/post-login-redirect'import { useRouter, useSearchParams } from '@/next/navigation'diff --git a/web/app/activate/activateForm.tsx b/web/app/activate/activateForm.tsxindex 9b0a5f5b212..5fafa8eca1c 100644--- a/web/app/activate/activateForm.tsx+++ b/web/app/activate/activateForm.tsx@@ -1,9 +1,9 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useEffect } from 'react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'import useDocumentTitle from '@/hooks/use-document-title'import { useRouter, useSearchParams } from '@/next/navigation'diff --git a/web/app/components/app-sidebar/__tests__/app-sidebar-dropdown.spec.tsx b/web/app/components/app-sidebar/__tests__/app-sidebar-dropdown.spec.tsxindex 5e18bbc3439..5557118c784 100644--- a/web/app/components/app-sidebar/__tests__/app-sidebar-dropdown.spec.tsx+++ b/web/app/components/app-sidebar/__tests__/app-sidebar-dropdown.spec.tsx@@ -19,7 +19,7 @@ vi.mock('@/context/app-context', () => ({}),}))-vi.mock('@/app/components/base/ui/dropdown-menu', () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', () => {const DropdownMenuContext = React.createContext<{ isOpen: boolean, setOpen: (open: boolean) => void } | null>(null)const useDropdownMenuContext = () => {diff --git a/web/app/components/app-sidebar/__tests__/dataset-sidebar-dropdown.spec.tsx b/web/app/components/app-sidebar/__tests__/dataset-sidebar-dropdown.spec.tsxindex 5060987cda8..5c45df470a7 100644--- a/web/app/components/app-sidebar/__tests__/dataset-sidebar-dropdown.spec.tsx+++ b/web/app/components/app-sidebar/__tests__/dataset-sidebar-dropdown.spec.tsx@@ -21,7 +21,7 @@ vi.mock('@/hooks/use-knowledge', () => ({}),}))-vi.mock('@/app/components/base/ui/dropdown-menu', () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', () => {const DropdownMenuContext = React.createContext<{ isOpen: boolean, setOpen: (open: boolean) => void } | null>(null)const useDropdownMenuContext = () => {diff --git a/web/app/components/app-sidebar/app-info/__tests__/app-info-detail-panel.spec.tsx b/web/app/components/app-sidebar/app-info/__tests__/app-info-detail-panel.spec.tsxindex 21719742538..9af90359f0b 100644--- a/web/app/components/app-sidebar/app-info/__tests__/app-info-detail-panel.spec.tsx+++ b/web/app/components/app-sidebar/app-info/__tests__/app-info-detail-panel.spec.tsx@@ -35,7 +35,7 @@ vi.mock('@/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view',),}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick, className, size, variant }: {children: React.ReactNodeonClick?: () => voiddiff --git a/web/app/components/app-sidebar/app-info/__tests__/app-operations.spec.tsx b/web/app/components/app-sidebar/app-info/__tests__/app-operations.spec.tsxindex 461cedc20c6..ff6aed2c716 100644--- a/web/app/components/app-sidebar/app-info/__tests__/app-operations.spec.tsx+++ b/web/app/components/app-sidebar/app-info/__tests__/app-operations.spec.tsx@@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event'import * as React from 'react'import AppOperations from '../app-operations'-vi.mock('../../../base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick, className, size, variant, id, tabIndex, ...rest }: {'children': React.ReactNode'onClick'?: () => void@@ -30,7 +30,7 @@ vi.mock('../../../base/ui/button', () => ({),}))-vi.mock('../../../base/ui/dropdown-menu', () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', () => {const DropdownMenuContext = React.createContext<{ isOpen: boolean, setOpen: (open: boolean) => void } | null>(null)const useDropdownMenuContext = () => {diff --git a/web/app/components/app-sidebar/app-info/__tests__/use-app-info-actions.spec.ts b/web/app/components/app-sidebar/app-info/__tests__/use-app-info-actions.spec.tsindex 5b10b4c32b1..23e5e519491 100644--- a/web/app/components/app-sidebar/app-info/__tests__/use-app-info-actions.spec.ts+++ b/web/app/components/app-sidebar/app-info/__tests__/use-app-info-actions.spec.ts@@ -50,7 +50,7 @@ vi.mock('@/app/components/app/store', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.api, {success: vi.fn((message, options) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message, options) => toastMocks.call({ type: 'error', message, ...options })),diff --git a/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx b/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsxindex 624630b1792..9afa0063dc4 100644--- a/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx+++ b/web/app/components/app-sidebar/app-info/app-info-detail-panel.tsx@@ -1,6 +1,7 @@import type { Operation } from './app-operations'import type { AppInfoModalType } from './use-app-info-actions'import type { App, AppSSO } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import {RiDeleteBinLine,RiEditLine,@@ -14,7 +15,6 @@ import { useMemo } from 'react'import { useTranslation } from 'react-i18next'import CardView from '@/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view'import ContentDialog from '@/app/components/base/content-dialog'-import { Button } from '@/app/components/base/ui/button'import { AppModeEnum } from '@/types/app'import AppIcon from '../../base/app-icon'import { getAppModeLabel } from './app-mode-labels'diff --git a/web/app/components/app-sidebar/app-info/app-info-modals.tsx b/web/app/components/app-sidebar/app-info/app-info-modals.tsxindex fa84ecc0b60..7d142e0cc66 100644--- a/web/app/components/app-sidebar/app-info/app-info-modals.tsx+++ b/web/app/components/app-sidebar/app-info/app-info-modals.tsx@@ -3,10 +3,6 @@ import type { DuplicateAppModalProps } from '@/app/components/app/duplicate-modaimport type { CreateAppModalProps } from '@/app/components/explore/create-app-modal'import type { EnvironmentVariable } from '@/app/components/workflow/types'import type { App, AppSSO } from '@/types/app'-import * as React from 'react'-import { useState } from 'react'-import { useTranslation } from 'react-i18next'-import Input from '@/app/components/base/input'import {AlertDialog,AlertDialogActions,@@ -15,7 +11,11 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import * as React from 'react'+import { useState } from 'react'+import { useTranslation } from 'react-i18next'+import Input from '@/app/components/base/input'import dynamic from '@/next/dynamic'const SwitchAppModal = dynamic(() => import('@/app/components/app/switch-app-modal'), { ssr: false })diff --git a/web/app/components/app-sidebar/app-info/app-operations.tsx b/web/app/components/app-sidebar/app-info/app-operations.tsxindex 095fb312061..cc6afd739c7 100644--- a/web/app/components/app-sidebar/app-info/app-operations.tsx+++ b/web/app/components/app-sidebar/app-info/app-operations.tsx@@ -1,15 +1,15 @@import type { JSX } from 'react'-import { RiMoreLine } from '@remixicon/react'-import { cloneElement, useEffect, useMemo, useRef, useState } from 'react'-import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,-} from '../../base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { RiMoreLine } from '@remixicon/react'+import { cloneElement, useEffect, useMemo, useRef, useState } from 'react'+import { useTranslation } from 'react-i18next'export type Operation = {id: stringdiff --git a/web/app/components/app-sidebar/app-info/use-app-info-actions.ts b/web/app/components/app-sidebar/app-info/use-app-info-actions.tsindex 3192d48f81e..5ca0e85c189 100644--- a/web/app/components/app-sidebar/app-info/use-app-info-actions.ts+++ b/web/app/components/app-sidebar/app-info/use-app-info-actions.ts@@ -1,10 +1,10 @@import type { DuplicateAppModalProps } from '@/app/components/app/duplicate-modal'import type { CreateAppModalProps } from '@/app/components/explore/create-app-modal'import type { EnvironmentVariable } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import { useStore as useAppStore } from '@/app/components/app/store'-import { toast } from '@/app/components/base/ui/toast'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'import { useProviderContext } from '@/context/provider-context'import { useRouter } from '@/next/navigation'diff --git a/web/app/components/app-sidebar/app-sidebar-dropdown.tsx b/web/app/components/app-sidebar/app-sidebar-dropdown.tsxindex 617d14f4266..0b5f13d9188 100644--- a/web/app/components/app-sidebar/app-sidebar-dropdown.tsx+++ b/web/app/components/app-sidebar/app-sidebar-dropdown.tsx@@ -1,5 +1,10 @@import type { NavIcon } from './nav-link'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import {RiEqualizer2Line,RiMenuLine,@@ -8,11 +13,6 @@ import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { useStore as useAppStore } from '@/app/components/app/store'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import { useAppContext } from '@/context/app-context'import AppIcon from '../base/app-icon'import Divider from '../base/divider'diff --git a/web/app/components/app-sidebar/dataset-info/__tests__/dropdown-callbacks.spec.tsx b/web/app/components/app-sidebar/dataset-info/__tests__/dropdown-callbacks.spec.tsxindex b514b6e095d..ceb8302ee60 100644--- a/web/app/components/app-sidebar/dataset-info/__tests__/dropdown-callbacks.spec.tsx+++ b/web/app/components/app-sidebar/dataset-info/__tests__/dropdown-callbacks.spec.tsx@@ -112,7 +112,7 @@ vi.mock('@/service/datasets', () => ({deleteDataset: (...args: unknown[]) => mockDeleteDataset(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: (...args: unknown[]) => mockToast(...args),}))diff --git a/web/app/components/app-sidebar/dataset-info/dropdown.tsx b/web/app/components/app-sidebar/dataset-info/dropdown.tsxindex e69b3d7e324..8f3a25738a5 100644--- a/web/app/components/app-sidebar/dataset-info/dropdown.tsx+++ b/web/app/components/app-sidebar/dataset-info/dropdown.tsx@@ -1,9 +1,23 @@import type { DataSet } from '@/models/datasets'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useSelector as useAppContextWithSelector } from '@/context/app-context'import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'import { useRouter } from '@/next/navigation'@@ -13,20 +27,6 @@ import { useInvalid } from '@/service/use-base'import { useExportPipelineDSL } from '@/service/use-pipeline'import { downloadBlob } from '@/utils/download'import ActionButton from '../../base/action-button'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '../../base/ui/alert-dialog'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuTrigger,-} from '../../base/ui/dropdown-menu'import RenameDatasetModal from '../../datasets/rename-modal'import Menu from './menu'diff --git a/web/app/components/app-sidebar/dataset-sidebar-dropdown.tsx b/web/app/components/app-sidebar/dataset-sidebar-dropdown.tsxindex 3968a0df6fa..805636fb559 100644--- a/web/app/components/app-sidebar/dataset-sidebar-dropdown.tsx+++ b/web/app/components/app-sidebar/dataset-sidebar-dropdown.tsx@@ -1,17 +1,17 @@import type { NavIcon } from './nav-link'import type { DataSet } from '@/models/datasets'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import {RiMenuLine,} from '@remixicon/react'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'import { useKnowledge } from '@/hooks/use-knowledge'import { DOC_FORM_TEXT } from '@/models/datasets'diff --git a/web/app/components/app-sidebar/toggle-button.tsx b/web/app/components/app-sidebar/toggle-button.tsxindex 5800ff2263f..6aca77fb4f4 100644--- a/web/app/components/app-sidebar/toggle-button.tsx+++ b/web/app/components/app-sidebar/toggle-button.tsx@@ -1,8 +1,8 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowLeftSLine, RiArrowRightSLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import Tooltip from '../base/tooltip'import ShortcutsName from '../workflow/shortcuts-name'diff --git a/web/app/components/app/annotation/__tests__/index.spec.tsx b/web/app/components/app/annotation/__tests__/index.spec.tsxindex cd9b127c7f7..2bd94d03b05 100644--- a/web/app/components/app/annotation/__tests__/index.spec.tsx+++ b/web/app/components/app/annotation/__tests__/index.spec.tsx@@ -2,9 +2,9 @@import type { Mock } from 'vitest'import type { AnnotationItem } from '../type'import type { App } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'import * as React from 'react'-import { toast } from '@/app/components/base/ui/toast'import { useProviderContext } from '@/context/provider-context'import {addAnnotation,diff --git a/web/app/components/app/annotation/add-annotation-modal/__tests__/index.spec.tsx b/web/app/components/app/annotation/add-annotation-modal/__tests__/index.spec.tsxindex d7e46f9f925..497c623f3ef 100644--- a/web/app/components/app/annotation/add-annotation-modal/__tests__/index.spec.tsx+++ b/web/app/components/app/annotation/add-annotation-modal/__tests__/index.spec.tsx@@ -9,7 +9,7 @@ vi.mock('@/context/provider-context', () => ({}))const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: vi.fn(args => mockToastNotify(args)),},diff --git a/web/app/components/app/annotation/add-annotation-modal/index.tsx b/web/app/components/app/annotation/add-annotation-modal/index.tsxindex dbdf909c0a1..ba987a8a8a6 100644--- a/web/app/components/app/annotation/add-annotation-modal/index.tsx+++ b/web/app/components/app/annotation/add-annotation-modal/index.tsx@@ -1,13 +1,13 @@'use client'import type { FC } from 'react'import type { AnnotationItemBasic } from '../type'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'import Drawer from '@/app/components/base/drawer-plus'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import AnnotationFull from '@/app/components/billing/annotation-full'import { useProviderContext } from '@/context/provider-context'import EditItem, { EditItemType } from './edit-item'diff --git a/web/app/components/app/annotation/batch-action.tsx b/web/app/components/app/annotation/batch-action.tsxindex da7d0c70dd2..938dcb03bd9 100644--- a/web/app/components/app/annotation/batch-action.tsx+++ b/web/app/components/app/annotation/batch-action.tsx@@ -1,10 +1,4 @@import type { FC } from 'react'-import { cn } from '@langgenius/dify-ui/cn'-import { RiDeleteBinLine } from '@remixicon/react'-import { useBoolean } from 'ahooks'-import * as React from 'react'-import { useTranslation } from 'react-i18next'-import Divider from '@/app/components/base/divider'import {AlertDialog,AlertDialogActions,@@ -12,7 +6,13 @@ import {AlertDialogConfirmButton,AlertDialogContent,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import { cn } from '@langgenius/dify-ui/cn'+import { RiDeleteBinLine } from '@remixicon/react'+import { useBoolean } from 'ahooks'+import * as React from 'react'+import { useTranslation } from 'react-i18next'+import Divider from '@/app/components/base/divider'const i18nPrefix = 'batchAction'diff --git a/web/app/components/app/annotation/batch-add-annotation-modal/__tests__/csv-uploader.spec.tsx b/web/app/components/app/annotation/batch-add-annotation-modal/__tests__/csv-uploader.spec.tsxindex d26ab051ef8..5fc1cd25e16 100644--- a/web/app/components/app/annotation/batch-add-annotation-modal/__tests__/csv-uploader.spec.tsx+++ b/web/app/components/app/annotation/batch-add-annotation-modal/__tests__/csv-uploader.spec.tsx@@ -10,7 +10,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string, options?: Record<string, unknown>) => toastMocks.notify({ type: 'success', message, ...options }),error: (message: string, options?: Record<string, unknown>) => toastMocks.notify({ type: 'error', message, ...options }),diff --git a/web/app/components/app/annotation/batch-add-annotation-modal/__tests__/index.spec.tsx b/web/app/components/app/annotation/batch-add-annotation-modal/__tests__/index.spec.tsxindex 3176b1addb9..c5d7232e127 100644--- a/web/app/components/app/annotation/batch-add-annotation-modal/__tests__/index.spec.tsx+++ b/web/app/components/app/annotation/batch-add-annotation-modal/__tests__/index.spec.tsx@@ -43,7 +43,7 @@ vi.mock('@/app/components/billing/annotation-full', () => ({}))const mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => mockNotify(args),},diff --git a/web/app/components/app/annotation/batch-add-annotation-modal/csv-uploader.tsx b/web/app/components/app/annotation/batch-add-annotation-modal/csv-uploader.tsxindex 02dcf27aea6..dc63b5c9bee 100644--- a/web/app/components/app/annotation/batch-add-annotation-modal/csv-uploader.tsx+++ b/web/app/components/app/annotation/batch-add-annotation-modal/csv-uploader.tsx@@ -1,13 +1,13 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiDeleteBinLine } from '@remixicon/react'import * as React from 'react'import { useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { Csv as CSVIcon } from '@/app/components/base/icons/src/public/files'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'export type Props = {file: File | undefineddiff --git a/web/app/components/app/annotation/batch-add-annotation-modal/index.tsx b/web/app/components/app/annotation/batch-add-annotation-modal/index.tsxindex 20a35714e8a..550794cce78 100644--- a/web/app/components/app/annotation/batch-add-annotation-modal/index.tsx+++ b/web/app/components/app/annotation/batch-add-annotation-modal/index.tsx@@ -1,13 +1,13 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import AnnotationFull from '@/app/components/billing/annotation-full'import { useProviderContext } from '@/context/provider-context'import { annotationBatchImport, checkAnnotationBatchImportProgress } from '@/service/annotation'diff --git a/web/app/components/app/annotation/clear-all-annotations-confirm-modal/index.tsx b/web/app/components/app/annotation/clear-all-annotations-confirm-modal/index.tsxindex b960e1d59c6..6b0ef19e7b5 100644--- a/web/app/components/app/annotation/clear-all-annotations-confirm-modal/index.tsx+++ b/web/app/components/app/annotation/clear-all-annotations-confirm-modal/index.tsx@@ -1,8 +1,6 @@'use client'import type { FC } from 'react'-import * as React from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -10,7 +8,9 @@ import {AlertDialogConfirmButton,AlertDialogContent,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import * as React from 'react'+import { useTranslation } from 'react-i18next'type Props = {isShow: booleandiff --git a/web/app/components/app/annotation/edit-annotation-modal/__tests__/index.spec.tsx b/web/app/components/app/annotation/edit-annotation-modal/__tests__/index.spec.tsxindex 4844017dde1..733529dff82 100644--- a/web/app/components/app/annotation/edit-annotation-modal/__tests__/index.spec.tsx+++ b/web/app/components/app/annotation/edit-annotation-modal/__tests__/index.spec.tsx@@ -1,6 +1,6 @@+import { toast } from '@langgenius/dify-ui/toast'import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { toast } from '@/app/components/base/ui/toast'import EditAnnotationModal from '../index'const { mockAddAnnotation, mockEditAnnotation } = vi.hoisted(() => ({diff --git a/web/app/components/app/annotation/edit-annotation-modal/edit-item/index.tsx b/web/app/components/app/annotation/edit-annotation-modal/edit-item/index.tsxindex 4a62569816f..609d7847bc2 100644--- a/web/app/components/app/annotation/edit-annotation-modal/edit-item/index.tsx+++ b/web/app/components/app/annotation/edit-annotation-modal/edit-item/index.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiDeleteBinLine, RiEditFill, RiEditLine } from '@remixicon/react'import * as React from 'react'@@ -7,7 +8,6 @@ import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import { Robot, User } from '@/app/components/base/icons/src/public/avatar'import Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'export enum EditItemType {Query = 'query',diff --git a/web/app/components/app/annotation/edit-annotation-modal/index.tsx b/web/app/components/app/annotation/edit-annotation-modal/index.tsxindex c3d5b140ebb..8e690eca9be 100644--- a/web/app/components/app/annotation/edit-annotation-modal/index.tsx+++ b/web/app/components/app/annotation/edit-annotation-modal/index.tsx@@ -1,10 +1,5 @@'use client'import type { FC } from 'react'-import * as React from 'react'-import { useState } from 'react'-import { useTranslation } from 'react-i18next'-import Drawer from '@/app/components/base/drawer-plus'-import { MessageCheckRemove } from '@/app/components/base/icons/src/vender/line/communication'import {AlertDialog,AlertDialogActions,@@ -12,8 +7,13 @@ import {AlertDialogConfirmButton,AlertDialogContent,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/alert-dialog'+import { toast } from '@langgenius/dify-ui/toast'+import * as React from 'react'+import { useState } from 'react'+import { useTranslation } from 'react-i18next'+import Drawer from '@/app/components/base/drawer-plus'+import { MessageCheckRemove } from '@/app/components/base/icons/src/vender/line/communication'import AnnotationFull from '@/app/components/billing/annotation-full'import { useProviderContext } from '@/context/provider-context'import useTimestamp from '@/hooks/use-timestamp'diff --git a/web/app/components/app/annotation/header-opts/index.tsx b/web/app/components/app/annotation/header-opts/index.tsxindex 0871a722f89..fc27524c713 100644--- a/web/app/components/app/annotation/header-opts/index.tsx+++ b/web/app/components/app/annotation/header-opts/index.tsx@@ -2,19 +2,19 @@import type { FC } from 'react'import type { AnnotationItemBasic } from '../type'import { Menu, MenuButton, MenuItems, Transition } from '@headlessui/react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import * as React from 'react'import { Fragment, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import {useCSVDownloader,} from 'react-papaparse'-import { Button } from '@/app/components/base/ui/button'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import { useLocale } from '@/context/i18n'import { LanguagesSupported } from '@/i18n-config/language'diff --git a/web/app/components/app/annotation/index.tsx b/web/app/components/app/annotation/index.tsxindex 419aaba25db..cbad5b40ea3 100644--- a/web/app/components/app/annotation/index.tsx+++ b/web/app/components/app/annotation/index.tsx@@ -5,6 +5,8 @@ import type { AnnotationItem, AnnotationItemBasic } from './type'import type { AnnotationReplyConfig } from '@/models/debug'import type { App } from '@/types/app'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'import { RiEqualizer2Line } from '@remixicon/react'import { useDebounce } from 'ahooks'import * as React from 'react'@@ -15,8 +17,6 @@ import ConfigParamModal from '@/app/components/base/features/new-feature-panel/aimport { MessageFast } from '@/app/components/base/icons/src/vender/solid/communication'import Loading from '@/app/components/base/loading'import Pagination from '@/app/components/base/pagination'-import Switch from '@/app/components/base/switch'-import { toast } from '@/app/components/base/ui/toast'import AnnotationFullModal from '@/app/components/billing/annotation-full/modal'import { APP_PAGE_LIMIT } from '@/config'import { useProviderContext } from '@/context/provider-context'diff --git a/web/app/components/app/annotation/remove-annotation-confirm-modal/index.tsx b/web/app/components/app/annotation/remove-annotation-confirm-modal/index.tsxindex 70e28b048c6..864e098ca5c 100644--- a/web/app/components/app/annotation/remove-annotation-confirm-modal/index.tsx+++ b/web/app/components/app/annotation/remove-annotation-confirm-modal/index.tsx@@ -1,7 +1,5 @@'use client'import type { FC } from 'react'-import * as React from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -9,7 +7,9 @@ import {AlertDialogConfirmButton,AlertDialogContent,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import * as React from 'react'+import { useTranslation } from 'react-i18next'type Props = {isShow: booleandiff --git a/web/app/components/app/annotation/view-annotation-modal/index.tsx b/web/app/components/app/annotation/view-annotation-modal/index.tsxindex 8a5b53aa87a..c9f7e8a78ff 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,14 @@'use client'import type { FC } from 'react'import type { AnnotationItem, HitHistoryItem } from '../type'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useEffect, useState } from 'react'@@ -10,14 +18,6 @@ import Drawer from '@/app/components/base/drawer-plus'import { MessageCheckRemove } from '@/app/components/base/icons/src/vender/line/communication'import Pagination from '@/app/components/base/pagination'import TabSlider from '@/app/components/base/tab-slider-plain'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'import { APP_PAGE_LIMIT } from '@/config'import useTimestamp from '@/hooks/use-timestamp'import { fetchHitHistoryList } from '@/service/annotation'diff --git a/web/app/components/app/app-access-control/__tests__/access-control.spec.tsx b/web/app/components/app/app-access-control/__tests__/access-control.spec.tsxindex 86ed6ac435a..bbac21942e3 100644--- a/web/app/components/app/app-access-control/__tests__/access-control.spec.tsx+++ b/web/app/components/app/app-access-control/__tests__/access-control.spec.tsx@@ -1,9 +1,9 @@/* eslint-disable ts/no-explicit-any */import type { AccessControlAccount, AccessControlGroup, Subject } from '@/models/access-control'import type { App } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { toast } from '@/app/components/base/ui/toast'import useAccessControlStore from '@/context/access-control-store'import { AccessMode, SubjectType } from '@/models/access-control'import AccessControlDialog from '../access-control-dialog'diff --git a/web/app/components/app/app-access-control/__tests__/index.spec.tsx b/web/app/components/app/app-access-control/__tests__/index.spec.tsxindex 612d17d88ae..05b86f0290d 100644--- a/web/app/components/app/app-access-control/__tests__/index.spec.tsx+++ b/web/app/components/app/app-access-control/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import type { App } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import { toast } from '@/app/components/base/ui/toast'import useAccessControlStore from '@/context/access-control-store'import { AccessMode } from '@/models/access-control'import AccessControl from '../index'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.tsxindex 8c8087cf17b..38f9c2ab50d 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,14 +1,14 @@'use client'import type { AccessControlAccount, AccessControlGroup, Subject, SubjectAccount, SubjectGroup } from '@/models/access-control'import { FloatingOverlay } from '@floating-ui/react'+import { Avatar } from '@langgenius/dify-ui/avatar'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import { RiAddCircleFill, RiArrowRightSLine, RiOrganizationChart } from '@remixicon/react'import { useDebounce } from 'ahooks'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Avatar } from '@/app/components/base/ui/avatar'-import { Button } from '@/app/components/base/ui/button'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import { useSelector } from '@/context/app-context'import { SubjectType } from '@/models/access-control'import { useSearchForWhiteListCandidates } from '@/service/access-control'diff --git a/web/app/components/app/app-access-control/index.tsx b/web/app/components/app/app-access-control/index.tsxindex aeaae3d46d3..2997d4b4cf8 100644--- a/web/app/components/app/app-access-control/index.tsx+++ b/web/app/components/app/app-access-control/index.tsx@@ -2,11 +2,11 @@import type { Subject } from '@/models/access-control'import type { App } from '@/types/app'import { Description as DialogDescription, DialogTitle } from '@headlessui/react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiBuildingLine, RiGlobalLine, RiVerifiedBadgeLine } from '@remixicon/react'import { useCallback, useEffect } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useGlobalPublicStore } from '@/context/global-public-context'import { AccessMode, SubjectType } from '@/models/access-control'import { useUpdateAccessMode } from '@/service/access-control'diff --git a/web/app/components/app/app-access-control/specific-groups-or-members.tsx b/web/app/components/app/app-access-control/specific-groups-or-members.tsxindex 5b5c8342fc9..1caabb3ff9d 100644--- a/web/app/components/app/app-access-control/specific-groups-or-members.tsx+++ b/web/app/components/app/app-access-control/specific-groups-or-members.tsx@@ -1,9 +1,9 @@'use client'import type { AccessControlAccount, AccessControlGroup } from '@/models/access-control'+import { Avatar } from '@langgenius/dify-ui/avatar'import { RiAlertFill, RiCloseCircleFill, RiLockLine, RiOrganizationChart } from '@remixicon/react'import { useCallback, useEffect } from 'react'import { useTranslation } from 'react-i18next'-import { Avatar } from '@/app/components/base/ui/avatar'import { AccessMode } from '@/models/access-control'import { useAppWhiteListSubjects } from '@/service/access-control'import useAccessControlStore from '../../../../context/access-control-store'diff --git a/web/app/components/app/app-publisher/__tests__/index.spec.tsx b/web/app/components/app/app-publisher/__tests__/index.spec.tsxindex bba2f53afcf..06d91e9400c 100644--- a/web/app/components/app/app-publisher/__tests__/index.spec.tsx+++ b/web/app/components/app/app-publisher/__tests__/index.spec.tsx@@ -93,7 +93,7 @@ vi.mock('@/service/use-workflow', () => ({useInvalidateAppWorkflow: () => mockInvalidateAppWorkflow,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => mockToastError(...args),},diff --git a/web/app/components/app/app-publisher/__tests__/publish-with-multiple-model.spec.tsx b/web/app/components/app/app-publisher/__tests__/publish-with-multiple-model.spec.tsxindex 465252c6c4b..16628d742af 100644--- a/web/app/components/app/app-publisher/__tests__/publish-with-multiple-model.spec.tsx+++ b/web/app/components/app/app-publisher/__tests__/publish-with-multiple-model.spec.tsx@@ -22,7 +22,7 @@ vi.mock('../../header/account-setting/model-provider-page/model-icon', () => ({default: ({ modelName }: { modelName: string }) => <span data-testid="model-icon">{modelName}</span>,}))-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const ReactModule = await vi.importActual<typeof import('react')>('react')const OpenContext = ReactModule.createContext<{ open: boolean, setOpen: (nextOpen: boolean) => void } | null>(null)diff --git a/web/app/components/app/app-publisher/__tests__/version-info-modal.spec.tsx b/web/app/components/app/app-publisher/__tests__/version-info-modal.spec.tsxindex ed86bb85717..4a461bd942c 100644--- a/web/app/components/app/app-publisher/__tests__/version-info-modal.spec.tsx+++ b/web/app/components/app/app-publisher/__tests__/version-info-modal.spec.tsx@@ -1,6 +1,6 @@/* eslint-disable ts/no-explicit-any */+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'-import { toast } from '@/app/components/base/ui/toast'import VersionInfoModal from '../version-info-modal'vi.mock('react-i18next', () => ({@@ -9,7 +9,7 @@ vi.mock('react-i18next', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: vi.fn(),},diff --git a/web/app/components/app/app-publisher/features-wrapper.tsx b/web/app/components/app/app-publisher/features-wrapper.tsxindex 7c39535701b..8679b2830dc 100644--- a/web/app/components/app/app-publisher/features-wrapper.tsx+++ b/web/app/components/app/app-publisher/features-wrapper.tsx@@ -2,13 +2,6 @@ import type { AppPublisherProps } from '@/app/components/app/app-publisher'import type { ModelAndParameter } from '@/app/components/app/configuration/debug/types'import type { FileUpload } from '@/app/components/base/features/types'import type { PublishWorkflowParams } from '@/types/workflow'-import { produce } from 'immer'-import * as React from 'react'-import { useCallback, useState } from 'react'-import { useTranslation } from 'react-i18next'-import AppPublisher from '@/app/components/app/app-publisher'-import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hooks'-import { FILE_EXTS } from '@/app/components/base/prompt-editor/constants'import {AlertDialog,AlertDialogActions,@@ -17,7 +10,14 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import { produce } from 'immer'+import * as React from 'react'+import { useCallback, useState } from 'react'+import { useTranslation } from 'react-i18next'+import AppPublisher from '@/app/components/app/app-publisher'+import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hooks'+import { FILE_EXTS } from '@/app/components/base/prompt-editor/constants'import { SupportUploadFileTypes } from '@/app/components/workflow/types'import { Resolution } from '@/types/app'diff --git a/web/app/components/app/app-publisher/index.tsx b/web/app/components/app/app-publisher/index.tsxindex ce3698dbb7a..562f2d77595 100644--- a/web/app/components/app/app-publisher/index.tsx+++ b/web/app/components/app/app-publisher/index.tsx@@ -2,6 +2,9 @@ import type { ModelAndParameter } from '../configuration/debug/types'import type { CollaborationUpdate } from '@/app/components/workflow/collaboration/types/collaboration'import type { InputVar, Variable } from '@/app/components/workflow/types'import type { PublishWorkflowParams } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'+import { toast } from '@langgenius/dify-ui/toast'import { useKeyPress } from 'ahooks'import {memo,@@ -15,8 +18,6 @@ import { useTranslation } from 'react-i18next'import EmbeddedModal from '@/app/components/app/overview/embedded'import { useStore as useAppStore } from '@/app/components/app/store'import { trackEvent } from '@/app/components/base/amplitude'-import { Button } from '@/app/components/base/ui/button'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import { collaborationManager } from '@/app/components/workflow/collaboration/core/collaboration-manager'import { webSocketClient } from '@/app/components/workflow/collaboration/core/websocket-manager'import { WorkflowContext } from '@/app/components/workflow/context'@@ -31,7 +32,6 @@ import { useInvalidateAppWorkflow } from '@/service/use-workflow'import { fetchPublishedWorkflow } from '@/service/workflow'import { AppModeEnum } from '@/types/app'import { basePath } from '@/utils/var'-import { toast } from '../../base/ui/toast'import { getKeyboardKeyCodeBySystem } from '../../workflow/utils'import AccessControl from '../app-access-control'import {diff --git a/web/app/components/app/app-publisher/publish-with-multiple-model.tsx b/web/app/components/app/app-publisher/publish-with-multiple-model.tsxindex fbff3715777..038b9328bb9 100644--- a/web/app/components/app/app-publisher/publish-with-multiple-model.tsx+++ b/web/app/components/app/app-publisher/publish-with-multiple-model.tsx@@ -1,16 +1,16 @@import type { FC } from 'react'import type { ModelAndParameter } from '../configuration/debug/types'import type { Model, ModelItem } from '@/app/components/header/account-setting/model-provider-page/declarations'-import { RiArrowDownSLine } from '@remixicon/react'-import { useState } from 'react'-import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { RiArrowDownSLine } from '@remixicon/react'+import { useState } from 'react'+import { useTranslation } from 'react-i18next'import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'import { useProviderContext } from '@/context/provider-context'import ModelIcon from '../../header/account-setting/model-provider-page/model-icon'diff --git a/web/app/components/app/app-publisher/sections.tsx b/web/app/components/app/app-publisher/sections.tsxindex d4864a3763e..57522095aee 100644--- a/web/app/components/app/app-publisher/sections.tsx+++ b/web/app/components/app/app-publisher/sections.tsx@@ -2,16 +2,16 @@ import type { CSSProperties, ReactNode } from 'react'import type { ModelAndParameter } from '../configuration/debug/types'import type { AppPublisherProps } from './index'import type { PublishWorkflowParams } from '@/types/workflow'-import { useTranslation } from 'react-i18next'-import Divider from '@/app/components/base/divider'-import { CodeBrowser } from '@/app/components/base/icons/src/vender/line/development'-import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import {Tooltip,TooltipContent,TooltipTrigger,-} from '@/app/components/base/ui/tooltip'+} from '@langgenius/dify-ui/tooltip'+import { useTranslation } from 'react-i18next'+import Divider from '@/app/components/base/divider'+import { CodeBrowser } from '@/app/components/base/icons/src/vender/line/development'+import Loading from '@/app/components/base/loading'import UpgradeBtn from '@/app/components/billing/upgrade-btn'import WorkflowToolConfigureButton from '@/app/components/tools/workflow-tool/configure-button'import { appDefaultIconBackground } from '@/config'diff --git a/web/app/components/app/app-publisher/version-info-modal.tsx b/web/app/components/app/app-publisher/version-info-modal.tsxindex d5f4c9c189a..3fe4c61fb79 100644--- a/web/app/components/app/app-publisher/version-info-modal.tsx+++ b/web/app/components/app/app-publisher/version-info-modal.tsx@@ -1,12 +1,12 @@import type { FC } from 'react'import type { VersionHistory } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Input from '../../base/input'import Textarea from '../../base/textarea'diff --git a/web/app/components/app/configuration/base/warning-mask/cannot-query-dataset.tsx b/web/app/components/app/configuration/base/warning-mask/cannot-query-dataset.tsxindex 029743dfb61..51b365f4462 100644--- a/web/app/components/app/configuration/base/warning-mask/cannot-query-dataset.tsx+++ b/web/app/components/app/configuration/base/warning-mask/cannot-query-dataset.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import WarningMask from '.'type IFormattingChangedProps = {diff --git a/web/app/components/app/configuration/base/warning-mask/formatting-changed.tsx b/web/app/components/app/configuration/base/warning-mask/formatting-changed.tsxindex 4b25b023b26..07467a5ab16 100644--- a/web/app/components/app/configuration/base/warning-mask/formatting-changed.tsx+++ b/web/app/components/app/configuration/base/warning-mask/formatting-changed.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import WarningMask from '.'type IFormattingChangedProps = {diff --git a/web/app/components/app/configuration/config-prompt/__tests__/advanced-prompt-input.spec.tsx b/web/app/components/app/configuration/config-prompt/__tests__/advanced-prompt-input.spec.tsxindex f7cfff94fb3..ced1ddcfe36 100644--- a/web/app/components/app/configuration/config-prompt/__tests__/advanced-prompt-input.spec.tsx+++ b/web/app/components/app/configuration/config-prompt/__tests__/advanced-prompt-input.spec.tsx@@ -59,7 +59,7 @@ vi.mock('@/context/modal-context', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => mockToastError(...args),},diff --git a/web/app/components/app/configuration/config-prompt/__tests__/simple-prompt-input.spec.tsx b/web/app/components/app/configuration/config-prompt/__tests__/simple-prompt-input.spec.tsxindex 0f8b9b032fb..b4e6e0be2fe 100644--- a/web/app/components/app/configuration/config-prompt/__tests__/simple-prompt-input.spec.tsx+++ b/web/app/components/app/configuration/config-prompt/__tests__/simple-prompt-input.spec.tsx@@ -57,7 +57,7 @@ vi.mock('@/context/modal-context', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => mockToastError(...args),},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.tsxindex 1de6e6ce0c4..5fd394ad45c 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,7 +2,14 @@import type { FC } from 'react'import type { ExternalDataTool } from '@/models/common'import type { PromptRole, PromptVariable } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'+import {+ Tooltip,+ TooltipContent,+ TooltipTrigger,+} from '@langgenius/dify-ui/tooltip'import {RiDeleteBinLine,RiErrorWarningFill,@@ -20,13 +27,6 @@ import {} from '@/app/components/base/icons/src/vender/line/files'import PromptEditor from '@/app/components/base/prompt-editor'import { INSERT_VARIABLE_VALUE_BLOCK_COMMAND } from '@/app/components/base/prompt-editor/plugins/variable-block'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'-import {- Tooltip,- TooltipContent,- TooltipTrigger,-} from '@/app/components/base/ui/tooltip'import ConfigContext from '@/context/debug-configuration'import { useEventEmitterContextContext } from '@/context/event-emitter'import { useModalContext } from '@/context/modal-context'diff --git a/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx b/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsxindex 03755df0181..8846530af27 100644--- a/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx+++ b/web/app/components/app/configuration/config-prompt/confirm-add-var/index.tsx@@ -1,9 +1,9 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useRef } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import VarHighlight from '../../base/var-highlight'type IConfirmAddVarProps = {diff --git a/web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.tsx b/web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.tsxindex 477e1db4a0c..7906a5f8da5 100644--- a/web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.tsx+++ b/web/app/components/app/configuration/config-prompt/conversation-history/edit-modal.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'import type { ConversationHistoriesRole } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'type Props = {isShow: booleandiff --git a/web/app/components/app/configuration/config-prompt/index.tsx b/web/app/components/app/configuration/config-prompt/index.tsxindex 8a77d4bb58c..20463da174e 100644--- a/web/app/components/app/configuration/config-prompt/index.tsx+++ b/web/app/components/app/configuration/config-prompt/index.tsx@@ -2,6 +2,7 @@import type { FC } from 'react'import type { PromptItem, PromptVariable } from '@/models/debug'import type { AppModeEnum } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import {RiAddLine,} from '@remixicon/react'@@ -10,7 +11,6 @@ import * as React from 'react'import { useTranslation } from 'react-i18next'import { useContext } from 'use-context-selector'import AdvancedMessageInput from '@/app/components/app/configuration/config-prompt/advanced-prompt-input'-import { Button } from '@/app/components/base/ui/button'import { MAX_PROMPT_MESSAGE_LENGTH } from '@/config'import ConfigContext from '@/context/debug-configuration'import { PromptRole } from '@/models/debug'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.tsxindex 6b5c3acccbc..2935504f157 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@@ -4,6 +4,12 @@ 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 { toast } from '@langgenius/dify-ui/toast'+import {+ Tooltip,+ TooltipContent,+ TooltipTrigger,+} from '@langgenius/dify-ui/tooltip'import { useBoolean } from 'ahooks'import { noop } from 'es-toolkit/function'import { produce } from 'immer'@@ -18,12 +24,6 @@ import { useFeaturesStore } from '@/app/components/base/features/hooks'import PromptEditor from '@/app/components/base/prompt-editor'import { PROMPT_EDITOR_UPDATE_VALUE_BY_EVENT_EMITTER } from '@/app/components/base/prompt-editor/plugins/update-block'import { INSERT_VARIABLE_VALUE_BLOCK_COMMAND } from '@/app/components/base/prompt-editor/plugins/variable-block'-import { toast } from '@/app/components/base/ui/toast'-import {- Tooltip,- TooltipContent,- TooltipTrigger,-} from '@/app/components/base/ui/tooltip'import ConfigContext from '@/context/debug-configuration'import { useEventEmitterContextContext } from '@/context/event-emitter'import { useModalContext } from '@/context/modal-context'diff --git a/web/app/components/app/configuration/config-var/__tests__/index.spec.tsx b/web/app/components/app/configuration/config-var/__tests__/index.spec.tsxindex 4486489a206..51683ad948a 100644--- a/web/app/components/app/configuration/config-var/__tests__/index.spec.tsx+++ b/web/app/components/app/configuration/config-var/__tests__/index.spec.tsx@@ -2,10 +2,10 @@ import type { ReactNode } from 'react'import type { IConfigVarProps } from '../index'import type { ExternalDataTool } from '@/models/common'import type { PromptVariable } from '@/models/debug'+import { toast } from '@langgenius/dify-ui/toast'import { act, fireEvent, render, screen, waitFor, within } from '@testing-library/react'import * as React from 'react'import { vi } from 'vitest'-import { toast } from '@/app/components/base/ui/toast'import DebugConfigurationContext from '@/context/debug-configuration'import { AppModeEnum } from '@/types/app'diff --git a/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx b/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsxindex 8cc8775bf56..5f0f4129d60 100644--- a/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx+++ b/web/app/components/app/configuration/config-var/config-modal/__tests__/form-fields.spec.tsx@@ -44,8 +44,8 @@ vi.mock('@/app/components/base/select', () => ({),}))-vi.mock('@/app/components/base/ui/select', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/select')>()+vi.mock('@langgenius/dify-ui/select', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/select')>()return {...actual,diff --git a/web/app/components/app/configuration/config-var/config-modal/__tests__/index-logic.spec.tsx b/web/app/components/app/configuration/config-var/config-modal/__tests__/index-logic.spec.tsxindex 4888d284d24..77f2b545339 100644--- a/web/app/components/app/configuration/config-var/config-modal/__tests__/index-logic.spec.tsx+++ b/web/app/components/app/configuration/config-var/config-modal/__tests__/index-logic.spec.tsx@@ -1,10 +1,10 @@/* eslint-disable ts/no-explicit-any */import type { InputVar } from '@/app/components/workflow/types'import type { App, AppSSO } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import * as React from 'react'import { useStore } from '@/app/components/app/store'-import { toast } from '@/app/components/base/ui/toast'import { InputVarType } from '@/app/components/workflow/types'import DebugConfigurationContext from '@/context/debug-configuration'import { AppModeEnum } from '@/types/app'diff --git a/web/app/components/app/configuration/config-var/config-modal/__tests__/index.spec.tsx b/web/app/components/app/configuration/config-var/config-modal/__tests__/index.spec.tsxindex d15d6527c51..094a2939439 100644--- a/web/app/components/app/configuration/config-var/config-modal/__tests__/index.spec.tsx+++ b/web/app/components/app/configuration/config-var/config-modal/__tests__/index.spec.tsx@@ -1,9 +1,9 @@import type { InputVar } from '@/app/components/workflow/types'import type { App, AppSSO } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'import { useStore } from '@/app/components/app/store'-import { toast } from '@/app/components/base/ui/toast'import { InputVarType } from '@/app/components/workflow/types'import { AppModeEnum } from '@/types/app'import ConfigModal from '../index'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.tsxindex 279a9279cfc..748108e19a5 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@@ -3,11 +3,6 @@ import type { ChangeEvent, FC } from 'react'import type { Item as SelectOptionItem } from './type-select'import type { FileEntity } from '@/app/components/base/file-uploader/types'import type { InputVar, UploadFileSetting } from '@/app/components/workflow/types'-import * as React from 'react'-import Checkbox from '@/app/components/base/checkbox'-import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uploader'-import Input from '@/app/components/base/input'-import Textarea from '@/app/components/base/textarea'import {Select,SelectContent,@@ -16,7 +11,12 @@ import {SelectItemText,SelectTrigger,SelectValue,-} from '@/app/components/base/ui/select'+} from '@langgenius/dify-ui/select'+import * as React from 'react'+import Checkbox from '@/app/components/base/checkbox'+import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uploader'+import Input from '@/app/components/base/input'+import Textarea from '@/app/components/base/textarea'import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'import FileUploadSetting from '@/app/components/workflow/nodes/_base/components/file-upload-setting'import { CodeLanguage } from '@/app/components/workflow/nodes/code/types'diff --git a/web/app/components/app/configuration/config-var/config-modal/index.tsx b/web/app/components/app/configuration/config-var/config-modal/index.tsxindex 18484683fa8..824b8a8d825 100644--- a/web/app/components/app/configuration/config-var/config-modal/index.tsx+++ b/web/app/components/app/configuration/config-var/config-modal/index.tsx@@ -2,13 +2,13 @@import type { ChangeEvent, FC } from 'react'import type { Item as SelectItem } from './type-select'import type { InputVar, InputVarType, MoreInfo } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { useContext } from 'use-context-selector'import { useStore as useAppStore } from '@/app/components/app/store'import Modal from '@/app/components/base/modal'-import { toast } from '@/app/components/base/ui/toast'import ConfigContext from '@/context/debug-configuration'import { AppModeEnum } from '@/types/app'import { checkKeys, getNewVarInWorkflow, replaceSpaceWithUnderscoreInVarNameInput } from '@/utils/var'diff --git a/web/app/components/app/configuration/config-var/index.tsx b/web/app/components/app/configuration/config-var/index.tsxindex aca28172493..34c6bf57869 100644--- a/web/app/components/app/configuration/config-var/index.tsx+++ b/web/app/components/app/configuration/config-var/index.tsx@@ -4,7 +4,17 @@ 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 {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import { produce } from 'immer'import * as React from 'react'@@ -13,16 +23,6 @@ import { useTranslation } from 'react-i18next'import { ReactSortable } from 'react-sortablejs'import { useContext } from 'use-context-selector'import Tooltip from '@/app/components/base/tooltip'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { toast } from '@/app/components/base/ui/toast'import { InputVarType } from '@/app/components/workflow/types'import ConfigContext from '@/context/debug-configuration'import { useEventEmitterContextContext } from '@/context/event-emitter'diff --git a/web/app/components/app/configuration/config-var/modal-foot.tsx b/web/app/components/app/configuration/config-var/modal-foot.tsxindex 3168d2a273d..d8a869610f8 100644--- a/web/app/components/app/configuration/config-var/modal-foot.tsx+++ b/web/app/components/app/configuration/config-var/modal-foot.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type IModalFootProps = {onConfirm: () => voiddiff --git a/web/app/components/app/configuration/config-vision/index.tsx b/web/app/components/app/configuration/config-vision/index.tsxindex e1fd88eb3fe..b9cb54cc344 100644--- a/web/app/components/app/configuration/config-vision/index.tsx+++ b/web/app/components/app/configuration/config-vision/index.tsx@@ -1,6 +1,7 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { noop } from 'es-toolkit/function'import { produce } from 'immer'import * as React from 'react'@@ -10,7 +11,6 @@ import { useContext } from 'use-context-selector'// import { Resolution } from '@/types/app'import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hooks'import { Vision } from '@/app/components/base/icons/src/vender/features'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import OptionCard from '@/app/components/workflow/nodes/_base/components/option-card'import { SupportUploadFileTypes } from '@/app/components/workflow/types'diff --git a/web/app/components/app/configuration/config-vision/param-config.tsx b/web/app/components/app/configuration/config-vision/param-config.tsxindex 3be4c60aa94..51092f8ae75 100644--- a/web/app/components/app/configuration/config-vision/param-config.tsx+++ b/web/app/components/app/configuration/config-vision/param-config.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import { RiSettings2Line } from '@remixicon/react'import { memo, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import ParamConfigContent from './param-config-content'const ParamsConfig: FC = () => {diff --git a/web/app/components/app/configuration/config/agent-setting-button.tsx b/web/app/components/app/configuration/config/agent-setting-button.tsxindex 0f1021e7cec..98316605711 100644--- a/web/app/components/app/configuration/config/agent-setting-button.tsx+++ b/web/app/components/app/configuration/config/agent-setting-button.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'import type { AgentConfig } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'import { RiSettings2Line } from '@remixicon/react'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import AgentSetting from './agent/agent-setting'type Props = {diff --git a/web/app/components/app/configuration/config/agent/agent-setting/__tests__/index.spec.tsx b/web/app/components/app/configuration/config/agent/agent-setting/__tests__/index.spec.tsxindex cdab20df16c..08a6e0f62bc 100644--- a/web/app/components/app/configuration/config/agent/agent-setting/__tests__/index.spec.tsx+++ b/web/app/components/app/configuration/config/agent/agent-setting/__tests__/index.spec.tsx@@ -12,7 +12,7 @@ vi.mock('ahooks', async (importOriginal) => {}})-vi.mock('@/app/components/base/ui/slider', () => ({+vi.mock('@langgenius/dify-ui/slider', () => ({Slider: (props: { className?: string, min?: number, max?: number, value: number, onValueChange: (value: number) => void }) => (<inputtype="range"diff --git a/web/app/components/app/configuration/config/agent/agent-setting/index.tsx b/web/app/components/app/configuration/config/agent/agent-setting/index.tsxindex 31b76bc46dc..beae6b2a494 100644--- a/web/app/components/app/configuration/config/agent/agent-setting/index.tsx+++ b/web/app/components/app/configuration/config/agent/agent-setting/index.tsx@@ -1,6 +1,8 @@'use client'import type { FC } from 'react'import type { AgentConfig } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'+import { Slider } from '@langgenius/dify-ui/slider'import { RiCloseLine } from '@remixicon/react'import { useClickAway } from 'ahooks'import * as React from 'react'@@ -8,8 +10,6 @@ import { useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'import { Unblur } from '@/app/components/base/icons/src/vender/solid/education'-import { Button } from '@/app/components/base/ui/button'-import { Slider } from '@/app/components/base/ui/slider'import { DEFAULT_AGENT_PROMPT, MAX_ITERATIONS_NUM } from '@/config'import ItemPanel from './item-panel'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.tsxindex 4f60bc9310e..6100e415cc6 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,7 +4,9 @@ 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 { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import {RiDeleteBinLine,RiEqualizer2Line,@@ -21,9 +23,7 @@ import OperationBtn from '@/app/components/app/configuration/base/operation-btn'import AppIcon from '@/app/components/base/app-icon'import { DefaultToolIcon } from '@/app/components/base/icons/src/public/other'import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'import { CollectionType } from '@/app/components/tools/types'import { addDefaultValue, toolParametersToFormSchemas } from '@/app/components/tools/utils/to-form-schema'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.tsxindex ae9ec962c76..71922d5a7ed 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 { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiArrowLeftLine,@@ -14,7 +15,6 @@ import ActionButton from '@/app/components/base/action-button'import Drawer from '@/app/components/base/drawer'import Loading from '@/app/components/base/loading'import TabSlider from '@/app/components/base/tab-slider-plain'-import { Button } from '@/app/components/base/ui/button'import Form from '@/app/components/header/account-setting/model-provider-page/model-modal/Form'import Icon from '@/app/components/plugins/card/base/card-icon'import Description from '@/app/components/plugins/card/base/description'diff --git a/web/app/components/app/configuration/config/automatic/__tests__/get-automatic-res.spec.tsx b/web/app/components/app/configuration/config/automatic/__tests__/get-automatic-res.spec.tsxindex 154a7a5a142..e5f96ef940a 100644--- a/web/app/components/app/configuration/config/automatic/__tests__/get-automatic-res.spec.tsx+++ b/web/app/components/app/configuration/config/automatic/__tests__/get-automatic-res.spec.tsx@@ -21,7 +21,7 @@ vi.mock('react-i18next', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => mockToastError(...args),},diff --git a/web/app/components/app/configuration/config/automatic/__tests__/result.spec.tsx b/web/app/components/app/configuration/config/automatic/__tests__/result.spec.tsxindex 30f41b7828d..54efa4a92c0 100644--- a/web/app/components/app/configuration/config/automatic/__tests__/result.spec.tsx+++ b/web/app/components/app/configuration/config/automatic/__tests__/result.spec.tsx@@ -1,5 +1,5 @@+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'-import { toast } from '@/app/components/base/ui/toast'import Result from '../result'import { GeneratorType } from '../types'@@ -19,7 +19,7 @@ vi.mock('copy-to-clipboard', () => ({default: (...args: unknown[]) => mockCopy(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),},diff --git a/web/app/components/app/configuration/config/automatic/automatic-btn.tsx b/web/app/components/app/configuration/config/automatic/automatic-btn.tsxindex af14fb037db..f9e9fa362a2 100644--- a/web/app/components/app/configuration/config/automatic/automatic-btn.tsx+++ b/web/app/components/app/configuration/config/automatic/automatic-btn.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import {RiSparklingFill,} from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type IAutomaticBtnProps = {onClick: () => voiddiff --git a/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx b/web/app/components/app/configuration/config/automatic/get-automatic-res.tsxindex d9200af7736..aff540cecfe 100644--- a/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx+++ b/web/app/components/app/configuration/config/automatic/get-automatic-res.tsx@@ -4,6 +4,17 @@ import type { FormValue } from '@/app/components/header/account-setting/model-pr// typeimport type { GenRes } from '@/service/debug'import type { AppModeEnum, CompletionParams, Model, ModelModeType } from '@/types/app'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import {RiDatabase2Line,RiFileExcel2Line,@@ -22,17 +33,6 @@ import { useTranslation } from 'react-i18next'import { Generator } from '@/app/components/base/icons/src/vender/other'import Loading from '@/app/components/base/loading'import Modal from '@/app/components/base/modal'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'diff --git a/web/app/components/app/configuration/config/automatic/result.tsx b/web/app/components/app/configuration/config/automatic/result.tsxindex 4beefe8386e..057fd48aeb9 100644--- a/web/app/components/app/configuration/config/automatic/result.tsx+++ b/web/app/components/app/configuration/config/automatic/result.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'import type { GenRes } from '@/service/debug'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiClipboardLine } from '@remixicon/react'import copy from 'copy-to-clipboard'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import CodeEditor from '@/app/components/workflow/nodes/llm/components/json-schema-config-modal/code-editor'import PromptRes from './prompt-res'import PromptResInWorkflow from './prompt-res-in-workflow'diff --git a/web/app/components/app/configuration/config/code-generator/__tests__/get-code-generator-res.spec.tsx b/web/app/components/app/configuration/config/code-generator/__tests__/get-code-generator-res.spec.tsxindex 25039bae966..fa7e9b6bd0d 100644--- a/web/app/components/app/configuration/config/code-generator/__tests__/get-code-generator-res.spec.tsx+++ b/web/app/components/app/configuration/config/code-generator/__tests__/get-code-generator-res.spec.tsx@@ -21,7 +21,7 @@ vi.mock('react-i18next', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => mockToastError(...args),},diff --git a/web/app/components/app/configuration/config/code-generator/get-code-generator-res.tsx b/web/app/components/app/configuration/config/code-generator/get-code-generator-res.tsxindex eb1ee7e10c9..c69c0f5dae2 100644--- a/web/app/components/app/configuration/config/code-generator/get-code-generator-res.tsx+++ b/web/app/components/app/configuration/config/code-generator/get-code-generator-res.tsx@@ -3,6 +3,17 @@ import type { FormValue } from '@/app/components/header/account-setting/model-primport type { CodeLanguage } from '@/app/components/workflow/nodes/code/types'import type { GenRes } from '@/service/debug'import type { AppModeEnum, CompletionParams, Model, ModelModeType } from '@/types/app'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import {useBoolean,useSessionStorageState,@@ -13,17 +24,6 @@ import { useTranslation } from 'react-i18next'import { Generator } from '@/app/components/base/icons/src/vender/other'import Loading from '@/app/components/base/loading'import Modal from '@/app/components/base/modal'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'import ModelParameterModal from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal'diff --git a/web/app/components/app/configuration/config/config-audio.tsx b/web/app/components/app/configuration/config/config-audio.tsxindex 15a52610e6a..25b6d64eec9 100644--- a/web/app/components/app/configuration/config/config-audio.tsx+++ b/web/app/components/app/configuration/config/config-audio.tsx@@ -1,14 +1,14 @@'use client'import type { FC } from 'react'+import { Switch } from '@langgenius/dify-ui/switch'import { produce } from 'immer'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { useContext } from 'use-context-selector'+import { useContext } from 'use-context-selector'import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hooks'import { Microphone01 } from '@/app/components/base/icons/src/vender/features'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import { SupportUploadFileTypes } from '@/app/components/workflow/types'import ConfigContext from '@/context/debug-configuration'diff --git a/web/app/components/app/configuration/config/config-document.tsx b/web/app/components/app/configuration/config/config-document.tsxindex 859fd39426d..156c605267b 100644--- a/web/app/components/app/configuration/config/config-document.tsx+++ b/web/app/components/app/configuration/config/config-document.tsx@@ -1,14 +1,14 @@'use client'import type { FC } from 'react'+import { Switch } from '@langgenius/dify-ui/switch'import { produce } from 'immer'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { useContext } from 'use-context-selector'+import { useContext } from 'use-context-selector'import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hooks'import { Document } from '@/app/components/base/icons/src/vender/features'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import { SupportUploadFileTypes } from '@/app/components/workflow/types'import ConfigContext from '@/context/debug-configuration'diff --git a/web/app/components/app/configuration/configuration-view.tsx b/web/app/components/app/configuration/configuration-view.tsxindex 35ab462ad10..3a9882db18b 100644--- a/web/app/components/app/configuration/configuration-view.tsx+++ b/web/app/components/app/configuration/configuration-view.tsx@@ -2,6 +2,16 @@import type { FC } from 'react'import type { ConfigurationViewModel } from './hooks/use-configuration'import { CodeBracketIcon } from '@heroicons/react/20/solid'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import AppPublisher from '@/app/components/app/app-publisher/features-wrapper'@@ -15,16 +25,6 @@ import Drawer from '@/app/components/base/drawer'import { FeaturesProvider } from '@/app/components/base/features'import NewFeaturePanel from '@/app/components/base/features/new-feature-panel'import Loading from '@/app/components/base/loading'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'import ModelParameterModal from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal'import PluginDependency from '@/app/components/workflow/plugin-dependency'import ConfigContext from '@/context/debug-configuration'diff --git a/web/app/components/app/configuration/ctrl-btn-group/index.tsx b/web/app/components/app/configuration/ctrl-btn-group/index.tsxindex fa8a8bdab32..6ac485c0976 100644--- a/web/app/components/app/configuration/ctrl-btn-group/index.tsx+++ b/web/app/components/app/configuration/ctrl-btn-group/index.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import s from './style.module.css'type IContrlBtnGroupProps = {diff --git a/web/app/components/app/configuration/dataset-config/params-config/__tests__/config-content.spec.tsx b/web/app/components/app/configuration/dataset-config/params-config/__tests__/config-content.spec.tsxindex a17b39e4b45..80b92395246 100644--- a/web/app/components/app/configuration/dataset-config/params-config/__tests__/config-content.spec.tsx+++ b/web/app/components/app/configuration/dataset-config/params-config/__tests__/config-content.spec.tsx@@ -3,9 +3,9 @@ import type { IndexingType } from '@/app/components/datasets/create/step-two'import type { DataSet } from '@/models/datasets'import type { DatasetConfigs } from '@/models/debug'import type { RetrievalConfig } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { toast } from '@/app/components/base/ui/toast'import {useCurrentProviderAndModel,useModelListAndDefaultModelAndCurrentProviderAndModel,diff --git a/web/app/components/app/configuration/dataset-config/params-config/__tests__/index.spec.tsx b/web/app/components/app/configuration/dataset-config/params-config/__tests__/index.spec.tsxindex a892de7feea..b5924a5f237 100644--- a/web/app/components/app/configuration/dataset-config/params-config/__tests__/index.spec.tsx+++ b/web/app/components/app/configuration/dataset-config/params-config/__tests__/index.spec.tsx@@ -1,9 +1,9 @@import type { MockedFunction, MockInstance } from 'vitest'import type { DatasetConfigs } from '@/models/debug'+import { toast } from '@langgenius/dify-ui/toast'import { render, screen, waitFor, within } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'-import { toast } from '@/app/components/base/ui/toast'import {useCurrentProviderAndModel,useModelListAndDefaultModelAndCurrentProviderAndModel,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.tsxindex bb260fb4997..d0e6b2fe9f2 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@@ -10,14 +10,14 @@ import type {DatasetConfigs,} from '@/models/debug'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'import { memo, useCallback, useEffect, useMemo } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import ScoreThresholdItem from '@/app/components/base/param-item/score-threshold-item'import TopKItem from '@/app/components/base/param-item/top-k-item'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'-import { toast } from '@/app/components/base/ui/toast'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useCurrentProviderAndModel, useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'import ModelParameterModal from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal'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.tsxindex ce78ad6e999..d4578af1d7f 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,14 +1,14 @@'use client'import type { DataSet } from '@/models/datasets'import type { DatasetConfigs } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiEqualizer2Line } from '@remixicon/react'import { memo, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import { useContext } from 'use-context-selector'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useCurrentProviderAndModel, useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'import {diff --git a/web/app/components/app/configuration/dataset-config/params-config/weighted-score.tsx b/web/app/components/app/configuration/dataset-config/params-config/weighted-score.tsxindex e5080f26e41..5c2cca05d32 100644--- a/web/app/components/app/configuration/dataset-config/params-config/weighted-score.tsx+++ b/web/app/components/app/configuration/dataset-config/params-config/weighted-score.tsx@@ -1,7 +1,7 @@+import { Slider } from '@langgenius/dify-ui/slider'import { noop } from 'es-toolkit/function'import { memo } from 'react'import { useTranslation } from 'react-i18next'-import { Slider } from '@/app/components/base/ui/slider'const weightedScoreSliderSlotClassNames = {track: 'bg-util-colors-teal-teal-500',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.tsxindex ff371fc2df3..13d11574d5b 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 { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useInfiniteScroll } from 'ahooks'import * as React from 'react'@@ -10,7 +11,6 @@ import AppIcon from '@/app/components/base/app-icon'import Badge from '@/app/components/base/badge'import Loading from '@/app/components/base/loading'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import { ModelFeatureEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import FeatureIcon from '@/app/components/header/account-setting/model-provider-page/model-selector/feature-icon'import { useKnowledge } from '@/hooks/use-knowledge'diff --git a/web/app/components/app/configuration/dataset-config/settings-modal/__tests__/index.spec.tsx b/web/app/components/app/configuration/dataset-config/settings-modal/__tests__/index.spec.tsxindex d699a4baec3..cf1df79d1ee 100644--- a/web/app/components/app/configuration/dataset-config/settings-modal/__tests__/index.spec.tsx+++ b/web/app/components/app/configuration/dataset-config/settings-modal/__tests__/index.spec.tsx@@ -19,7 +19,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),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.tsxindex 872d0813079..74e4ca5fe56 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,15 +2,15 @@ import type { FC } from 'react'import type { Member } from '@/models/common'import type { DataSet } from '@/models/datasets'import type { RetrievalConfig } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import { isEqual } from 'es-toolkit/predicate'import { useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { isReRankModelSelected } from '@/app/components/datasets/common/check-rerank-model'import { IndexingType } from '@/app/components/datasets/create/step-two'import IndexMethod from '@/app/components/datasets/settings/index-method'diff --git a/web/app/components/app/configuration/debug/__tests__/index.spec.tsx b/web/app/components/app/configuration/debug/__tests__/index.spec.tsxindex 4a50ecc626e..c17a74e24c3 100644--- a/web/app/components/app/configuration/debug/__tests__/index.spec.tsx+++ b/web/app/components/app/configuration/debug/__tests__/index.spec.tsx@@ -46,7 +46,7 @@ const mockState = vi.hoisted(() => ({},}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(mockState.mockToastCall, {success: vi.fn((message: string, options?: Record<string, unknown>) =>mockState.mockToastCall({ type: 'success', message, ...options })),diff --git a/web/app/components/app/configuration/debug/debug-with-multiple-model/__tests__/chat-item.spec.tsx b/web/app/components/app/configuration/debug/debug-with-multiple-model/__tests__/chat-item.spec.tsxindex 61eb8f2ae86..719479498a7 100644--- a/web/app/components/app/configuration/debug/debug-with-multiple-model/__tests__/chat-item.spec.tsx+++ b/web/app/components/app/configuration/debug/debug-with-multiple-model/__tests__/chat-item.spec.tsx@@ -90,7 +90,7 @@ vi.mock('@/app/components/base/chat/chat', () => ({},}))-vi.mock('@/app/components/base/ui/avatar', () => ({+vi.mock('@langgenius/dify-ui/avatar', () => ({Avatar: ({ name }: { name: string }) => <div data-testid="avatar">{name}</div>,}))diff --git a/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx b/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsxindex 56345890ff5..d5b353c899b 100644--- a/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx+++ b/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx@@ -2,6 +2,7 @@ import type { FC } from 'react'import type { ModelAndParameter } from '../types'import type { InputForm } from '@/app/components/base/chat/chat/type'import type { ChatConfig, OnSend } from '@/app/components/base/chat/types'+import { Avatar } from '@langgenius/dify-ui/avatar'import {memo,useCallback,@@ -11,7 +12,6 @@ import Chat from '@/app/components/base/chat/chat'import { useChat } from '@/app/components/base/chat/chat/hooks'import { getLastAnswer } from '@/app/components/base/chat/utils'import { useFeatures } from '@/app/components/base/features/hooks'-import { Avatar } from '@/app/components/base/ui/avatar'import { ModelFeatureEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useAppContext } from '@/context/app-context'import { useDebugConfigurationContext } from '@/context/debug-configuration'diff --git a/web/app/components/app/configuration/debug/debug-with-multiple-model/debug-item.tsx b/web/app/components/app/configuration/debug/debug-with-multiple-model/debug-item.tsxindex 2e535baeacb..e76bbb07287 100644--- a/web/app/components/app/configuration/debug/debug-with-multiple-model/debug-item.tsx+++ b/web/app/components/app/configuration/debug/debug-with-multiple-model/debug-item.tsx@@ -1,15 +1,15 @@import type { CSSProperties, FC } from 'react'import type { ModelAndParameter } from '../types'-import { memo, useState } from 'react'-import { useTranslation } from 'react-i18next'-import ActionButton from '@/app/components/base/action-button'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { memo, useState } from 'react'+import { useTranslation } from 'react-i18next'+import ActionButton from '@/app/components/base/action-button'import { ModelStatusEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useDebugConfigurationContext } from '@/context/debug-configuration'import { useProviderContext } from '@/context/provider-context'diff --git a/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx b/web/app/components/app/configuration/debug/debug-with-single-model/index.tsxindex a9f9f1116bd..aef3d5ef9c4 100644--- a/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx+++ b/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx@@ -1,13 +1,13 @@import type { InputForm } from '@/app/components/base/chat/chat/type'import type { ChatConfig, ChatItem, OnSend } from '@/app/components/base/chat/types'import type { FileEntity } from '@/app/components/base/file-uploader/types'+import { Avatar } from '@langgenius/dify-ui/avatar'import { memo, useCallback, useImperativeHandle, useMemo } from 'react'import { useStore as useAppStore } from '@/app/components/app/store'import Chat from '@/app/components/base/chat/chat'import { useChat } from '@/app/components/base/chat/chat/hooks'import { getLastAnswer, isValidGeneratedAnswer } from '@/app/components/base/chat/utils'import { useFeatures } from '@/app/components/base/features/hooks'-import { Avatar } from '@/app/components/base/ui/avatar'import { ModelFeatureEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useAppContext } from '@/context/app-context'import { useDebugConfigurationContext } from '@/context/debug-configuration'diff --git a/web/app/components/app/configuration/debug/index.tsx b/web/app/components/app/configuration/debug/index.tsxindex 88bca7111ce..87beccae240 100644--- a/web/app/components/app/configuration/debug/index.tsx+++ b/web/app/components/app/configuration/debug/index.tsx@@ -5,6 +5,13 @@ import type { ModelAndParameter } from './types'import type { ModelParameterModalProps } from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal'import type { Inputs } from '@/models/debug'import type { ModelConfig as BackendModelConfig, VisionFile, VisionSettings } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'+import {+ Tooltip,+ TooltipContent,+ TooltipTrigger,+} from '@langgenius/dify-ui/tooltip'import {RiAddLine,RiEqualizer2Line,@@ -28,13 +35,6 @@ import AgentLogModal from '@/app/components/base/agent-log-modal'import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hooks'import { RefreshCcw01 } from '@/app/components/base/icons/src/vender/line/arrows'import PromptLogModal from '@/app/components/base/prompt-log-modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'-import {- Tooltip,- TooltipContent,- TooltipTrigger,-} from '@/app/components/base/ui/tooltip'import { ModelFeatureEnum, ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useDefaultModel } from '@/app/components/header/account-setting/model-provider-page/hooks'import { DEFAULT_CHAT_PROMPT_CONFIG, DEFAULT_COMPLETION_PROMPT_CONFIG } from '@/config'diff --git a/web/app/components/app/configuration/hooks/__tests__/use-configuration-utils.spec.ts b/web/app/components/app/configuration/hooks/__tests__/use-configuration-utils.spec.tsindex c0353c233d7..4c72e4690c3 100644--- a/web/app/components/app/configuration/hooks/__tests__/use-configuration-utils.spec.ts+++ b/web/app/components/app/configuration/hooks/__tests__/use-configuration-utils.spec.ts@@ -52,7 +52,7 @@ vi.mock('@/app/components/workflow/nodes/knowledge-retrieval/utils', async () =>}})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => mockToastError(...args),success: (...args: unknown[]) => mockToastSuccess(...args),diff --git a/web/app/components/app/configuration/hooks/use-configuration-utils.ts b/web/app/components/app/configuration/hooks/use-configuration-utils.tsindex 6911fdcd01e..8a7b1c811eb 100644--- a/web/app/components/app/configuration/hooks/use-configuration-utils.ts+++ b/web/app/components/app/configuration/hooks/use-configuration-utils.ts@@ -4,9 +4,9 @@ import type { Collection } from '@/app/components/tools/types'import type { DataSet } from '@/models/datasets'import type { AnnotationReplyConfig, DatasetConfigs, ModelConfig, PromptVariable } from '@/models/debug'import type { ModelConfig as BackendModelConfig, UserInputFormItem, VisionSettings } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { clone } from 'es-toolkit/object'import { produce } from 'immer'-import { toast } from '@/app/components/base/ui/toast'import { getMultipleRetrievalConfig, getSelectedDatasetsMode } from '@/app/components/workflow/nodes/knowledge-retrieval/utils'import { DEFAULT_AGENT_SETTING, DEFAULT_CHAT_PROMPT_CONFIG, DEFAULT_COMPLETION_PROMPT_CONFIG } from '@/config'import { PromptMode } from '@/models/debug'diff --git a/web/app/components/app/configuration/prompt-value-panel/index.tsx b/web/app/components/app/configuration/prompt-value-panel/index.tsxindex a9df145ca1b..94bc48da291 100644--- a/web/app/components/app/configuration/prompt-value-panel/index.tsx+++ b/web/app/components/app/configuration/prompt-value-panel/index.tsx@@ -2,6 +2,7 @@import type { FC } from 'react'import type { Inputs } from '@/models/debug'import type { VisionFile, VisionSettings } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiArrowDownSLine,@@ -19,7 +20,6 @@ import Input from '@/app/components/base/input'import Select from '@/app/components/base/select'import Textarea from '@/app/components/base/textarea'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import BoolInput from '@/app/components/workflow/nodes/_base/components/before-run-form/bool-input'import ConfigContext from '@/context/debug-configuration'import { AppModeEnum, ModelModeType } from '@/types/app'diff --git a/web/app/components/app/configuration/tools/__tests__/external-data-tool-modal.spec.tsx b/web/app/components/app/configuration/tools/__tests__/external-data-tool-modal.spec.tsxindex ceca00a9aed..2a725d88ca0 100644--- a/web/app/components/app/configuration/tools/__tests__/external-data-tool-modal.spec.tsx+++ b/web/app/components/app/configuration/tools/__tests__/external-data-tool-modal.spec.tsx@@ -11,7 +11,7 @@ vi.mock('react-i18next', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => mockToastError(...args),},diff --git a/web/app/components/app/configuration/tools/external-data-tool-modal.tsx b/web/app/components/app/configuration/tools/external-data-tool-modal.tsxindex 68a1ee875db..b09b7b1c709 100644--- a/web/app/components/app/configuration/tools/external-data-tool-modal.tsx+++ b/web/app/components/app/configuration/tools/external-data-tool-modal.tsx@@ -2,6 +2,10 @@ import type { FC } from 'react'import type {ExternalDataTool,} from '@/models/common'+import { Button } from '@langgenius/dify-ui/button'+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'+import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger, SelectValue } from '@langgenius/dify-ui/select'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import { useState } from 'react'import { useTranslation } from 'react-i18next'@@ -9,10 +13,6 @@ import AppIcon from '@/app/components/base/app-icon'import EmojiPicker from '@/app/components/base/emoji-picker'import FormGeneration from '@/app/components/base/features/new-feature-panel/moderation/form-generation'import { BookOpen01 } from '@/app/components/base/icons/src/vender/line/education'-import { Button } from '@/app/components/base/ui/button'-import { Dialog, DialogContent } from '@/app/components/base/ui/dialog'-import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger, SelectValue } from '@/app/components/base/ui/select'-import { toast } from '@/app/components/base/ui/toast'import ApiBasedExtensionSelector from '@/app/components/header/account-setting/api-based-extension-page/selector'import { useDocLink, useLocale } from '@/context/i18n'import { useCodeBasedExtensions } from '@/service/use-common'diff --git a/web/app/components/app/create-app-dialog/app-card/index.tsx b/web/app/components/app/create-app-dialog/app-card/index.tsxindex fef7199ca25..65bd74344aa 100644--- a/web/app/components/app/create-app-dialog/app-card/index.tsx+++ b/web/app/components/app/create-app-dialog/app-card/index.tsx@@ -1,6 +1,7 @@'use client'import type { App } from '@/models/explore'import { PlusIcon } from '@heroicons/react/20/solid'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiInformation2Line } from '@remixicon/react'import { useCallback } from 'react'@@ -8,7 +9,6 @@ import { useTranslation } from 'react-i18next'import { useContextSelector } from 'use-context-selector'import { trackEvent } from '@/app/components/base/amplitude'import AppIcon from '@/app/components/base/app-icon'-import { Button } from '@/app/components/base/ui/button'import AppListContext from '@/context/app-list-context'import { useGlobalPublicStore } from '@/context/global-public-context'import { AppTypeIcon, AppTypeLabel } from '../../type-selector'diff --git a/web/app/components/app/create-app-dialog/app-list/__tests__/index.spec.tsx b/web/app/components/app/create-app-dialog/app-list/__tests__/index.spec.tsxindex 34024da54c2..0c6462c2f9e 100644--- a/web/app/components/app/create-app-dialog/app-list/__tests__/index.spec.tsx+++ b/web/app/components/app/create-app-dialog/app-list/__tests__/index.spec.tsx@@ -86,7 +86,7 @@ vi.mock('@/app/components/explore/create-app-modal', () => ({): null,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (...args: unknown[]) => mockToastSuccess(...args),error: (...args: unknown[]) => mockToastError(...args),diff --git a/web/app/components/app/create-app-dialog/app-list/index.tsx b/web/app/components/app/create-app-dialog/app-list/index.tsxindex 19089d6364b..1924de3893d 100644--- a/web/app/components/app/create-app-dialog/app-list/index.tsx+++ b/web/app/components/app/create-app-dialog/app-list/index.tsx@@ -3,6 +3,7 @@import type { CreateAppModalProps } from '@/app/components/explore/create-app-modal'import type { App } from '@/models/explore'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiRobot2Line } from '@remixicon/react'import { useDebounceFn } from 'ahooks'import * as React from 'react'@@ -12,7 +13,6 @@ import AppTypeSelector from '@/app/components/app/type-selector'import Divider from '@/app/components/base/divider'import Input from '@/app/components/base/input'import Loading from '@/app/components/base/loading'-import { toast } from '@/app/components/base/ui/toast'import CreateAppModal from '@/app/components/explore/create-app-modal'import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'diff --git a/web/app/components/app/create-app-modal/__tests__/index.spec.tsx b/web/app/components/app/create-app-modal/__tests__/index.spec.tsxindex 305b90981b5..24fb21747fd 100644--- a/web/app/components/app/create-app-modal/__tests__/index.spec.tsx+++ b/web/app/components/app/create-app-modal/__tests__/index.spec.tsx@@ -41,7 +41,7 @@ const toastMocks = vi.hoisted(() => ({mockToastSuccess: vi.fn(),mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: toastMocks.mockToastSuccess,error: toastMocks.mockToastError,diff --git a/web/app/components/app/create-app-modal/index.tsx b/web/app/components/app/create-app-modal/index.tsxindex 073107755f0..2ff8a0aacdf 100644--- a/web/app/components/app/create-app-modal/index.tsx+++ b/web/app/components/app/create-app-modal/index.tsx@@ -1,8 +1,10 @@'use client'import type { AppIconSelection } from '../../base/app-icon-picker'-import { cn } from '@langgenius/dify-ui/cn'+import { Button } from '@langgenius/dify-ui/button'+import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowRightLine, RiArrowRightSLine, RiExchange2Fill } from '@remixicon/react'import { useDebounceFn, useKeyPress } from 'ahooks'import { useCallback, useEffect, useRef, useState } from 'react'@@ -13,8 +15,6 @@ import FullScreenModal from '@/app/components/base/fullscreen-modal'import { BubbleTextMod, ChatBot, ListSparkle, Logic } from '@/app/components/base/icons/src/vender/solid/communication'import Input from '@/app/components/base/input'import Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import AppsFull from '@/app/components/billing/apps-full-in-dialog'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'import { useAppContext } from '@/context/app-context'diff --git a/web/app/components/app/create-from-dsl-modal/__tests__/index.spec.tsx b/web/app/components/app/create-from-dsl-modal/__tests__/index.spec.tsxindex ae555a872b7..f56b815399a 100644--- a/web/app/components/app/create-from-dsl-modal/__tests__/index.spec.tsx+++ b/web/app/components/app/create-from-dsl-modal/__tests__/index.spec.tsx@@ -83,7 +83,7 @@ vi.mock('@/utils/app-redirection', () => ({getRedirection: (...args: unknown[]) => mockGetRedirection(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((...args: unknown[]) => toastMocks.call(...args),{diff --git a/web/app/components/app/create-from-dsl-modal/__tests__/uploader.spec.tsx b/web/app/components/app/create-from-dsl-modal/__tests__/uploader.spec.tsxindex 8b935db1180..ba097b355cc 100644--- a/web/app/components/app/create-from-dsl-modal/__tests__/uploader.spec.tsx+++ b/web/app/components/app/create-from-dsl-modal/__tests__/uploader.spec.tsx@@ -1,5 +1,5 @@+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'-import { toast } from '@/app/components/base/ui/toast'import Uploader from '../uploader'vi.mock('react-i18next', () => ({@@ -8,7 +8,7 @@ vi.mock('react-i18next', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: vi.fn(),},diff --git a/web/app/components/app/create-from-dsl-modal/dsl-confirm-modal.tsx b/web/app/components/app/create-from-dsl-modal/dsl-confirm-modal.tsxindex 59ba840a070..d0c97e185c8 100644--- a/web/app/components/app/create-from-dsl-modal/dsl-confirm-modal.tsx+++ b/web/app/components/app/create-from-dsl-modal/dsl-confirm-modal.tsx@@ -1,6 +1,6 @@+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'type DSLConfirmModalProps = {versions?: {diff --git a/web/app/components/app/create-from-dsl-modal/index.tsx b/web/app/components/app/create-from-dsl-modal/index.tsxindex d4b857ee6b5..4f99fe90273 100644--- a/web/app/components/app/create-from-dsl-modal/index.tsx+++ b/web/app/components/app/create-from-dsl-modal/index.tsx@@ -1,7 +1,9 @@'use client'import type { MouseEventHandler } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import { useDebounceFn, useKeyPress } from 'ahooks'import { noop } from 'es-toolkit/function'@@ -9,8 +11,6 @@ import { useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import AppsFull from '@/app/components/billing/apps-full-in-dialog'import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'diff --git a/web/app/components/app/create-from-dsl-modal/uploader.tsx b/web/app/components/app/create-from-dsl-modal/uploader.tsxindex 1daa7e9f7b0..aeecb280d0d 100644--- a/web/app/components/app/create-from-dsl-modal/uploader.tsx+++ b/web/app/components/app/create-from-dsl-modal/uploader.tsx@@ -1,6 +1,7 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {RiDeleteBinLine,RiUploadCloud2Line,@@ -10,7 +11,6 @@ import { useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import { Yaml as YamlIcon } from '@/app/components/base/icons/src/public/files'-import { toast } from '@/app/components/base/ui/toast'import { formatFileSize } from '@/utils/format'type Props = {diff --git a/web/app/components/app/duplicate-modal/__tests__/index.spec.tsx b/web/app/components/app/duplicate-modal/__tests__/index.spec.tsxindex a2ff6bc2fde..ceec1aa3c0f 100644--- a/web/app/components/app/duplicate-modal/__tests__/index.spec.tsx+++ b/web/app/components/app/duplicate-modal/__tests__/index.spec.tsx@@ -20,7 +20,7 @@ vi.mock('@/context/provider-context', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => toastErrorMock(...args),},diff --git a/web/app/components/app/duplicate-modal/index.tsx b/web/app/components/app/duplicate-modal/index.tsxindex c28ead78216..e55ac6cf660 100644--- a/web/app/components/app/duplicate-modal/index.tsx+++ b/web/app/components/app/duplicate-modal/index.tsx@@ -1,6 +1,8 @@'use client'import type { AppIconType } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import * as React from 'react'@@ -9,8 +11,6 @@ import { useTranslation } from 'react-i18next'import AppIcon from '@/app/components/base/app-icon'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import AppsFull from '@/app/components/billing/apps-full-in-dialog'import { useProviderContext } from '@/context/provider-context'import AppIconPicker from '../../base/app-icon-picker'diff --git a/web/app/components/app/in-site-message/index.tsx b/web/app/components/app/in-site-message/index.tsxindex 5482086483b..4038fb375d9 100644--- a/web/app/components/app/in-site-message/index.tsx+++ b/web/app/components/app/in-site-message/index.tsx@@ -1,10 +1,10 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useEffect, useMemo, useState } from 'react'import { trackEvent } from '@/app/components/base/amplitude'import { MarkdownWithDirective } from '@/app/components/base/markdown-with-directive'-import { Button } from '@/app/components/base/ui/button'type InSiteMessageAction = 'link' | 'close'type InSiteMessageButtonType = 'primary' | 'default'diff --git a/web/app/components/app/log/__tests__/model-info.spec.tsx b/web/app/components/app/log/__tests__/model-info.spec.tsxindex f41aaf4c00d..44dcffe7bfc 100644--- a/web/app/components/app/log/__tests__/model-info.spec.tsx+++ b/web/app/components/app/log/__tests__/model-info.spec.tsx@@ -34,7 +34,7 @@ vi.mock('@/app/components/header/account-setting/model-provider-page/model-name'),}))-vi.mock('@/app/components/base/ui/popover', async () => {+vi.mock('@langgenius/dify-ui/popover', async () => {const React = await import('react')const PopoverContext = React.createContext<{ open: boolean, onOpenChange?: (open: boolean) => void } | null>(null)diff --git a/web/app/components/app/log/list.tsx b/web/app/components/app/log/list.tsxindex 551bae02123..da96d418048 100644--- a/web/app/components/app/log/list.tsx+++ b/web/app/components/app/log/list.tsx@@ -9,6 +9,7 @@ import {HandThumbUpIcon,} from '@heroicons/react/24/outline'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine, RiEditFill } from '@remixicon/react'import dayjs from 'dayjs'import timezone from 'dayjs/plugin/timezone'@@ -30,7 +31,6 @@ import Drawer from '@/app/components/base/drawer'import Loading from '@/app/components/base/loading'import MessageLogModal from '@/app/components/base/message-log-modal'import Tooltip from '@/app/components/base/tooltip'-import { toast } from '@/app/components/base/ui/toast'import { WorkflowContextProvider } from '@/app/components/workflow/context'import { useAppContext } from '@/context/app-context'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'diff --git a/web/app/components/app/log/model-info.tsx b/web/app/components/app/log/model-info.tsxindex e768f30a504..314627d855e 100644--- a/web/app/components/app/log/model-info.tsx+++ b/web/app/components/app/log/model-info.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import {RiInformation2Line,} from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import { useTextGenerationCurrentProviderAndModelAndModelList } from '@/app/components/header/account-setting/model-provider-page/hooks'import ModelIcon from '@/app/components/header/account-setting/model-provider-page/model-icon'import ModelName from '@/app/components/header/account-setting/model-provider-page/model-name'diff --git a/web/app/components/app/overview/__tests__/trigger-card.spec.tsx b/web/app/components/app/overview/__tests__/trigger-card.spec.tsxindex d51a23bb05d..7e183a3b158 100644--- a/web/app/components/app/overview/__tests__/trigger-card.spec.tsx+++ b/web/app/components/app/overview/__tests__/trigger-card.spec.tsx@@ -73,8 +73,8 @@ vi.mock('@/app/components/workflow/block-icon', () => ({),}))-vi.mock('@/app/components/base/switch', () => ({- default: ({ checked, onCheckedChange, disabled }: { checked: boolean, onCheckedChange: (v: boolean) => void, disabled: boolean }) => (+vi.mock('@langgenius/dify-ui/switch', () => ({+ Switch: ({ checked, onCheckedChange, disabled }: { checked: boolean, onCheckedChange: (v: boolean) => void, disabled: boolean }) => (<buttondata-testid="switch"data-checked={checked ? 'true' : 'false'}diff --git a/web/app/components/app/overview/apikey-info-panel/index.tsx b/web/app/components/app/overview/apikey-info-panel/index.tsxindex 9df9204183e..cd7264636ac 100644--- a/web/app/components/app/overview/apikey-info-panel/index.tsx+++ b/web/app/components/app/overview/apikey-info-panel/index.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { LinkExternal02 } from '@/app/components/base/icons/src/vender/line/general'-import { Button } from '@/app/components/base/ui/button'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { IS_CE_EDITION } from '@/config'import { useModalContext } from '@/context/modal-context'diff --git a/web/app/components/app/overview/app-card-sections.tsx b/web/app/components/app/overview/app-card-sections.tsxindex 93067d02b70..8fef355f346 100644--- a/web/app/components/app/overview/app-card-sections.tsx+++ b/web/app/components/app/overview/app-card-sections.tsx@@ -5,10 +5,6 @@ import type { OverviewOperationKey } from './app-card-utils'import type { ConfigParams } from './settings'import type { AppDetailResponse } from '@/models/app'import type { AppSSO } from '@/types/app'-import { RiArrowRightSLine, RiBookOpenLine, RiBuildingLine, RiEqualizer2Line, RiExternalLinkLine, RiGlobalLine, RiLockLine, RiPaintBrushLine, RiVerifiedBadgeLine, RiWindowLine } from '@remixicon/react'-import CopyFeedback from '@/app/components/base/copy-feedback'-import Divider from '@/app/components/base/divider'-import ShareQRCode from '@/app/components/base/qrcode'import {AlertDialog,AlertDialogActions,@@ -17,13 +13,17 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import {Tooltip,TooltipContent,TooltipTrigger,-} from '@/app/components/base/ui/tooltip'+} from '@langgenius/dify-ui/tooltip'+import { RiArrowRightSLine, RiBookOpenLine, RiBuildingLine, RiEqualizer2Line, RiExternalLinkLine, RiGlobalLine, RiLockLine, RiPaintBrushLine, RiVerifiedBadgeLine, RiWindowLine } from '@remixicon/react'+import CopyFeedback from '@/app/components/base/copy-feedback'+import Divider from '@/app/components/base/divider'+import ShareQRCode from '@/app/components/base/qrcode'import { AccessMode } from '@/models/access-control'import { AppModeEnum } from '@/types/app'import AccessControl from '../app-access-control'diff --git a/web/app/components/app/overview/app-card.tsx b/web/app/components/app/overview/app-card.tsxindex f02929c823d..5cfe3f65ac0 100644--- a/web/app/components/app/overview/app-card.tsx+++ b/web/app/components/app/overview/app-card.tsx@@ -2,12 +2,12 @@import type { ConfigParams } from './settings'import type { AppDetailResponse } from '@/models/app'import type { AppSSO } from '@/types/app'+import { Switch } from '@langgenius/dify-ui/switch'import * as React from 'react'import { useCallback, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import AppBasic from '@/app/components/app-sidebar/basic'import { useStore as useAppStore } from '@/app/components/app/store'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import SecretKeyButton from '@/app/components/develop/secret-key/secret-key-button'import Indicator from '@/app/components/header/indicator'diff --git a/web/app/components/app/overview/customize/index.tsx b/web/app/components/app/overview/customize/index.tsxindex b1d70667792..e4b8aabf698 100644--- a/web/app/components/app/overview/customize/index.tsx+++ b/web/app/components/app/overview/customize/index.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/outline'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'import Tag from '@/app/components/base/tag'-import { Button } from '@/app/components/base/ui/button'import { useDocLink } from '@/context/i18n'import { AppModeEnum } from '@/types/app'diff --git a/web/app/components/app/overview/settings/__tests__/index.spec.tsx b/web/app/components/app/overview/settings/__tests__/index.spec.tsxindex 7a723ce09d2..a13ccad1f11 100644--- a/web/app/components/app/overview/settings/__tests__/index.spec.tsx+++ b/web/app/components/app/overview/settings/__tests__/index.spec.tsx@@ -36,7 +36,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),diff --git a/web/app/components/app/overview/settings/index.tsx b/web/app/components/app/overview/settings/index.tsxindex d719d035e03..b8ac9af6078 100644--- a/web/app/components/app/overview/settings/index.tsx+++ b/web/app/components/app/overview/settings/index.tsx@@ -3,7 +3,10 @@ import type { FC } from 'react'import type { AppIconSelection } from '@/app/components/base/app-icon-picker'import type { AppDetailResponse } from '@/models/app'import type { AppIconType, AppSSO, Language } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowRightSLine, RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useEffect, useRef, useState } from 'react'@@ -17,11 +20,8 @@ import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'import PremiumBadge from '@/app/components/base/premium-badge'import { SimpleSelect } from '@/app/components/base/select'-import Switch from '@/app/components/base/switch'import Textarea from '@/app/components/base/textarea'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { useModalContext } from '@/context/modal-context'import { useProviderContext } from '@/context/provider-context'diff --git a/web/app/components/app/overview/trigger-card.tsx b/web/app/components/app/overview/trigger-card.tsxindex aa1190cde32..3283391b136 100644--- a/web/app/components/app/overview/trigger-card.tsx+++ b/web/app/components/app/overview/trigger-card.tsx@@ -3,10 +3,10 @@ import type { AppDetailResponse } from '@/models/app'import type { AppTrigger } from '@/service/use-tools'import type { AppSSO } from '@/types/app'import type { I18nKeysByPrefix } from '@/types/i18n'+import { Switch } from '@langgenius/dify-ui/switch'import * as React from 'react'import { useTranslation } from 'react-i18next'import { TriggerAll } from '@/app/components/base/icons/src/vender/workflow'-import Switch from '@/app/components/base/switch'import BlockIcon from '@/app/components/workflow/block-icon'import { useTriggerStatusStore } from '@/app/components/workflow/store/trigger-status'import { BlockEnum } from '@/app/components/workflow/types'diff --git a/web/app/components/app/switch-app-modal/__tests__/index.spec.tsx b/web/app/components/app/switch-app-modal/__tests__/index.spec.tsxindex 1db8f00a9b7..99bf1e7436d 100644--- a/web/app/components/app/switch-app-modal/__tests__/index.spec.tsx+++ b/web/app/components/app/switch-app-modal/__tests__/index.spec.tsx@@ -133,7 +133,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string, options?: Record<string, unknown>) => toastMocks.notify({ type: 'success', message, ...options }),error: (message: string, options?: Record<string, unknown>) => toastMocks.notify({ type: 'error', message, ...options }),diff --git a/web/app/components/app/switch-app-modal/index.tsx b/web/app/components/app/switch-app-modal/index.tsxindex 272214c5eea..8da710210e3 100644--- a/web/app/components/app/switch-app-modal/index.tsx+++ b/web/app/components/app/switch-app-modal/index.tsx@@ -1,7 +1,18 @@'use client'import type { App } from '@/types/app'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import { useEffect, useState } from 'react'@@ -12,17 +23,6 @@ import Checkbox from '@/app/components/base/checkbox'import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import AppsFull from '@/app/components/billing/apps-full-in-dialog'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'import { useAppContext } from '@/context/app-context'diff --git a/web/app/components/app/text-generate/item/__tests__/action-groups.spec.tsx b/web/app/components/app/text-generate/item/__tests__/action-groups.spec.tsxindex d2f54bbfd06..fe98dde67fb 100644--- a/web/app/components/app/text-generate/item/__tests__/action-groups.spec.tsx+++ b/web/app/components/app/text-generate/item/__tests__/action-groups.spec.tsx@@ -20,7 +20,7 @@ vi.mock('copy-to-clipboard', () => ({default: (...args: unknown[]) => mockCopy(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (...args: unknown[]) => mockSuccess(...args),},diff --git a/web/app/components/app/text-generate/item/__tests__/index.spec.tsx b/web/app/components/app/text-generate/item/__tests__/index.spec.tsxindex 8401585f940..f87c98b617d 100644--- a/web/app/components/app/text-generate/item/__tests__/index.spec.tsx+++ b/web/app/components/app/text-generate/item/__tests__/index.spec.tsx@@ -63,7 +63,7 @@ vi.mock('@/app/components/base/markdown', () => ({Markdown: ({ content }: { content: string }) => <div>{`markdown:${content}`}</div>,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {warning: (...args: unknown[]) => mockToastWarning(...args),success: vi.fn(),diff --git a/web/app/components/app/text-generate/item/action-groups.tsx b/web/app/components/app/text-generate/item/action-groups.tsxindex 9d9ba6daa38..4ebdbe48bb4 100644--- a/web/app/components/app/text-generate/item/action-groups.tsx+++ b/web/app/components/app/text-generate/item/action-groups.tsx@@ -3,6 +3,7 @@ import type { FC } from 'react'import type { FeedbackType } from '@/app/components/base/chat/chat/type'import type { WorkflowProcess } from '@/app/components/base/chat/types'import type { AppSourceType } from '@/service/share'+import { toast } from '@langgenius/dify-ui/toast'import {RiBookmark3Line,RiClipboardLine,@@ -16,7 +17,6 @@ import copy from 'copy-to-clipboard'import { useTranslation } from 'react-i18next'import ActionButton, { ActionButtonState } from '@/app/components/base/action-button'import NewAudioButton from '@/app/components/base/new-audio-button'-import { toast } from '@/app/components/base/ui/toast'import { AppSourceType as AppSourceTypeEnum } from '@/service/share'import { getCopyContent, MAX_GENERATION_DEPTH } from './utils'diff --git a/web/app/components/app/text-generate/item/index.tsx b/web/app/components/app/text-generate/item/index.tsxindex a6f5e6875b1..78ab1b5b320 100644--- a/web/app/components/app/text-generate/item/index.tsx+++ b/web/app/components/app/text-generate/item/index.tsx@@ -4,6 +4,7 @@ import type { FeedbackType } from '@/app/components/base/chat/chat/type'import type { WorkflowProcess } from '@/app/components/base/chat/types'import type { SiteInfo } from '@/models/share'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {RiPlayList2Line,RiSparklingFill,@@ -16,7 +17,6 @@ import { useStore as useAppStore } from '@/app/components/app/store'import { useChatContext } from '@/app/components/base/chat/chat/context'import Loading from '@/app/components/base/loading'import { Markdown } from '@/app/components/base/markdown'-import { toast } from '@/app/components/base/ui/toast'import { useParams } from '@/next/navigation'import { fetchTextGenerationMessage } from '@/service/debug'import { AppSourceType, fetchMoreLikeThis, submitHumanInputForm, updateFeedback } from '@/service/share'diff --git a/web/app/components/app/text-generate/saved-items/__tests__/index.spec.tsx b/web/app/components/app/text-generate/saved-items/__tests__/index.spec.tsxindex 3989817a719..2ed6215a958 100644--- a/web/app/components/app/text-generate/saved-items/__tests__/index.spec.tsx+++ b/web/app/components/app/text-generate/saved-items/__tests__/index.spec.tsx@@ -1,10 +1,10 @@import type { ISavedItemsProps } from '../index'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'-import copy from 'copy-to-clipboard'+import copy from 'copy-to-clipboard'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import { toast } from '@/app/components/base/ui/toast'import SavedItems from '../index'vi.mock('copy-to-clipboard', () => ({diff --git a/web/app/components/app/text-generate/saved-items/index.tsx b/web/app/components/app/text-generate/saved-items/index.tsxindex 605461dbd72..2bdb90624f0 100644--- a/web/app/components/app/text-generate/saved-items/index.tsx+++ b/web/app/components/app/text-generate/saved-items/index.tsx@@ -2,6 +2,7 @@import type { FC } from 'react'import type { SavedMessage } from '@/models/debug'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {RiClipboardLine,RiDeleteBinLine,@@ -12,7 +13,6 @@ import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import { Markdown } from '@/app/components/base/markdown'import NewAudioButton from '@/app/components/base/new-audio-button'-import { toast } from '@/app/components/base/ui/toast'import NoData from './no-data'export type ISavedItemsProps = {diff --git a/web/app/components/app/text-generate/saved-items/no-data/index.tsx b/web/app/components/app/text-generate/saved-items/no-data/index.tsxindex 2bf6e9b20a3..006e49e039f 100644--- a/web/app/components/app/text-generate/saved-items/no-data/index.tsx+++ b/web/app/components/app/text-generate/saved-items/no-data/index.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import {RiAddLine,RiBookmark3Line,} from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type INoDataProps = {onStartCreateContent: () => voiddiff --git a/web/app/components/app/type-selector/index.tsx b/web/app/components/app/type-selector/index.tsxindex 873593a6005..dd730834541 100644--- a/web/app/components/app/type-selector/index.tsx+++ b/web/app/components/app/type-selector/index.tsx@@ -1,14 +1,14 @@import { cn } from '@langgenius/dify-ui/cn'+import {+ Popover,+ PopoverContent,+ PopoverTrigger,+} from '@langgenius/dify-ui/popover'import { RiArrowDownSLine, RiCloseCircleFill, RiExchange2Fill, RiFilter3Line } from '@remixicon/react'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { BubbleTextMod, ChatBot, ListSparkle, Logic } from '@/app/components/base/icons/src/vender/solid/communication'-import {- Popover,- PopoverContent,- PopoverTrigger,-} from '@/app/components/base/ui/popover'import { AppModeEnum } from '@/types/app'type AppSelectorProps = {diff --git a/web/app/components/apps/__tests__/app-card.spec.tsx b/web/app/components/apps/__tests__/app-card.spec.tsxindex 84f8b87fa7e..0c80ee000e1 100644--- a/web/app/components/apps/__tests__/app-card.spec.tsx+++ b/web/app/components/apps/__tests__/app-card.spec.tsx@@ -34,7 +34,7 @@ const toastMocks = vi.hoisted(() => {}})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: toastMocks.api,}))@@ -190,7 +190,7 @@ vi.mock('@/next/dynamic', () => ({},}))-vi.mock('@/app/components/base/ui/dropdown-menu', () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', () => {type DropdownMenuContextValue = {isOpen: booleansetOpen: (open: boolean) => void@@ -1658,7 +1658,7 @@ describe('AppCard', () => {it('should reset delete input when dialog closes', async () => {vi.resetModules()- vi.doMock('@/app/components/base/ui/alert-dialog', createMockAlertDialogModule)+ vi.doMock('@langgenius/dify-ui/alert-dialog', createMockAlertDialogModule)const { default: IsolatedAppCard } = await import('../app-card')render(<IsolatedAppCard app={mockApp} />)@@ -1675,12 +1675,12 @@ describe('AppCard', () => {expect(await screen.findByRole('textbox')).toHaveValue('')- vi.doUnmock('@/app/components/base/ui/alert-dialog')+ vi.doUnmock('@langgenius/dify-ui/alert-dialog')})it('should keep delete input when dialog remains open', async () => {vi.resetModules()- vi.doMock('@/app/components/base/ui/alert-dialog', createMockAlertDialogModule)+ vi.doMock('@langgenius/dify-ui/alert-dialog', createMockAlertDialogModule)const { default: IsolatedAppCard } = await import('../app-card')render(<IsolatedAppCard app={mockApp} />)@@ -1694,13 +1694,13 @@ describe('AppCard', () => {expect(await screen.findByRole('alertdialog')).toBeInTheDocument()expect(await screen.findByRole('textbox')).toHaveValue('partial name')- vi.doUnmock('@/app/components/base/ui/alert-dialog')+ vi.doUnmock('@langgenius/dify-ui/alert-dialog')})it('should keep delete dialog open when close is requested during deletion', async () => {vi.resetModules()mockDeleteMutationPending = true- vi.doMock('@/app/components/base/ui/alert-dialog', createMockAlertDialogModule)+ vi.doMock('@langgenius/dify-ui/alert-dialog', createMockAlertDialogModule)const { default: IsolatedAppCard } = await import('../app-card')render(<IsolatedAppCard app={mockApp} />)@@ -1713,7 +1713,7 @@ describe('AppCard', () => {expect(await screen.findByRole('alertdialog')).toBeInTheDocument()- vi.doUnmock('@/app/components/base/ui/alert-dialog')+ vi.doUnmock('@langgenius/dify-ui/alert-dialog')mockDeleteMutationPending = false})})diff --git a/web/app/components/apps/app-card.tsx b/web/app/components/apps/app-card.tsxindex 152dc3c877c..d0bd9967c48 100644--- a/web/app/components/apps/app-card.tsx+++ b/web/app/components/apps/app-card.tsx@@ -6,15 +6,6 @@ import type { CreateAppModalProps } from '@/app/components/explore/create-app-moimport type { EnvironmentVariable } from '@/app/components/workflow/types'import type { WorkflowOnlineUser } from '@/models/app'import type { App } from '@/types/app'-import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import { useCallback, useEffect, useId, useMemo, useState } from 'react'-import { Trans, useTranslation } from 'react-i18next'-import { AppTypeIcon } from '@/app/components/app/type-selector'-import AppIcon from '@/app/components/base/app-icon'-import Input from '@/app/components/base/input'-import TagSelector from '@/app/components/base/tag-management/selector'-import Tooltip from '@/app/components/base/tooltip'import {AlertDialog,AlertDialogActions,@@ -23,15 +14,24 @@ 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,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/dropdown-menu'+import { toast } from '@langgenius/dify-ui/toast'+import * as React from 'react'+import { useCallback, useEffect, useId, useMemo, useState } from 'react'+import { Trans, useTranslation } from 'react-i18next'+import { AppTypeIcon } from '@/app/components/app/type-selector'+import AppIcon from '@/app/components/base/app-icon'+import Input from '@/app/components/base/input'+import TagSelector from '@/app/components/base/tag-management/selector'+import Tooltip from '@/app/components/base/tooltip'import { UserAvatarList } from '@/app/components/base/user-avatar-list'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'import { useAppContext } from '@/context/app-context'diff --git a/web/app/components/base/agent-log-modal/__tests__/detail.spec.tsx b/web/app/components/base/agent-log-modal/__tests__/detail.spec.tsxindex 6ce1e54a47c..78d4a06c4a4 100644--- a/web/app/components/base/agent-log-modal/__tests__/detail.spec.tsx+++ b/web/app/components/base/agent-log-modal/__tests__/detail.spec.tsx@@ -23,7 +23,7 @@ vi.mock('@/service/log', () => ({fetchAgentLogDetail: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/base/agent-log-modal/__tests__/index.spec.tsx b/web/app/components/base/agent-log-modal/__tests__/index.spec.tsxindex d1581c40b52..d8c595202ab 100644--- a/web/app/components/base/agent-log-modal/__tests__/index.spec.tsx+++ b/web/app/components/base/agent-log-modal/__tests__/index.spec.tsx@@ -21,7 +21,7 @@ vi.mock('@/service/log', () => ({fetchAgentLogDetail: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/base/agent-log-modal/detail.tsx b/web/app/components/base/agent-log-modal/detail.tsxindex 8080c52c467..b12777dfe51 100644--- a/web/app/components/base/agent-log-modal/detail.tsx+++ b/web/app/components/base/agent-log-modal/detail.tsx@@ -3,6 +3,7 @@ import type { FC } from 'react'import type { IChatItem } from '@/app/components/base/chat/chat/type'import type { AgentIteration, AgentLogDetailResponse } from '@/models/log'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { uniq } from 'es-toolkit/array'import { flatten } from 'es-toolkit/compat'import * as React from 'react'@@ -10,7 +11,6 @@ import { useCallback, useEffect, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import { useStore as useAppStore } from '@/app/components/app/store'import Loading from '@/app/components/base/loading'-import { toast } from '@/app/components/base/ui/toast'import { fetchAgentLogDetail } from '@/service/log'import ResultPanel from './result'import TracingPanel from './tracing'diff --git a/web/app/components/base/agent-log-modal/index.stories.tsx b/web/app/components/base/agent-log-modal/index.stories.tsxindex e8b49600a57..1ebb1944df8 100644--- a/web/app/components/base/agent-log-modal/index.stories.tsx+++ b/web/app/components/base/agent-log-modal/index.stories.tsx@@ -1,9 +1,9 @@import type { Meta, StoryObj } from '@storybook/nextjs-vite'import type { IChatItem } from '@/app/components/base/chat/chat/type'import type { AgentLogDetailResponse } from '@/models/log'+import { ToastHost } from '@langgenius/dify-ui/toast'import { useEffect, useRef } from 'react'import { useStore as useAppStore } from '@/app/components/app/store'-import { ToastHost } from '@/app/components/base/ui/toast'import AgentLogModal from '.'const MOCK_RESPONSE: AgentLogDetailResponse = {diff --git a/web/app/components/base/app-icon-picker/index.tsx b/web/app/components/base/app-icon-picker/index.tsxindex f90d78a9838..77bc0cd434b 100644--- a/web/app/components/base/app-icon-picker/index.tsx+++ b/web/app/components/base/app-icon-picker/index.tsx@@ -2,12 +2,12 @@ import type { FC } from 'react'import type { Area } from 'react-easy-crop'import type { OnImageInput } from './ImageInput'import type { AppIconType, ImageFile } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiImageCircleAiLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { DISABLE_UPLOAD_IMAGE_AS_ICON } from '@/config'import Divider from '../divider'import EmojiPickerInner from '../emoji-picker/Inner'diff --git a/web/app/components/base/audio-btn/__tests__/audio.spec.ts b/web/app/components/base/audio-btn/__tests__/audio.spec.tsindex 16f880719dd..85ce6763afa 100644--- a/web/app/components/base/audio-btn/__tests__/audio.spec.ts+++ b/web/app/components/base/audio-btn/__tests__/audio.spec.ts@@ -6,7 +6,7 @@ import AudioPlayer from '../audio'const mockToastNotify = vi.hoisted(() => vi.fn())const mockTextToAudioStream = vi.hoisted(() => vi.fn())-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (message: string) => mockToastNotify({ type: 'error', message }),},diff --git a/web/app/components/base/audio-btn/audio.ts b/web/app/components/base/audio-btn/audio.tsindex 5afe2bb656f..24615b333fd 100644--- a/web/app/components/base/audio-btn/audio.ts+++ b/web/app/components/base/audio-btn/audio.ts@@ -1,4 +1,4 @@-import { toast } from '@/app/components/base/ui/toast'+import { toast } from '@langgenius/dify-ui/toast'import { AppSourceType, textToAudioStream } from '@/service/share'declare global {diff --git a/web/app/components/base/audio-gallery/AudioPlayer.tsx b/web/app/components/base/audio-gallery/AudioPlayer.tsxindex c3b2056698d..1290fff8715 100644--- a/web/app/components/base/audio-gallery/AudioPlayer.tsx+++ b/web/app/components/base/audio-gallery/AudioPlayer.tsx@@ -1,8 +1,8 @@import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { t } from 'i18next'import * as React from 'react'import { useCallback, useEffect, useRef, useState } from 'react'-import { toast } from '@/app/components/base/ui/toast'import useTheme from '@/hooks/use-theme'import { Theme } from '@/types/app'diff --git a/web/app/components/base/audio-gallery/__tests__/AudioPlayer.spec.tsx b/web/app/components/base/audio-gallery/__tests__/AudioPlayer.spec.tsxindex fc5578d5a46..f05c5d25820 100644--- a/web/app/components/base/audio-gallery/__tests__/AudioPlayer.spec.tsx+++ b/web/app/components/base/audio-gallery/__tests__/AudioPlayer.spec.tsx@@ -1,5 +1,5 @@+import { toast } from '@langgenius/dify-ui/toast'import { act, fireEvent, render, screen } from '@testing-library/react'-import { toast } from '@/app/components/base/ui/toast'import useThemeMock from '@/hooks/use-theme'import { Theme } from '@/types/app'import AudioPlayer from '../AudioPlayer'diff --git a/web/app/components/base/block-input/__tests__/index.spec.tsx b/web/app/components/base/block-input/__tests__/index.spec.tsxindex 5eb5ca0cc46..abacf045c01 100644--- a/web/app/components/base/block-input/__tests__/index.spec.tsx+++ b/web/app/components/base/block-input/__tests__/index.spec.tsx@@ -1,6 +1,6 @@+import { toast } from '@langgenius/dify-ui/toast'import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'import * as React from 'react'-import { toast } from '@/app/components/base/ui/toast'import BlockInput, { getInputKeys } from '../index'vi.mock('@/utils/var', () => ({diff --git a/web/app/components/base/block-input/index.tsx b/web/app/components/base/block-input/index.tsxindex 70f66ad3adc..acdc13b02f8 100644--- a/web/app/components/base/block-input/index.tsx+++ b/web/app/components/base/block-input/index.tsx@@ -2,12 +2,12 @@import type { ChangeEvent, FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { checkKeys } from '@/utils/var'import VarHighlight from '../../app/configuration/base/var-highlight'-import { toast } from '../ui/toast'// regex to match the {{}} and replace it with a spanconst regex = /\{\{([^}]+)\}\}/gdiff --git a/web/app/components/base/chat/chat-with-history/__tests__/hooks.spec.tsx b/web/app/components/base/chat/chat-with-history/__tests__/hooks.spec.tsxindex 3f69cab96f5..e2dee20cadd 100644--- a/web/app/components/base/chat/chat-with-history/__tests__/hooks.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/__tests__/hooks.spec.tsx@@ -2,9 +2,9 @@ import type { ReactNode } from 'react'import type { ChatConfig } from '../../types'import type { InstalledApp } from '@/models/explore'import type { AppConversationData, AppData, AppMeta, ConversationItem } from '@/models/share'+import { ToastHost } from '@langgenius/dify-ui/toast'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { act, renderHook, waitFor } from '@testing-library/react'-import { ToastHost } from '@/app/components/base/ui/toast'import {AppSourceType,delConversation,diff --git a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsxindex 1b59618c8ce..5e685bff284 100644--- a/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx+++ b/web/app/components/base/chat/chat-with-history/chat-wrapper.tsx@@ -5,6 +5,7 @@ import type {ChatItemInTree,OnSend,} from '../types'+import { Avatar } from '@langgenius/dify-ui/avatar'import { cn } from '@langgenius/dify-ui/cn'import { useCallback, useEffect, useMemo, useState } from 'react'import AnswerIcon from '@/app/components/base/answer-icon'@@ -12,7 +13,6 @@ import AppIcon from '@/app/components/base/app-icon'import InputsForm from '@/app/components/base/chat/chat-with-history/inputs-form'import SuggestedQuestions from '@/app/components/base/chat/chat/answer/suggested-questions'import { Markdown } from '@/app/components/base/markdown'-import { Avatar } from '@/app/components/base/ui/avatar'import { InputVarType } from '@/app/components/workflow/types'import {AppSourceType,diff --git a/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx b/web/app/components/base/chat/chat-with-history/header-in-mobile.tsxindex d101a414491..308058957cc 100644--- a/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx+++ b/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx@@ -1,10 +1,4 @@import type { ConversationItem } from '@/models/share'-import { useCallback, useState } from 'react'-import { useTranslation } from 'react-i18next'-import ActionButton from '@/app/components/base/action-button'-import AppIcon from '@/app/components/base/app-icon'-import InputsFormContent from '@/app/components/base/chat/chat-with-history/inputs-form/content'-import RenameModal from '@/app/components/base/chat/chat-with-history/sidebar/rename-modal'import {AlertDialog,AlertDialogActions,@@ -13,7 +7,13 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import { useCallback, useState } from 'react'+import { useTranslation } from 'react-i18next'+import ActionButton from '@/app/components/base/action-button'+import AppIcon from '@/app/components/base/app-icon'+import InputsFormContent from '@/app/components/base/chat/chat-with-history/inputs-form/content'+import RenameModal from '@/app/components/base/chat/chat-with-history/sidebar/rename-modal'import { useChatWithHistoryContext } from './context'import MobileOperationDropdown from './header/mobile-operation-dropdown'import Operation from './header/operation'diff --git a/web/app/components/base/chat/chat-with-history/header/index.tsx b/web/app/components/base/chat/chat-with-history/header/index.tsxindex b0361c69a6a..95b6146afa2 100644--- a/web/app/components/base/chat/chat-with-history/header/index.tsx+++ b/web/app/components/base/chat/chat-with-history/header/index.tsx@@ -1,4 +1,13 @@import type { ConversationItem } from '@/models/share'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'import { cn } from '@langgenius/dify-ui/cn'import {RiEditBoxLine,@@ -12,15 +21,6 @@ import AppIcon from '@/app/components/base/app-icon'import ViewFormDropdown from '@/app/components/base/chat/chat-with-history/inputs-form/view-form-dropdown'import RenameModal from '@/app/components/base/chat/chat-with-history/sidebar/rename-modal'import Tooltip from '@/app/components/base/tooltip'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'import {useChatWithHistoryContext,} from '../context'diff --git a/web/app/components/base/chat/chat-with-history/header/mobile-operation-dropdown.tsx b/web/app/components/base/chat/chat-with-history/header/mobile-operation-dropdown.tsxindex 5d80db7ac39..97180704f87 100644--- a/web/app/components/base/chat/chat-with-history/header/mobile-operation-dropdown.tsx+++ b/web/app/components/base/chat/chat-with-history/header/mobile-operation-dropdown.tsx@@ -1,12 +1,12 @@-import { useCallback, useState } from 'react'-import { useTranslation } from 'react-i18next'-import ActionButton, { ActionButtonState } from '@/app/components/base/action-button'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { useCallback, useState } from 'react'+import { useTranslation } from 'react-i18next'+import ActionButton, { ActionButtonState } from '@/app/components/base/action-button'type Props = {handleResetChat: () => voiddiff --git a/web/app/components/base/chat/chat-with-history/header/operation.tsx b/web/app/components/base/chat/chat-with-history/header/operation.tsxindex d439a43c1f4..41556035414 100644--- a/web/app/components/base/chat/chat-with-history/header/operation.tsx+++ b/web/app/components/base/chat/chat-with-history/header/operation.tsx@@ -1,16 +1,16 @@'use client'+import type { Placement } from '@langgenius/dify-ui/dropdown-menu'import type { FC } from 'react'-import type { Placement } from '@/app/components/base/ui/placement'import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import { useCallback, useState } from 'react'-import { useTranslation } from 'react-i18next'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import * as React from 'react'+import { useCallback, useState } from 'react'+import { useTranslation } from 'react-i18next'type Props = {title: stringdiff --git a/web/app/components/base/chat/chat-with-history/hooks.tsx b/web/app/components/base/chat/chat-with-history/hooks.tsxindex df261d750c6..223c35f6dd1 100644--- a/web/app/components/base/chat/chat-with-history/hooks.tsx+++ b/web/app/components/base/chat/chat-with-history/hooks.tsx@@ -3,13 +3,13 @@ import type { Callback, ChatConfig, ChatItem, Feedback } from '../types'import type { InstalledApp } from '@/models/explore'import type { AppData, ConversationItem } from '@/models/share'import type { HumanInputFilledFormData, HumanInputFormData } from '@/types/workflow'+import { toast } from '@langgenius/dify-ui/toast'import { useLocalStorageState } from 'ahooks'import { noop } from 'es-toolkit/function'import { produce } from 'immer'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { getProcessedFilesFromResponse } from '@/app/components/base/file-uploader/utils'-import { toast } from '@/app/components/base/ui/toast'import { InputVarType } from '@/app/components/workflow/types'import { useWebAppStore } from '@/context/web-app-context'import { useAppFavicon } from '@/hooks/use-app-favicon'diff --git a/web/app/components/base/chat/chat-with-history/inputs-form/index.tsx b/web/app/components/base/chat/chat-with-history/inputs-form/index.tsxindex def5545a3fe..302e5e8c1f4 100644--- a/web/app/components/base/chat/chat-with-history/inputs-form/index.tsx+++ b/web/app/components/base/chat/chat-with-history/inputs-form/index.tsx@@ -1,10 +1,10 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useTranslation } from 'react-i18next'import InputsFormContent from '@/app/components/base/chat/chat-with-history/inputs-form/content'import Divider from '@/app/components/base/divider'import { Message3Fill } from '@/app/components/base/icons/src/public/other'-import { Button } from '@/app/components/base/ui/button'import { useChatWithHistoryContext } from '../context'type Props = {diff --git a/web/app/components/base/chat/chat-with-history/sidebar/index.tsx b/web/app/components/base/chat/chat-with-history/sidebar/index.tsxindex 1627d5890c0..999f0353012 100644--- a/web/app/components/base/chat/chat-with-history/sidebar/index.tsx+++ b/web/app/components/base/chat/chat-with-history/sidebar/index.tsx@@ -1,4 +1,14 @@import type { ConversationItem } from '@/models/share'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiEditBoxLine,@@ -15,16 +25,6 @@ import AppIcon from '@/app/components/base/app-icon'import List from '@/app/components/base/chat/chat-with-history/sidebar/list'import RenameModal from '@/app/components/base/chat/chat-with-history/sidebar/rename-modal'import DifyLogo from '@/app/components/base/logo/dify-logo'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'import MenuDropdown from '@/app/components/share/text-generation/menu-dropdown'import { useGlobalPublicStore } from '@/context/global-public-context'import { useChatWithHistoryContext } from '../context'diff --git a/web/app/components/base/chat/chat-with-history/sidebar/operation.tsx b/web/app/components/base/chat/chat-with-history/sidebar/operation.tsxindex adda03fb55e..a350e3f316e 100644--- a/web/app/components/base/chat/chat-with-history/sidebar/operation.tsx+++ b/web/app/components/base/chat/chat-with-history/sidebar/operation.tsx@@ -1,17 +1,17 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'-import { useBoolean } from 'ahooks'-import * as React from 'react'-import { useCallback, useEffect, useState } from 'react'-import { useTranslation } from 'react-i18next'-import ActionButton, { ActionButtonState } from '@/app/components/base/action-button'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { useBoolean } from 'ahooks'+import * as React from 'react'+import { useCallback, useEffect, useState } from 'react'+import { useTranslation } from 'react-i18next'+import ActionButton, { ActionButtonState } from '@/app/components/base/action-button'type Props = {isActive?: booleandiff --git a/web/app/components/base/chat/chat-with-history/sidebar/rename-modal.tsx b/web/app/components/base/chat/chat-with-history/sidebar/rename-modal.tsxindex ab5252da641..5cf981363c0 100644--- a/web/app/components/base/chat/chat-with-history/sidebar/rename-modal.tsx+++ b/web/app/components/base/chat/chat-with-history/sidebar/rename-modal.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'type IRenameModalProps = {isShow: booleandiff --git a/web/app/components/base/chat/chat/__tests__/check-input-forms-hooks.spec.tsx b/web/app/components/base/chat/chat/__tests__/check-input-forms-hooks.spec.tsxindex 1e96c1f798f..28cc3b9eeff 100644--- a/web/app/components/base/chat/chat/__tests__/check-input-forms-hooks.spec.tsx+++ b/web/app/components/base/chat/chat/__tests__/check-input-forms-hooks.spec.tsx@@ -5,7 +5,7 @@ import { TransferMethod } from '@/types/app'import { useCheckInputsForms } from '../check-input-forms-hooks'const mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => mockNotify(args),},diff --git a/web/app/components/base/chat/chat/__tests__/hooks.spec.tsx b/web/app/components/base/chat/chat/__tests__/hooks.spec.tsxindex 9d65246a7f1..738ab79bca8 100644--- a/web/app/components/base/chat/chat/__tests__/hooks.spec.tsx+++ b/web/app/components/base/chat/chat/__tests__/hooks.spec.tsx@@ -20,7 +20,7 @@ vi.mock('@/app/components/base/audio-btn/audio.player.manager', () => ({},}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: { notify: vi.fn() },toast: {success: vi.fn(),diff --git a/web/app/components/base/chat/chat/__tests__/question.spec.tsx b/web/app/components/base/chat/chat/__tests__/question.spec.tsxindex b9c365a850f..df02cc1e03a 100644--- a/web/app/components/base/chat/chat/__tests__/question.spec.tsx+++ b/web/app/components/base/chat/chat/__tests__/question.spec.tsx@@ -1,11 +1,11 @@import type { Theme } from '../../embedded-chatbot/theme/theme-context'import type { ChatConfig, ChatItem, OnRegenerate } from '../../types'import type { FileEntity } from '@/app/components/base/file-uploader/types'+import { toast } from '@langgenius/dify-ui/toast'import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import copy from 'copy-to-clipboard'import * as React from 'react'-import { toast } from '@/app/components/base/ui/toast'import { ThemeBuilder } from '../../embedded-chatbot/theme/theme-context'import { ChatContextProvider } from '../context-provider'import Question from '../question'diff --git a/web/app/components/base/chat/chat/answer/__tests__/operation.spec.tsx b/web/app/components/base/chat/chat/answer/__tests__/operation.spec.tsxindex e3bc2dcd385..9eaf5fe3747 100644--- a/web/app/components/base/chat/chat/answer/__tests__/operation.spec.tsx+++ b/web/app/components/base/chat/chat/answer/__tests__/operation.spec.tsx@@ -29,7 +29,7 @@ const {vi.mock('copy-to-clipboard', () => ({ default: vi.fn() }))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: { notify: vi.fn() },}))diff --git a/web/app/components/base/chat/chat/answer/human-input-content/human-input-form.tsx b/web/app/components/base/chat/chat/answer/human-input-content/human-input-form.tsxindex 5da8a754fa2..0e7881d9726 100644--- a/web/app/components/base/chat/chat/answer/human-input-content/human-input-form.tsx+++ b/web/app/components/base/chat/chat/answer/human-input-content/human-input-form.tsx@@ -1,10 +1,10 @@'use client'+import type { ButtonProps } from '@langgenius/dify-ui/button'import type { HumanInputFormProps } from './type'-import type { ButtonProps } from '@/app/components/base/ui/button'import type { UserAction } from '@/app/components/workflow/nodes/human-input/types'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useCallback, useState } from 'react'-import { Button } from '@/app/components/base/ui/button'import ContentItem from './content-item'import { getButtonStyle, initializeInputs, splitByOutputVar } from './utils'diff --git a/web/app/components/base/chat/chat/answer/operation.tsx b/web/app/components/base/chat/chat/answer/operation.tsxindex 5a2cccb1e96..e7d1c17a3e5 100644--- a/web/app/components/base/chat/chat/answer/operation.tsx+++ b/web/app/components/base/chat/chat/answer/operation.tsx@@ -4,6 +4,7 @@ import type {Feedback,} from '../../types'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import copy from 'copy-to-clipboard'import {memo,@@ -19,7 +20,6 @@ import Modal from '@/app/components/base/modal/modal'import NewAudioButton from '@/app/components/base/new-audio-button'import Textarea from '@/app/components/base/textarea'import Tooltip from '@/app/components/base/tooltip'-import { toast } from '@/app/components/base/ui/toast'import { useChatContext } from '../context'type OperationProps = {diff --git a/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx b/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsxindex 1a8dd55f616..f17f94ff9ea 100644--- a/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx+++ b/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx@@ -175,7 +175,7 @@ vi.mock('@/app/components/base/features/hooks', () => ({// ---------------------------------------------------------------------------// Toast context// ----------------------------------------------------------------------------vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => mockNotify(args),},diff --git a/web/app/components/base/chat/chat/chat-input-area/index.tsx b/web/app/components/base/chat/chat/chat-input-area/index.tsxindex f5444a8d7b3..a5d441114b7 100644--- a/web/app/components/base/chat/chat/chat-input-area/index.tsx+++ b/web/app/components/base/chat/chat/chat-input-area/index.tsx@@ -3,6 +3,7 @@ import type { EnableType, OnSend } from '../../types'import type { InputForm } from '../type'import type { FileUpload } from '@/app/components/base/features/types'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import { decode } from 'html-entities'import Recorder from 'js-audio-recorder'@@ -13,7 +14,6 @@ import FeatureBar from '@/app/components/base/features/new-feature-panel/featureimport { FileListInChatInput } from '@/app/components/base/file-uploader'import { useFile } from '@/app/components/base/file-uploader/hooks'import { FileContextProvider, useFileStore } from '@/app/components/base/file-uploader/store'-import { toast } from '@/app/components/base/ui/toast'import VoiceInput from '@/app/components/base/voice-input'import { TransferMethod } from '@/types/app'import { useCheckInputsForms } from '../check-input-forms-hooks'diff --git a/web/app/components/base/chat/chat/chat-input-area/operation.tsx b/web/app/components/base/chat/chat/chat-input-area/operation.tsxindex c94c47a25bf..05e55e038a2 100644--- a/web/app/components/base/chat/chat/chat-input-area/operation.tsx+++ b/web/app/components/base/chat/chat/chat-input-area/operation.tsx@@ -4,6 +4,7 @@ import type {EnableType,} from '../../types'import type { FileUpload } from '@/app/components/base/features/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiMicLine,@@ -13,7 +14,6 @@ import { noop } from 'es-toolkit/function'import { memo } from 'react'import ActionButton from '@/app/components/base/action-button'import { FileUploaderInChatInput } from '@/app/components/base/file-uploader'-import { Button } from '@/app/components/base/ui/button'type OperationProps = {readonly?: booleandiff --git a/web/app/components/base/chat/chat/check-input-forms-hooks.ts b/web/app/components/base/chat/chat/check-input-forms-hooks.tsindex dee6b4ca7f6..8414698341d 100644--- a/web/app/components/base/chat/chat/check-input-forms-hooks.ts+++ b/web/app/components/base/chat/chat/check-input-forms-hooks.ts@@ -1,7 +1,7 @@import type { InputForm } from './type'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { InputVarType } from '@/app/components/workflow/types'import { TransferMethod } from '@/types/app'diff --git a/web/app/components/base/chat/chat/hooks.ts b/web/app/components/base/chat/chat/hooks.tsindex d6e5c2f936e..677862a7950 100644--- a/web/app/components/base/chat/chat/hooks.ts+++ b/web/app/components/base/chat/chat/hooks.ts@@ -12,6 +12,7 @@ import type {IOnDataMoreInfo,IOtherOptions,} from '@/service/base'+import { toast } from '@langgenius/dify-ui/toast'import { uniqBy } from 'es-toolkit/compat'import { noop } from 'es-toolkit/function'import { produce, setAutoFreeze } from 'immer'@@ -29,7 +30,6 @@ import {getProcessedFiles,getProcessedFilesFromResponse,} from '@/app/components/base/file-uploader/utils'-import { toast } from '@/app/components/base/ui/toast'import { NodeRunningStatus, WorkflowRunningStatus } from '@/app/components/workflow/types'import useTimestamp from '@/hooks/use-timestamp'import { useParams, usePathname } from '@/next/navigation'diff --git a/web/app/components/base/chat/chat/index.tsx b/web/app/components/base/chat/chat/index.tsxindex 35000592031..6a14b76bd4f 100644--- a/web/app/components/base/chat/chat/index.tsx+++ b/web/app/components/base/chat/chat/index.tsx@@ -13,12 +13,12 @@ import type {import type { InputForm } from './type'import type { Emoji } from '@/app/components/tools/types'import type { AppData } from '@/models/share'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { memo } from 'react'import { useTranslation } from 'react-i18next'import { useShallow } from 'zustand/react/shallow'import { useStore as useAppStore } from '@/app/components/app/store'-import { Button } from '@/app/components/base/ui/button'import Answer from './answer'import ChatInputArea from './chat-input-area'import ChatLogModals from './chat-log-modals'diff --git a/web/app/components/base/chat/chat/question.tsx b/web/app/components/base/chat/chat/question.tsxindex f585ea0573c..5bfd8a30006 100644--- a/web/app/components/base/chat/chat/question.tsx+++ b/web/app/components/base/chat/chat/question.tsx@@ -4,7 +4,9 @@ import type {} from 'react'import type { Theme } from '../embedded-chatbot/theme/theme-context'import type { ChatItem } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import copy from 'copy-to-clipboard'import {memo,@@ -18,9 +20,7 @@ import Textarea from 'react-textarea-autosize'import { FileList } from '@/app/components/base/file-uploader'import { User } from '@/app/components/base/icons/src/public/avatar'import { Markdown } from '@/app/components/base/markdown'-import { Button } from '@/app/components/base/ui/button'import ActionButton from '../../action-button'-import { toast } from '../../ui/toast'import { CssTransform } from '../embedded-chatbot/theme/utils'import ContentSwitch from './content-switch'import { useChatContext } from './context'diff --git a/web/app/components/base/chat/chat/try-to-ask.tsx b/web/app/components/base/chat/chat/try-to-ask.tsxindex ada816b8fa0..a74b49fb51a 100644--- a/web/app/components/base/chat/chat/try-to-ask.tsx+++ b/web/app/components/base/chat/chat/try-to-ask.tsx@@ -1,9 +1,9 @@import type { FC } from 'react'import type { OnSend } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { memo } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import { Button } from '@/app/components/base/ui/button'type TryToAskProps = {suggestedQuestions: string[]diff --git a/web/app/components/base/chat/embedded-chatbot/__tests__/hooks.spec.tsx b/web/app/components/base/chat/embedded-chatbot/__tests__/hooks.spec.tsxindex 7ba8df7fa1f..b4f3f01070c 100644--- a/web/app/components/base/chat/embedded-chatbot/__tests__/hooks.spec.tsx+++ b/web/app/components/base/chat/embedded-chatbot/__tests__/hooks.spec.tsx@@ -1,9 +1,9 @@import type { ReactNode } from 'react'import type { ChatConfig } from '../../types'import type { AppConversationData, AppData, AppMeta, ConversationItem } from '@/models/share'+import { ToastHost } from '@langgenius/dify-ui/toast'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { act, renderHook, waitFor } from '@testing-library/react'-import { ToastHost } from '@/app/components/base/ui/toast'import { InputVarType } from '@/app/components/workflow/types'import {AppSourceType,diff --git a/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx b/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsxindex b63784cc348..2f50fe76c6c 100644--- a/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx+++ b/web/app/components/base/chat/embedded-chatbot/chat-wrapper.tsx@@ -5,6 +5,7 @@ import type {ChatItemInTree,OnSend,} from '../types'+import { Avatar } from '@langgenius/dify-ui/avatar'import { cn } from '@langgenius/dify-ui/cn'import { useCallback, useEffect, useMemo, useState } from 'react'import AnswerIcon from '@/app/components/base/answer-icon'@@ -13,7 +14,6 @@ import SuggestedQuestions from '@/app/components/base/chat/chat/answer/suggestedimport InputsForm from '@/app/components/base/chat/embedded-chatbot/inputs-form'import LogoAvatar from '@/app/components/base/logo/logo-embedded-chat-avatar'import { Markdown } from '@/app/components/base/markdown'-import { Avatar } from '@/app/components/base/ui/avatar'import { InputVarType } from '@/app/components/workflow/types'import {AppSourceType,diff --git a/web/app/components/base/chat/embedded-chatbot/hooks.tsx b/web/app/components/base/chat/embedded-chatbot/hooks.tsxindex 67b53324341..4ce6bc63180 100644--- a/web/app/components/base/chat/embedded-chatbot/hooks.tsx+++ b/web/app/components/base/chat/embedded-chatbot/hooks.tsx@@ -3,12 +3,12 @@ import type { ChatConfig, ChatItem, Feedback } from '../types'import type { InputValueTypes } from '@/app/components/share/text-generation/types'import type { Locale } from '@/i18n-config'import type { AppData, ConversationItem } from '@/models/share'+import { toast } from '@langgenius/dify-ui/toast'import { useLocalStorageState } from 'ahooks'import { noop } from 'es-toolkit/function'import { produce } from 'immer'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { addFileInfos, sortAgentSorts } from '@/app/components/tools/utils'import { InputVarType } from '@/app/components/workflow/types'import { useWebAppStore } from '@/context/web-app-context'diff --git a/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsx b/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsxindex f6827526456..40a62cf4513 100644--- a/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsx+++ b/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsx@@ -16,7 +16,7 @@ vi.mock('@/next/navigation', () => ({useSearchParams: () => new URLSearchParams(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({}))diff --git a/web/app/components/base/chat/embedded-chatbot/inputs-form/index.tsx b/web/app/components/base/chat/embedded-chatbot/inputs-form/index.tsxindex 77b47bb1c49..7cf9ee2968d 100644--- a/web/app/components/base/chat/embedded-chatbot/inputs-form/index.tsx+++ b/web/app/components/base/chat/embedded-chatbot/inputs-form/index.tsx@@ -1,9 +1,9 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useTranslation } from 'react-i18next'import InputsFormContent from '@/app/components/base/chat/embedded-chatbot/inputs-form/content'import Divider from '@/app/components/base/divider'-import { Button } from '@/app/components/base/ui/button'import { AppSourceType } from '@/service/share'import { useEmbeddedChatbotContext } from '../context'diff --git a/web/app/components/base/checkbox-list/index.tsx b/web/app/components/base/checkbox-list/index.tsxindex 80ebbc435c8..e6b2f5b2601 100644--- a/web/app/components/base/checkbox-list/index.tsx+++ b/web/app/components/base/checkbox-list/index.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useCallback, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import Badge from '@/app/components/base/badge'import Checkbox from '@/app/components/base/checkbox'import SearchInput from '@/app/components/base/search-input'-import { Button } from '@/app/components/base/ui/button'import SearchMenu from '@/assets/search-menu.svg'type CheckboxListOption = {diff --git a/web/app/components/base/date-and-time-picker/date-picker/footer.tsx b/web/app/components/base/date-and-time-picker/date-picker/footer.tsxindex ee94fdbf201..0e0852a8938 100644--- a/web/app/components/base/date-and-time-picker/date-picker/footer.tsx+++ b/web/app/components/base/date-and-time-picker/date-picker/footer.tsx@@ -1,10 +1,10 @@import type { FC } from 'react'import type { DatePickerFooterProps } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiTimeLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { ViewType } from '../types'const Footer: FC<DatePickerFooterProps> = ({diff --git a/web/app/components/base/date-and-time-picker/time-picker/footer.tsx b/web/app/components/base/date-and-time-picker/time-picker/footer.tsxindex f3c0b7e9ed0..49c7090cf17 100644--- a/web/app/components/base/date-and-time-picker/time-picker/footer.tsx+++ b/web/app/components/base/date-and-time-picker/time-picker/footer.tsx@@ -1,8 +1,8 @@import type { FC } from 'react'import type { TimePickerFooterProps } from '../types'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'const Footer: FC<TimePickerFooterProps> = ({handleSelectCurrentTime,diff --git a/web/app/components/base/date-and-time-picker/year-and-month-picker/footer.tsx b/web/app/components/base/date-and-time-picker/year-and-month-picker/footer.tsxindex 0cbcc3b8fbe..85ef88fd744 100644--- a/web/app/components/base/date-and-time-picker/year-and-month-picker/footer.tsx+++ b/web/app/components/base/date-and-time-picker/year-and-month-picker/footer.tsx@@ -1,8 +1,8 @@import type { FC } from 'react'import type { YearAndMonthPickerFooterProps } from '../types'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'const Footer: FC<YearAndMonthPickerFooterProps> = ({handleYearMonthCancel,diff --git a/web/app/components/base/drawer/index.tsx b/web/app/components/base/drawer/index.tsxindex 2ca2f090ef3..88c5874dd5d 100644--- a/web/app/components/base/drawer/index.tsx+++ b/web/app/components/base/drawer/index.tsx@@ -1,8 +1,8 @@'use client'import { Dialog, DialogBackdrop, DialogTitle } from '@headlessui/react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'export type IDrawerProps = {title?: stringdiff --git a/web/app/components/base/emoji-picker/index.tsx b/web/app/components/base/emoji-picker/index.tsxindex 92ee4935be0..75112e70ebd 100644--- a/web/app/components/base/emoji-picker/index.tsx+++ b/web/app/components/base/emoji-picker/index.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { noop } from 'es-toolkit/function'import * as React from 'react'@@ -7,7 +8,6 @@ import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import EmojiPickerInner from './Inner'type IEmojiPickerProps = {diff --git a/web/app/components/base/error-boundary/index.tsx b/web/app/components/base/error-boundary/index.tsxindex 21395a57c96..ba629eb335f 100644--- a/web/app/components/base/error-boundary/index.tsx+++ b/web/app/components/base/error-boundary/index.tsx@@ -1,11 +1,11 @@'use client'import type { ErrorInfo, ReactNode } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiAlertLine, RiBugLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { IS_DEV } from '@/config'type ErrorBoundaryState = {diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/annotation-ctrl-button.spec.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/annotation-ctrl-button.spec.tsxindex 9f4a04fc6a9..7d39cf24e71 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/annotation-ctrl-button.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/annotation-ctrl-button.spec.tsx@@ -28,7 +28,7 @@ vi.mock('@/service/annotation', () => ({addAnnotation: (...args: unknown[]) => mockAddAnnotation(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: { notify: vi.fn() },toast: {success: vi.fn(),diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/config-param-modal.spec.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/config-param-modal.spec.tsxindex d4f8d7be4dd..b07f48d4bb7 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/config-param-modal.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/config-param-modal.spec.tsx@@ -1,5 +1,5 @@+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import { toast } from '@/app/components/base/ui/toast'import ConfigParamModal from '../config-param-modal'let mockHooksReturn: {diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/annotation-ctrl-button.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/annotation-ctrl-button.tsxindex a93a180e27e..3f3e68b32ef 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/annotation-ctrl-button.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/annotation-ctrl-button.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'+import { toast } from '@langgenius/dify-ui/toast'import { RiEditLine, RiFileEditLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Tooltip from '@/app/components/base/tooltip'-import { toast } from '@/app/components/base/ui/toast'import { useModalContext } from '@/context/modal-context'import { useProviderContext } from '@/context/provider-context'import { addAnnotation } from '@/service/annotation'diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/config-param-modal.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/config-param-modal.tsxindex a89a00c01a5..13b4133ab6c 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/config-param-modal.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/config-param-modal.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'import type { AnnotationReplyConfig } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'import ModelSelector from '@/app/components/header/account-setting/model-provider-page/model-selector'diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/index.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/index.tsxindex e5ec9552268..80ebaf9614b 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/index.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/index.tsx@@ -1,5 +1,6 @@import type { OnFeaturesChange } from '@/app/components/base/features/types'import type { AnnotationReplyConfig } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'import { RiEqualizer2Line, RiExternalLinkLine } from '@remixicon/react'import { produce } from 'immer'import * as React from 'react'@@ -10,7 +11,6 @@ import ConfigParamModal from '@/app/components/base/features/new-feature-panel/aimport useAnnotationConfig from '@/app/components/base/features/new-feature-panel/annotation-reply/use-annotation-config'import FeatureCard from '@/app/components/base/features/new-feature-panel/feature-card'import { MessageFast } from '@/app/components/base/icons/src/vender/features'-import { Button } from '@/app/components/base/ui/button'import AnnotationFullModal from '@/app/components/billing/annotation-full/modal'import { ANNOTATION_DEFAULT } from '@/config'import { usePathname, useRouter } from '@/next/navigation'diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.tsxindex f3d86749f45..8a2dc18fc0d 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'+import { Slider } from '@langgenius/dify-ui/slider'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Slider } from '@/app/components/base/ui/slider'type Props = {className?: stringdiff --git a/web/app/components/base/features/new-feature-panel/conversation-opener/index.tsx b/web/app/components/base/features/new-feature-panel/conversation-opener/index.tsxindex c27f6348b2e..5a579519f0c 100644--- a/web/app/components/base/features/new-feature-panel/conversation-opener/index.tsx+++ b/web/app/components/base/features/new-feature-panel/conversation-opener/index.tsx@@ -1,6 +1,7 @@import type { OnFeaturesChange } from '@/app/components/base/features/types'import type { InputVar } from '@/app/components/workflow/types'import type { PromptVariable } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'import { RiEditLine } from '@remixicon/react'import { produce } from 'immer'import * as React from 'react'@@ -10,7 +11,6 @@ import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hoimport FeatureCard from '@/app/components/base/features/new-feature-panel/feature-card'import { FeatureEnum } from '@/app/components/base/features/types'import { LoveMessage } from '@/app/components/base/icons/src/vender/features'-import { Button } from '@/app/components/base/ui/button'import { useModalContext } from '@/context/modal-context'type Props = {diff --git a/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx b/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsxindex 556e5b88c05..2b0e8096887 100644--- a/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx+++ b/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx@@ -1,6 +1,7 @@import type { OpeningStatement } from '@/app/components/base/features/types'import type { InputVar } from '@/app/components/workflow/types'import type { PromptVariable } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useBoolean } from 'ahooks'import { noop } from 'es-toolkit/function'@@ -14,7 +15,6 @@ import { getInputKeys } from '@/app/components/base/block-input'import Divider from '@/app/components/base/divider'import Modal from '@/app/components/base/modal'import PromptEditor from '@/app/components/base/prompt-editor'-import { Button } from '@/app/components/base/ui/button'import { checkKeys, getNewVar } from '@/utils/var'type OpeningSettingModalProps = {diff --git a/web/app/components/base/features/new-feature-panel/feature-bar.tsx b/web/app/components/base/features/new-feature-panel/feature-bar.tsxindex dac46126774..9b442ca52f9 100644--- a/web/app/components/base/features/new-feature-panel/feature-bar.tsx+++ b/web/app/components/base/features/new-feature-panel/feature-bar.tsx@@ -1,3 +1,4 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiApps2AddLine, RiArrowRightLine, RiSparklingFill } from '@remixicon/react'import * as React from 'react'@@ -7,7 +8,6 @@ import { useFeatures } from '@/app/components/base/features/hooks'import VoiceSettings from '@/app/components/base/features/new-feature-panel/text-to-speech/voice-settings'import { Citations, ContentModeration, FolderUpload, LoveMessage, MessageFast, Microphone01, TextToAudio, VirtualAssistant } from '@/app/components/base/icons/src/vender/features'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'type Props = {isChatMode?: booleandiff --git a/web/app/components/base/features/new-feature-panel/feature-card.tsx b/web/app/components/base/features/new-feature-panel/feature-card.tsxindex adc33011d90..58725a31a1c 100644--- a/web/app/components/base/features/new-feature-panel/feature-card.tsx+++ b/web/app/components/base/features/new-feature-panel/feature-card.tsx@@ -1,8 +1,8 @@+import { Switch } from '@langgenius/dify-ui/switch'import {RiQuestionLine,} from '@remixicon/react'import * as React from 'react'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'type Props = {diff --git a/web/app/components/base/features/new-feature-panel/file-upload/index.tsx b/web/app/components/base/features/new-feature-panel/file-upload/index.tsxindex 0b15b6ff191..9406c29aaaa 100644--- a/web/app/components/base/features/new-feature-panel/file-upload/index.tsx+++ b/web/app/components/base/features/new-feature-panel/file-upload/index.tsx@@ -1,4 +1,5 @@import type { OnFeaturesChange } from '@/app/components/base/features/types'+import { Button } from '@langgenius/dify-ui/button'import { RiEqualizer2Line } from '@remixicon/react'import { produce } from 'immer'import * as React from 'react'@@ -9,7 +10,6 @@ import FeatureCard from '@/app/components/base/features/new-feature-panel/featurimport SettingModal from '@/app/components/base/features/new-feature-panel/file-upload/setting-modal'import { FeatureEnum } from '@/app/components/base/features/types'import { FolderUpload } from '@/app/components/base/icons/src/vender/features'-import { Button } from '@/app/components/base/ui/button'type Props = {disabled: booleandiff --git a/web/app/components/base/features/new-feature-panel/file-upload/setting-content.tsx b/web/app/components/base/features/new-feature-panel/file-upload/setting-content.tsxindex 23f2e2a25e0..393b66ba190 100644--- a/web/app/components/base/features/new-feature-panel/file-upload/setting-content.tsx+++ b/web/app/components/base/features/new-feature-panel/file-upload/setting-content.tsx@@ -1,12 +1,12 @@import type { OnFeaturesChange } from '@/app/components/base/features/types'import type { UploadFileSetting } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { produce } from 'immer'import * as React from 'react'import { useCallback, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hooks'import { FILE_EXTS } from '@/app/components/base/prompt-editor/constants'-import { Button } from '@/app/components/base/ui/button'import FileUploadSetting from '@/app/components/workflow/nodes/_base/components/file-upload-setting'import { SupportUploadFileTypes } from '@/app/components/workflow/types'diff --git a/web/app/components/base/features/new-feature-panel/image-upload/index.tsx b/web/app/components/base/features/new-feature-panel/image-upload/index.tsxindex 4fc4cc070e2..374283e91eb 100644--- a/web/app/components/base/features/new-feature-panel/image-upload/index.tsx+++ b/web/app/components/base/features/new-feature-panel/image-upload/index.tsx@@ -1,4 +1,5 @@import type { OnFeaturesChange } from '@/app/components/base/features/types'+import { Button } from '@langgenius/dify-ui/button'import { RiEqualizer2Line, RiImage2Fill } from '@remixicon/react'import { produce } from 'immer'import * as React from 'react'@@ -9,7 +10,6 @@ import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hoimport FeatureCard from '@/app/components/base/features/new-feature-panel/feature-card'import SettingModal from '@/app/components/base/features/new-feature-panel/file-upload/setting-modal'import { FeatureEnum } from '@/app/components/base/features/types'-import { Button } from '@/app/components/base/ui/button'type Props = {disabled: booleandiff --git a/web/app/components/base/features/new-feature-panel/moderation/__tests__/moderation-setting-modal.spec.tsx b/web/app/components/base/features/new-feature-panel/moderation/__tests__/moderation-setting-modal.spec.tsxindex fd6ca654aa4..da4c6580808 100644--- a/web/app/components/base/features/new-feature-panel/moderation/__tests__/moderation-setting-modal.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/moderation/__tests__/moderation-setting-modal.spec.tsx@@ -4,7 +4,7 @@ import * as i18n from 'react-i18next'import ModerationSettingModal from '../moderation-setting-modal'const mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (message: string) => mockNotify({ type: 'error', message }),},diff --git a/web/app/components/base/features/new-feature-panel/moderation/index.tsx b/web/app/components/base/features/new-feature-panel/moderation/index.tsxindex 5e97f6d4599..4e5ea9208e1 100644--- a/web/app/components/base/features/new-feature-panel/moderation/index.tsx+++ b/web/app/components/base/features/new-feature-panel/moderation/index.tsx@@ -1,4 +1,5 @@import type { OnFeaturesChange } from '@/app/components/base/features/types'+import { Button } from '@langgenius/dify-ui/button'import { RiEqualizer2Line } from '@remixicon/react'import { produce } from 'immer'import { useCallback, useMemo, useState } from 'react'@@ -7,7 +8,6 @@ import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hoimport FeatureCard from '@/app/components/base/features/new-feature-panel/feature-card'import { FeatureEnum } from '@/app/components/base/features/types'import { ContentModeration } from '@/app/components/base/icons/src/vender/features'-import { Button } from '@/app/components/base/ui/button'import { useLocale } from '@/context/i18n'import { useModalContext } from '@/context/modal-context'import { useCodeBasedExtensions } from '@/service/use-common'diff --git a/web/app/components/base/features/new-feature-panel/moderation/moderation-content.tsx b/web/app/components/base/features/new-feature-panel/moderation/moderation-content.tsxindex 39cc8d88db0..af4cb8c32c4 100644--- a/web/app/components/base/features/new-feature-panel/moderation/moderation-content.tsx+++ b/web/app/components/base/features/new-feature-panel/moderation/moderation-content.tsx@@ -1,7 +1,7 @@import type { FC } from 'react'import type { ModerationContentConfig } from '@/models/debug'+import { Switch } from '@langgenius/dify-ui/switch'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'type ModerationContentProps = {title: stringdiff --git a/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx b/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsxindex 438af2e9a12..0ae2f458e1e 100644--- a/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx+++ b/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx@@ -1,14 +1,14 @@import type { ChangeEvent, FC } from 'react'import type { CodeBasedExtensionItem } from '@/models/common'import type { ModerationConfig, ModerationContentConfig } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import ApiBasedExtensionSelector from '@/app/components/header/account-setting/api-based-extension-page/selector'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { CustomConfigurationStatusEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'diff --git a/web/app/components/base/features/new-feature-panel/text-to-speech/index.tsx b/web/app/components/base/features/new-feature-panel/text-to-speech/index.tsxindex 2268aa4d1e5..28482f0e0c0 100644--- a/web/app/components/base/features/new-feature-panel/text-to-speech/index.tsx+++ b/web/app/components/base/features/new-feature-panel/text-to-speech/index.tsx@@ -1,4 +1,5 @@import type { OnFeaturesChange } from '@/app/components/base/features/types'+import { Button } from '@langgenius/dify-ui/button'import { RiEqualizer2Line } from '@remixicon/react'import { produce } from 'immer'import * as React from 'react'@@ -9,7 +10,6 @@ import FeatureCard from '@/app/components/base/features/new-feature-panel/featurimport VoiceSettings from '@/app/components/base/features/new-feature-panel/text-to-speech/voice-settings'import { FeatureEnum } from '@/app/components/base/features/types'import { TextToAudio } from '@/app/components/base/icons/src/vender/features'-import { Button } from '@/app/components/base/ui/button'import { languages } from '@/i18n-config/language'import { TtsAutoPlay } from '@/types/app'diff --git a/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx b/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsxindex 0b22e7c12f5..a6314bf0af3 100644--- a/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx+++ b/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx@@ -3,6 +3,7 @@ import type { OnFeaturesChange } from '@/app/components/base/features/types'import type { Item } from '@/app/components/base/select'import { Listbox, ListboxButton, ListboxOption, ListboxOptions, Transition } from '@headlessui/react'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { produce } from 'immer'import * as React from 'react'import { Fragment } from 'react'@@ -10,7 +11,6 @@ import { useTranslation } from 'react-i18next'import { replace } from 'string-ts'import AudioBtn from '@/app/components/base/audio-btn'import { useFeatures, useFeaturesStore } from '@/app/components/base/features/hooks'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import { languages } from '@/i18n-config/language'import { usePathname } from '@/next/navigation'diff --git a/web/app/components/base/file-uploader/__tests__/hooks.spec.ts b/web/app/components/base/file-uploader/__tests__/hooks.spec.tsindex e9c3675c2f8..72f28603db9 100644--- a/web/app/components/base/file-uploader/__tests__/hooks.spec.ts+++ b/web/app/components/base/file-uploader/__tests__/hooks.spec.ts@@ -10,7 +10,7 @@ vi.mock('@/next/navigation', () => ({useParams: () => ({ token: undefined }),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (message: string) => mockNotify({ type: 'error', message }),},diff --git a/web/app/components/base/file-uploader/file-from-link-or-local/index.tsx b/web/app/components/base/file-uploader/file-from-link-or-local/index.tsxindex 872526f1ae6..912c2d3c48b 100644--- a/web/app/components/base/file-uploader/file-from-link-or-local/index.tsx+++ b/web/app/components/base/file-uploader/file-from-link-or-local/index.tsx@@ -1,4 +1,5 @@import type { FileUpload } from '@/app/components/base/features/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiUploadCloud2Line } from '@remixicon/react'import {@@ -11,7 +12,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import { FILE_URL_REGEX } from '../constants'import FileInput from '../file-input'import { useFile } from '../hooks'diff --git a/web/app/components/base/file-uploader/file-uploader-in-attachment/index.stories.tsx b/web/app/components/base/file-uploader/file-uploader-in-attachment/index.stories.tsxindex 502bbaf59d4..e7e280d2f5b 100644--- a/web/app/components/base/file-uploader/file-uploader-in-attachment/index.stories.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-attachment/index.stories.tsx@@ -1,10 +1,10 @@import type { Meta, StoryObj } from '@storybook/nextjs-vite'import type { FileEntity } from '../types'import type { FileUpload } from '@/app/components/base/features/types'+import { ToastHost } from '@langgenius/dify-ui/toast'import { useState } from 'react'import { fn } from 'storybook/test'import { PreviewMode } from '@/app/components/base/features/types'-import { ToastHost } from '@/app/components/base/ui/toast'import { SupportUploadFileTypes } from '@/app/components/workflow/types'import { TransferMethod } from '@/types/app'import FileUploaderInAttachmentWrapper from './index'diff --git a/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx b/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsxindex ba308642c2c..b532bb77739 100644--- a/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx@@ -1,5 +1,6 @@import type { FileEntity } from '../types'import type { FileUpload } from '@/app/components/base/features/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiLink,@@ -9,7 +10,6 @@ import {useCallback,} from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { TransferMethod } from '@/types/app'import FileFromLinkOrLocal from '../file-from-link-or-local'import FileInput from '../file-input'diff --git a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.tsx b/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.tsxindex 6249b47e6d2..be34abce4ec 100644--- a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.tsx@@ -1,4 +1,5 @@import type { FileEntity } from '../types'+import { Button } from '@langgenius/dify-ui/button'import {RiCloseLine,RiDownloadLine,@@ -7,7 +8,6 @@ import { useState } from 'react'import { ReplayLine } from '@/app/components/base/icons/src/vender/other'import ImagePreview from '@/app/components/base/image-uploader/image-preview'import ProgressCircle from '@/app/components/base/progress-bar/progress-circle'-import { Button } from '@/app/components/base/ui/button'import { downloadUrl } from '@/utils/download'import FileImageRender from '../file-image-render'import {diff --git a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.tsx b/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.tsxindex a23d616481e..3dae5f60f84 100644--- a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.tsx@@ -1,4 +1,5 @@import type { FileEntity } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useState } from 'react'import ActionButton from '@/app/components/base/action-button'@@ -6,7 +7,6 @@ import AudioPreview from '@/app/components/base/file-uploader/audio-preview'import PdfPreview from '@/app/components/base/file-uploader/dynamic-pdf-preview'import VideoPreview from '@/app/components/base/file-uploader/video-preview'import ProgressCircle from '@/app/components/base/progress-bar/progress-circle'-import { Button } from '@/app/components/base/ui/button'import { downloadUrl } from '@/utils/download'import { formatFileSize } from '@/utils/format'import FileTypeIcon from '../file-type-icon'diff --git a/web/app/components/base/file-uploader/file-uploader-in-chat-input/index.stories.tsx b/web/app/components/base/file-uploader/file-uploader-in-chat-input/index.stories.tsxindex 7f718ca961f..538f397a11f 100644--- a/web/app/components/base/file-uploader/file-uploader-in-chat-input/index.stories.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-chat-input/index.stories.tsx@@ -1,8 +1,8 @@import type { Meta, StoryObj } from '@storybook/nextjs-vite'import type { FileEntity } from '../types'import type { FileUpload } from '@/app/components/base/features/types'+import { ToastHost } from '@langgenius/dify-ui/toast'import { useState } from 'react'-import { ToastHost } from '@/app/components/base/ui/toast'import { SupportUploadFileTypes } from '@/app/components/workflow/types'import { TransferMethod } from '@/types/app'import FileUploaderInChatInput from '.'diff --git a/web/app/components/base/file-uploader/hooks.ts b/web/app/components/base/file-uploader/hooks.tsindex 2df4b005af4..9aa70e4487f 100644--- a/web/app/components/base/file-uploader/hooks.ts+++ b/web/app/components/base/file-uploader/hooks.ts@@ -2,6 +2,7 @@ import type { ClipboardEvent } from 'react'import type { FileEntity } from './types'import type { FileUpload } from '@/app/components/base/features/types'import type { FileUploadConfigResponse } from '@/models/common'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import { produce } from 'immer'import {@@ -17,7 +18,6 @@ import {MAX_FILE_UPLOAD_LIMIT,VIDEO_SIZE_LIMIT,} from '@/app/components/base/file-uploader/constants'-import { toast } from '@/app/components/base/ui/toast'import { SupportUploadFileTypes } from '@/app/components/workflow/types'import { useParams } from '@/next/navigation'import { uploadRemoteFileInfo } from '@/service/common'diff --git a/web/app/components/base/form/components/field/number-input.tsx b/web/app/components/base/form/components/field/number-input.tsxindex 4a1a37ff605..2bc39cdfaba 100644--- a/web/app/components/base/form/components/field/number-input.tsx+++ b/web/app/components/base/form/components/field/number-input.tsx@@ -1,9 +1,7 @@+import type { NumberFieldInputProps, NumberFieldRootProps, NumberFieldSize } from '@langgenius/dify-ui/number-field'import type { ReactNode } from 'react'-import type { NumberFieldInputProps, NumberFieldRootProps, NumberFieldSize } from '../../../ui/number-field'import type { LabelProps } from '../label'import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import { useFieldContext } from '../..'import {NumberField,NumberFieldControls,@@ -12,7 +10,9 @@ import {NumberFieldIncrement,NumberFieldInput,NumberFieldUnit,-} from '../../../ui/number-field'+} from '@langgenius/dify-ui/number-field'+import * as React from 'react'+import { useFieldContext } from '../..'import Label from '../label'type NumberInputFieldProps = {diff --git a/web/app/components/base/form/components/form/actions.tsx b/web/app/components/base/form/components/form/actions.tsxindex 23081fdc20b..ea8fcbf8485 100644--- a/web/app/components/base/form/components/form/actions.tsx+++ b/web/app/components/base/form/components/form/actions.tsx@@ -1,7 +1,7 @@import type { FormType } from '../..'+import { Button } from '@langgenius/dify-ui/button'import { useStore } from '@tanstack/react-form'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { useFormContext } from '../..'export type CustomActionsProps = {diff --git a/web/app/components/base/form/hooks/__tests__/use-check-validated.spec.ts b/web/app/components/base/form/hooks/__tests__/use-check-validated.spec.tsindex cf36f47de4b..0bebab6a5b4 100644--- a/web/app/components/base/form/hooks/__tests__/use-check-validated.spec.ts+++ b/web/app/components/base/form/hooks/__tests__/use-check-validated.spec.ts@@ -5,7 +5,7 @@ import { useCheckValidated } from '../use-check-validated'const mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => mockNotify(args),},diff --git a/web/app/components/base/form/hooks/use-check-validated.ts b/web/app/components/base/form/hooks/use-check-validated.tsindex 6530b3f0be5..f7d81263efc 100644--- a/web/app/components/base/form/hooks/use-check-validated.ts+++ b/web/app/components/base/form/hooks/use-check-validated.ts@@ -1,7 +1,7 @@import type { AnyFormApi } from '@tanstack/react-form'import type { FormSchema } from '@/app/components/base/form/types'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback } from 'react'-import { toast } from '@/app/components/base/ui/toast'export const useCheckValidated = (form: AnyFormApi, FormSchemas: FormSchema[]) => {const checkValidated = useCallback(() => {diff --git a/web/app/components/base/form/index.stories.tsx b/web/app/components/base/form/index.stories.tsxindex c6d6638e3c9..a8afc4f3f39 100644--- a/web/app/components/base/form/index.stories.tsx+++ b/web/app/components/base/form/index.stories.tsx@@ -1,10 +1,10 @@import type { Meta, StoryObj } from '@storybook/nextjs-vite'import type { FormStoryRender } from '../../../../.storybook/utils/form-story-wrapper'import type { FormSchema } from './types'+import { Button } from '@langgenius/dify-ui/button'import { useStore } from '@tanstack/react-form'import { useMemo, useState } from 'react'import { PreviewMode } from '@/app/components/base/features/types'-import { Button } from '@/app/components/base/ui/button'import { TransferMethod } from '@/types/app'import { FormStoryWrapper } from '../../../../.storybook/utils/form-story-wrapper'import BaseForm from './components/base/base-form'diff --git a/web/app/components/base/image-uploader/__tests__/hooks.spec.ts b/web/app/components/base/image-uploader/__tests__/hooks.spec.tsindex f01f00b779d..f0ec9f8f735 100644--- a/web/app/components/base/image-uploader/__tests__/hooks.spec.ts+++ b/web/app/components/base/image-uploader/__tests__/hooks.spec.ts@@ -5,7 +5,7 @@ import { Resolution, TransferMethod } from '@/types/app'import { useClipboardUploader, useDraggableUploader, useImageFiles, useLocalFileUploader } from '../hooks'const mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (message: string) => mockNotify({ type: 'error', message }),},diff --git a/web/app/components/base/image-uploader/__tests__/image-preview.spec.tsx b/web/app/components/base/image-uploader/__tests__/image-preview.spec.tsxindex c019897595b..b2a2952bf83 100644--- a/web/app/components/base/image-uploader/__tests__/image-preview.spec.tsx+++ b/web/app/components/base/image-uploader/__tests__/image-preview.spec.tsx@@ -11,7 +11,7 @@ const mocks = vi.hoisted(() => ({clipboardWrite: vi.fn<(items: ClipboardItem[]) => Promise<void>>(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (...args: Parameters<typeof mocks.notify>) => mocks.notify(...args),},diff --git a/web/app/components/base/image-uploader/hooks.ts b/web/app/components/base/image-uploader/hooks.tsindex ec1b1248f18..37cd5b59958 100644--- a/web/app/components/base/image-uploader/hooks.ts+++ b/web/app/components/base/image-uploader/hooks.ts@@ -1,8 +1,8 @@import type { ClipboardEvent } from 'react'import type { ImageFile, VisionSettings } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useParams } from '@/next/navigation'import { ALLOW_FILE_EXTENSIONS, TransferMethod } from '@/types/app'import { getImageUploadErrorMessage, imageUpload } from './utils'diff --git a/web/app/components/base/image-uploader/image-link-input.tsx b/web/app/components/base/image-uploader/image-link-input.tsxindex ec041d9506b..2ba2bf1bf1a 100644--- a/web/app/components/base/image-uploader/image-link-input.tsx+++ b/web/app/components/base/image-uploader/image-link-input.tsx@@ -1,8 +1,8 @@import type { FC } from 'react'import type { ImageFile } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { TransferMethod } from '@/types/app'type ImageLinkInputProps = {diff --git a/web/app/components/base/image-uploader/image-preview.tsx b/web/app/components/base/image-uploader/image-preview.tsxindex ec240be9ec8..7cc4ec8a141 100644--- a/web/app/components/base/image-uploader/image-preview.tsx+++ b/web/app/components/base/image-uploader/image-preview.tsx@@ -1,4 +1,5 @@import type { FC } from 'react'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import { t } from 'i18next'import * as React from 'react'@@ -6,7 +7,6 @@ import { useCallback, useEffect, useRef, useState } from 'react'import { createPortal } from 'react-dom'import { useHotkeys } from 'react-hotkeys-hook'import Tooltip from '@/app/components/base/tooltip'-import { toast } from '@/app/components/base/ui/toast'import { downloadUrl } from '@/utils/download'type ImagePreviewProps = {diff --git a/web/app/components/base/inline-delete-confirm/index.tsx b/web/app/components/base/inline-delete-confirm/index.tsxindex 0dccdcf0f58..619b2c04623 100644--- a/web/app/components/base/inline-delete-confirm/index.tsx+++ b/web/app/components/base/inline-delete-confirm/index.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type InlineDeleteConfirmProps = {title?: stringdiff --git a/web/app/components/base/markdown-blocks/button.tsx b/web/app/components/base/markdown-blocks/button.tsxindex 055835b5031..99398fd6de1 100644--- a/web/app/components/base/markdown-blocks/button.tsx+++ b/web/app/components/base/markdown-blocks/button.tsx@@ -1,6 +1,6 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useChatContext } from '@/app/components/base/chat/chat/context'-import { Button } from '@/app/components/base/ui/button'import { isValidUrl } from './utils'const MarkdownButton = ({ node }: any) => {diff --git a/web/app/components/base/markdown-blocks/form.tsx b/web/app/components/base/markdown-blocks/form.tsxindex b7643c5cd5d..7c80590e248 100644--- a/web/app/components/base/markdown-blocks/form.tsx+++ b/web/app/components/base/markdown-blocks/form.tsx@@ -1,5 +1,7 @@+import type { ButtonProps } from '@langgenius/dify-ui/button'import type { Dayjs } from 'dayjs'-import type { ButtonProps } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'+import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger, SelectValue } from '@langgenius/dify-ui/select'import * as React from 'react'import { useCallback, useMemo, useState } from 'react'import { useChatContext } from '@/app/components/base/chat/chat/context'@@ -9,8 +11,6 @@ import TimePicker from '@/app/components/base/date-and-time-picker/time-picker'import { formatDateForOutput, toDayjs } from '@/app/components/base/date-and-time-picker/utils/dayjs'import Input from '@/app/components/base/input'import Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'-import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger, SelectValue } from '@/app/components/base/ui/select'enum DATA_FORMAT {TEXT = 'text',diff --git a/web/app/components/base/modal-like-wrap/index.tsx b/web/app/components/base/modal-like-wrap/index.tsxindex 8665e54941d..1c049eb5f44 100644--- a/web/app/components/base/modal-like-wrap/index.tsx+++ b/web/app/components/base/modal-like-wrap/index.tsx@@ -1,9 +1,9 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type Props = {title: stringdiff --git a/web/app/components/base/modal/index.tsx b/web/app/components/base/modal/index.tsxindex 9238f4a8cae..8b4b6174a36 100644--- a/web/app/components/base/modal/index.tsx+++ b/web/app/components/base/modal/index.tsx@@ -1,5 +1,5 @@/**- * @deprecated Use `@/app/components/base/ui/dialog` instead.+ * @deprecated Use `@langgenius/dify-ui/dialog` instead.* This component will be removed after migration is complete.* See: https://github.com/langgenius/dify/issues/32767*/diff --git a/web/app/components/base/modal/modal.tsx b/web/app/components/base/modal/modal.tsxindex 8d046adf712..10164e5f33b 100644--- a/web/app/components/base/modal/modal.tsx+++ b/web/app/components/base/modal/modal.tsx@@ -1,9 +1,10 @@/**- * @deprecated Use `@/app/components/base/ui/dialog` instead.+ * @deprecated Use `@langgenius/dify-ui/dialog` instead.* This component will be removed after migration is complete.* See: https://github.com/langgenius/dify/issues/32767*/-import type { ButtonProps } from '@/app/components/base/ui/button'+import type { ButtonProps } from '@langgenius/dify-ui/button'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { noop } from 'es-toolkit/function'import { memo } from 'react'@@ -12,7 +13,6 @@ import {PortalToFollowElem,PortalToFollowElemContent,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'type ModalProps = {onClose?: () => voiddiff --git a/web/app/components/base/notion-connector/index.tsx b/web/app/components/base/notion-connector/index.tsxindex 2187b19e8a3..8afb1a9f9f4 100644--- a/web/app/components/base/notion-connector/index.tsx+++ b/web/app/components/base/notion-connector/index.tsx@@ -1,6 +1,6 @@+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { Notion } from '../icons/src/public/common'import { Icon3Dots } from '../icons/src/vender/line/others'diff --git a/web/app/components/base/pagination/index.tsx b/web/app/components/base/pagination/index.tsxindex 815e825c8de..22335bdd111 100644--- a/web/app/components/base/pagination/index.tsx+++ b/web/app/components/base/pagination/index.tsx@@ -1,11 +1,11 @@import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowLeftLine, RiArrowRightLine } from '@remixicon/react'import { useDebounceFn } from 'ahooks'import * as React from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'import { Pagination } from './pagination'export type Props = {diff --git a/web/app/components/base/param-item/index.tsx b/web/app/components/base/param-item/index.tsxindex f5f571f6042..93eb878551d 100644--- a/web/app/components/base/param-item/index.tsx+++ b/web/app/components/base/param-item/index.tsx@@ -1,8 +1,5 @@'use client'import type { FC } from 'react'-import Switch from '@/app/components/base/switch'-import Tooltip from '@/app/components/base/tooltip'-import { Slider } from '@/app/components/base/ui/slider'import {NumberField,NumberFieldControls,@@ -10,7 +7,10 @@ import {NumberFieldGroup,NumberFieldIncrement,NumberFieldInput,-} from '../ui/number-field'+} from '@langgenius/dify-ui/number-field'+import { Slider } from '@langgenius/dify-ui/slider'+import { Switch } from '@langgenius/dify-ui/switch'+import Tooltip from '@/app/components/base/tooltip'type Props = {className?: stringdiff --git a/web/app/components/base/portal-to-follow-elem/index.tsx b/web/app/components/base/portal-to-follow-elem/index.tsxindex b3772122f87..48099c7020e 100644--- a/web/app/components/base/portal-to-follow-elem/index.tsx+++ b/web/app/components/base/portal-to-follow-elem/index.tsx@@ -5,11 +5,11 @@* See: https://github.com/langgenius/dify/issues/32767** Migration guide:- * - Tooltip → `@/app/components/base/ui/tooltip`- * - Menu/Dropdown → `@/app/components/base/ui/dropdown-menu`- * - Popover → `@/app/components/base/ui/popover`- * - Dialog/Modal → `@/app/components/base/ui/dialog`- * - Select → `@/app/components/base/ui/select`+ * - Tooltip → `@langgenius/dify-ui/tooltip`+ * - Menu/Dropdown → `@langgenius/dify-ui/dropdown-menu`+ * - Popover → `@langgenius/dify-ui/popover`+ * - Dialog/Modal → `@langgenius/dify-ui/dialog`+ * - Select → `@langgenius/dify-ui/select`*/import type { OffsetOptions, Placement } from '@floating-ui/react'import {diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.tsxindex 93e6610d12a..7511406718e 100644--- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.tsx+++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.tsx@@ -1,11 +1,11 @@import type { FormInputItem, FormInputItemDefault } from '@/app/components/workflow/nodes/human-input/types'import type { ValueSelector } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { produce } from 'immer'import * as React from 'react'import { useCallback, useEffect, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'import { InputVarType } from '@/app/components/workflow/types'import { getKeyboardKeyNameBySystem } from '@/app/components/workflow/utils'import PrePopulate from './pre-populate'diff --git a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsxindex f30970ba6d1..ecd5183a144 100644--- a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx+++ b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.tsx@@ -3,6 +3,7 @@ import type {} from './index'import type { WorkflowNodesMap } from './node'import type { NodeOutPutVar, ValueSelector, Var } from '@/app/components/workflow/types'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { mergeRegister } from '@lexical/utils'import {@@ -17,7 +18,6 @@ import {} from 'react'import { useTranslation } from 'react-i18next'import { useReactFlow, useStoreApi } from 'reactflow'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { isRagVariableVar, isSpecialVar, isSystemVar } from '@/app/components/workflow/nodes/_base/components/variable/utils'import VarFullPathPanel from '@/app/components/workflow/nodes/_base/components/variable/var-full-path-panel'import {diff --git a/web/app/components/base/select/index.tsx b/web/app/components/base/select/index.tsxindex bd9cc7af04f..5033f381c2f 100644--- a/web/app/components/base/select/index.tsx+++ b/web/app/components/base/select/index.tsx@@ -1,6 +1,6 @@'use client'/**- * @deprecated Use `@/app/components/base/ui/select` instead.+ * @deprecated Use `@langgenius/dify-ui/select` instead.* This component will be removed after migration is complete.* See: https://github.com/langgenius/dify/issues/32767*/diff --git a/web/app/components/base/switch/skeleton.tsx b/web/app/components/base/switch/skeleton.tsxdeleted file mode 100644index f9306445cb6..00000000000--- a/web/app/components/base/switch/skeleton.tsx+++ /dev/null@@ -1,41 +0,0 @@-import type { SwitchSize } from './index'-import { cn } from '@langgenius/dify-ui/cn'-import { cva } from 'class-variance-authority'--const skeletonVariants = cva(- 'bg-text-quaternary opacity-20',- {- variants: {- size: {- xs: 'h-2.5 w-3.5 rounded-xs',- sm: 'h-3 w-5 rounded-[3.5px]',- md: 'h-4 w-7 rounded-[5px]',- lg: 'h-5 w-9 rounded-md',- },- },- defaultVariants: {- size: 'md',- },- },-)--type SwitchSkeletonProps = {- 'size'?: SwitchSize- 'className'?: string- 'data-testid'?: string-}--export function SwitchSkeleton({- size = 'md',- className,- 'data-testid': dataTestid,-}: SwitchSkeletonProps) {- return (- <div- className={cn(skeletonVariants({ size }), className)}- data-testid={dataTestid}- />- )-}--SwitchSkeleton.displayName = 'SwitchSkeleton'diff --git a/web/app/components/base/tag-input/__tests__/index.spec.tsx b/web/app/components/base/tag-input/__tests__/index.spec.tsxindex 82ace7f49b3..b64f4aaab61 100644--- a/web/app/components/base/tag-input/__tests__/index.spec.tsx+++ b/web/app/components/base/tag-input/__tests__/index.spec.tsx@@ -5,7 +5,7 @@ import TagInput from '../index'const mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => mockNotify(args),},diff --git a/web/app/components/base/tag-input/__tests__/interop.spec.tsx b/web/app/components/base/tag-input/__tests__/interop.spec.tsxindex f31871b33e0..94e6d421a9d 100644--- a/web/app/components/base/tag-input/__tests__/interop.spec.tsx+++ b/web/app/components/base/tag-input/__tests__/interop.spec.tsx@@ -25,7 +25,7 @@ describe('TagInput autosize interop', () => {update: vi.fn(),promise: vi.fn(),})- vi.doMock('@/app/components/base/ui/toast', () => ({+ vi.doMock('@langgenius/dify-ui/toast', () => ({toast,}))vi.doMock('react-18-input-autosize', () => ({@@ -52,7 +52,7 @@ describe('TagInput autosize interop', () => {update: vi.fn(),promise: vi.fn(),})- vi.doMock('@/app/components/base/ui/toast', () => ({+ vi.doMock('@langgenius/dify-ui/toast', () => ({toast,}))vi.doMock('react-18-input-autosize', () => ({diff --git a/web/app/components/base/tag-input/index.tsx b/web/app/components/base/tag-input/index.tsxindex e4e3cc25282..8312a890a50 100644--- a/web/app/components/base/tag-input/index.tsx+++ b/web/app/components/base/tag-input/index.tsx@@ -1,9 +1,9 @@import type { ChangeEvent, FC, KeyboardEvent } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useState } from 'react'import _AutosizeInput from 'react-18-input-autosize'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'// CJS/ESM interop: Turbopack may resolve the module namespace object instead of the default export// eslint-disable-next-line ts/no-explicit-anyconst AutosizeInput = ('default' in (_AutosizeInput as any) ? (_AutosizeInput as any).default : _AutosizeInput) as typeof _AutosizeInputdiff --git a/web/app/components/base/tag-management/__tests__/index.spec.tsx b/web/app/components/base/tag-management/__tests__/index.spec.tsxindex d10af68ef7b..04d9bdd11f8 100644--- a/web/app/components/base/tag-management/__tests__/index.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/index.spec.tsx@@ -21,7 +21,7 @@ const { mockNotify, mockToast } = vi.hoisted(() => {return { mockNotify, mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/base/tag-management/__tests__/panel.spec.tsx b/web/app/components/base/tag-management/__tests__/panel.spec.tsxindex 4f985497832..a2ddb93745b 100644--- a/web/app/components/base/tag-management/__tests__/panel.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/panel.spec.tsx@@ -21,7 +21,7 @@ const { mockNotify, mockToast } = vi.hoisted(() => {return { mockNotify, mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/base/tag-management/__tests__/selector.spec.tsx b/web/app/components/base/tag-management/__tests__/selector.spec.tsxindex b12ed449d0f..84fa351cfa5 100644--- a/web/app/components/base/tag-management/__tests__/selector.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/selector.spec.tsx@@ -18,7 +18,7 @@ const { mockToast } = vi.hoisted(() => {return { mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/base/tag-management/__tests__/tag-item-editor.spec.tsx b/web/app/components/base/tag-management/__tests__/tag-item-editor.spec.tsxindex efad0a8b51e..2f7a65b1b48 100644--- a/web/app/components/base/tag-management/__tests__/tag-item-editor.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/tag-item-editor.spec.tsx@@ -30,7 +30,7 @@ vi.mock('@/service/tag', () => ({deleteTag: tagMocks.deleteTag,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: tagMocks.api,}))diff --git a/web/app/components/base/tag-management/filter.tsx b/web/app/components/base/tag-management/filter.tsxindex 30eba33e278..01729c43afa 100644--- a/web/app/components/base/tag-management/filter.tsx+++ b/web/app/components/base/tag-management/filter.tsx@@ -1,16 +1,16 @@import type { FC } from 'react'import type { Tag } from '@/app/components/base/tag-management/constant'import { cn } from '@langgenius/dify-ui/cn'+import {+ Popover,+ PopoverContent,+ PopoverTrigger,+} from '@langgenius/dify-ui/popover'import { useMount } from 'ahooks'import { useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import { Tag01, Tag03 } from '@/app/components/base/icons/src/vender/line/financeAndECommerce'import Input from '@/app/components/base/input'-import {- Popover,- PopoverContent,- PopoverTrigger,-} from '@/app/components/base/ui/popover'import { fetchTagList } from '@/service/tag'import { useStore as useTagStore } from './store'diff --git a/web/app/components/base/tag-management/index.stories.tsx b/web/app/components/base/tag-management/index.stories.tsxindex 3206891d5d5..6ab2fcb9269 100644--- a/web/app/components/base/tag-management/index.stories.tsx+++ b/web/app/components/base/tag-management/index.stories.tsx@@ -1,7 +1,7 @@import type { Meta, StoryObj } from '@storybook/nextjs-vite'import type { Tag } from './constant'+import { ToastHost } from '@langgenius/dify-ui/toast'import { useEffect, useRef } from 'react'-import { ToastHost } from '@/app/components/base/ui/toast'import TagManagementModal from '.'import { useStore as useTagStore } from './store'diff --git a/web/app/components/base/tag-management/index.tsx b/web/app/components/base/tag-management/index.tsxindex 8e693fb9f1c..6a050de834c 100644--- a/web/app/components/base/tag-management/index.tsx+++ b/web/app/components/base/tag-management/index.tsx@@ -1,8 +1,8 @@'use client'+import { toast } from '@langgenius/dify-ui/toast'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { toast } from '@/app/components/base/ui/toast'import { createTag, fetchTagList } from '@/service/tag'import { useStore as useTagStore } from './store'import TagItemEditor from './tag-item-editor'diff --git a/web/app/components/base/tag-management/panel.tsx b/web/app/components/base/tag-management/panel.tsxindex db0aae1b05d..3f64355c43d 100644--- a/web/app/components/base/tag-management/panel.tsx+++ b/web/app/components/base/tag-management/panel.tsx@@ -1,5 +1,6 @@import type { TagSelectorProps } from './selector'import type { Tag } from '@/app/components/base/tag-management/constant'+import { toast } from '@langgenius/dify-ui/toast'import { useUnmount } from 'ahooks'import { noop } from 'es-toolkit/function'import * as React from 'react'@@ -8,7 +9,6 @@ import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'import Divider from '@/app/components/base/divider'import Input from '@/app/components/base/input'-import { toast } from '@/app/components/base/ui/toast'import { bindTag, createTag, unBindTag } from '@/service/tag'import { useStore as useTagStore } from './store'diff --git a/web/app/components/base/tag-management/selector.tsx b/web/app/components/base/tag-management/selector.tsxindex a6d4c044131..0eb233ba4b1 100644--- a/web/app/components/base/tag-management/selector.tsx+++ b/web/app/components/base/tag-management/selector.tsx@@ -1,13 +1,13 @@import type { FC } from 'react'import type { Tag } from '@/app/components/base/tag-management/constant'import { cn } from '@langgenius/dify-ui/cn'-import { useCallback, useMemo, useState } from 'react'-import { useTranslation } from 'react-i18next'import {Popover,PopoverContent,PopoverTrigger,-} from '@/app/components/base/ui/popover'+} from '@langgenius/dify-ui/popover'+import { useCallback, useMemo, useState } from 'react'+import { useTranslation } from 'react-i18next'import { fetchTagList } from '@/service/tag'import Panel from './panel'import { useStore as useTagStore } from './store'diff --git a/web/app/components/base/tag-management/tag-item-editor.tsx b/web/app/components/base/tag-management/tag-item-editor.tsxindex 80555221e6d..777abec1390 100644--- a/web/app/components/base/tag-management/tag-item-editor.tsx+++ b/web/app/components/base/tag-management/tag-item-editor.tsx@@ -1,10 +1,5 @@import type { FC } from 'react'import type { Tag } from '@/app/components/base/tag-management/constant'-import { cn } from '@langgenius/dify-ui/cn'-import { useDebounceFn } from 'ahooks'-import { useState } from 'react'-import { useTranslation } from 'react-i18next'-import Tooltip from '@/app/components/base/tooltip'import {AlertDialog,AlertDialogActions,@@ -13,8 +8,13 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/alert-dialog'+import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'+import { useDebounceFn } from 'ahooks'+import { useState } from 'react'+import { useTranslation } from 'react-i18next'+import Tooltip from '@/app/components/base/tooltip'import { deleteTag, updateTag } from '@/service/tag'import { useStore as useTagStore } from './store'diff --git a/web/app/components/base/tag-management/tag-remove-modal.tsx b/web/app/components/base/tag-management/tag-remove-modal.tsxindex 41ac0728501..1088ca2043c 100644--- a/web/app/components/base/tag-management/tag-remove-modal.tsx+++ b/web/app/components/base/tag-management/tag-remove-modal.tsx@@ -1,12 +1,12 @@'use client'import type { Tag } from '@/app/components/base/tag-management/constant'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { noop } from 'es-toolkit/function'import { useTranslation } from 'react-i18next'import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'type TagRemoveModalProps = {show: booleandiff --git a/web/app/components/base/text-generation/__tests__/hooks.spec.ts b/web/app/components/base/text-generation/__tests__/hooks.spec.tsindex f2073f3dce7..50c68b4eab0 100644--- a/web/app/components/base/text-generation/__tests__/hooks.spec.ts+++ b/web/app/components/base/text-generation/__tests__/hooks.spec.ts@@ -5,7 +5,7 @@ import { useTextGeneration } from '../hooks'const mockNotify = vi.fn()const mockSsePost = vi.fn<(url: string, fetchOptions: { body: Record<string, unknown> }, otherOptions: IOtherOptions) => void>()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => mockNotify(args),},diff --git a/web/app/components/base/text-generation/hooks.ts b/web/app/components/base/text-generation/hooks.tsindex 0329cff110a..54dc8d8e96f 100644--- a/web/app/components/base/text-generation/hooks.ts+++ b/web/app/components/base/text-generation/hooks.ts@@ -1,6 +1,6 @@+import { toast } from '@langgenius/dify-ui/toast'import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { ssePost } from '@/service/base'export const useTextGeneration = () => {diff --git a/web/app/components/base/tooltip/index.tsx b/web/app/components/base/tooltip/index.tsxindex ab5dbf1710d..0bf7659635a 100644--- a/web/app/components/base/tooltip/index.tsx+++ b/web/app/components/base/tooltip/index.tsx@@ -1,6 +1,6 @@'use client'/**- * @deprecated Use `@/app/components/base/ui/tooltip` instead.+ * @deprecated Use `@langgenius/dify-ui/tooltip` instead.* This component will be removed after migration is complete.* See: https://github.com/langgenius/dify/issues/32767*/diff --git a/web/app/components/base/user-avatar-list/index.tsx b/web/app/components/base/user-avatar-list/index.tsxindex fc2ce60572e..c1bb340a41e 100644--- a/web/app/components/base/user-avatar-list/index.tsx+++ b/web/app/components/base/user-avatar-list/index.tsx@@ -1,7 +1,7 @@+import type { AvatarSize } from '@langgenius/dify-ui/avatar'import type { FC } from 'react'-import type { AvatarSize } from '@/app/components/base/ui/avatar'+import { AvatarFallback, AvatarImage, AvatarRoot } from '@langgenius/dify-ui/avatar'import { memo } from 'react'-import { AvatarFallback, AvatarImage, AvatarRoot } from '@/app/components/base/ui/avatar'import { getUserColor } from '@/app/components/workflow/collaboration/utils/user-color'import { useAppContext } from '@/context/app-context'diff --git a/web/app/components/billing/apps-full-in-dialog/index.tsx b/web/app/components/billing/apps-full-in-dialog/index.tsxindex e981bf74eb8..dc26c8e231c 100644--- a/web/app/components/billing/apps-full-in-dialog/index.tsx+++ b/web/app/components/billing/apps-full-in-dialog/index.tsx@@ -1,9 +1,9 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import ProgressBar from '@/app/components/billing/progress-bar'import { Plan } from '@/app/components/billing/type'import { mailToSupport } from '@/app/components/header/utils/util'diff --git a/web/app/components/billing/plan-upgrade-modal/index.tsx b/web/app/components/billing/plan-upgrade-modal/index.tsxindex f4f35ec1a4c..da599dc36c6 100644--- a/web/app/components/billing/plan-upgrade-modal/index.tsx+++ b/web/app/components/billing/plan-upgrade-modal/index.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import UpgradeBtn from '@/app/components/billing/upgrade-btn'import { useModalContext } from '@/context/modal-context'import { SquareChecklist } from '../../base/icons/src/vender/other'diff --git a/web/app/components/billing/plan/index.tsx b/web/app/components/billing/plan/index.tsxindex ee21268078a..49d4ffa779a 100644--- a/web/app/components/billing/plan/index.tsx+++ b/web/app/components/billing/plan/index.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import {RiBook2Line,RiFileEditLine,@@ -11,7 +12,6 @@ import * as React from 'react'import { useEffect } from 'react'import { useTranslation } from 'react-i18next'import { ApiAggregate, TriggerAll } from '@/app/components/base/icons/src/vender/workflow'-import { Button } from '@/app/components/base/ui/button'import UsageInfo from '@/app/components/billing/usage-info'import { EDUCATION_VERIFYING_LOCALSTORAGE_ITEM } from '@/app/education-apply/constants'import VerifyStateModal from '@/app/education-apply/verify-state-modal'diff --git a/web/app/components/billing/pricing/__tests__/dialog.spec.tsx b/web/app/components/billing/pricing/__tests__/dialog.spec.tsxindex c832e52fb2b..c1ed3898de4 100644--- a/web/app/components/billing/pricing/__tests__/dialog.spec.tsx+++ b/web/app/components/billing/pricing/__tests__/dialog.spec.tsx@@ -16,7 +16,7 @@ type DialogProps = {let latestOnOpenChange: DialogProps['onOpenChange']-vi.mock('@/app/components/base/ui/dialog', () => ({+vi.mock('@langgenius/dify-ui/dialog', () => ({Dialog: ({ children, onOpenChange }: DialogProps) => {latestOnOpenChange = onOpenChangereturn <div data-testid="dialog">{children}</div>diff --git a/web/app/components/billing/pricing/__tests__/header.spec.tsx b/web/app/components/billing/pricing/__tests__/header.spec.tsxindex cb8991ff421..7f156ad7a3a 100644--- a/web/app/components/billing/pricing/__tests__/header.spec.tsx+++ b/web/app/components/billing/pricing/__tests__/header.spec.tsx@@ -1,6 +1,6 @@+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import { Dialog, DialogContent } from '@/app/components/base/ui/dialog'import Header from '../header'function renderHeader(onClose: () => void) {diff --git a/web/app/components/billing/pricing/header.tsx b/web/app/components/billing/pricing/header.tsxindex 8ece685a58a..1ebcae622e1 100644--- a/web/app/components/billing/pricing/header.tsx+++ b/web/app/components/billing/pricing/header.tsx@@ -1,8 +1,8 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { DialogDescription, DialogTitle } from '@langgenius/dify-ui/dialog'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { DialogDescription, DialogTitle } from '@/app/components/base/ui/dialog'import DifyLogo from '../../base/logo/dify-logo'import styles from './header.module.css'diff --git a/web/app/components/billing/pricing/index.tsx b/web/app/components/billing/pricing/index.tsxindex 6b943bde7d8..cd88be5fb39 100644--- a/web/app/components/billing/pricing/index.tsx+++ b/web/app/components/billing/pricing/index.tsx@@ -1,9 +1,7 @@'use client'import type { FC } from 'react'import type { Category } from './types'-import * as React from 'react'-import { useState } from 'react'-import { Dialog, DialogContent } from '@/app/components/base/ui/dialog'+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'import {ScrollAreaContent,ScrollAreaCorner,@@ -11,7 +9,9 @@ import {ScrollAreaScrollbar,ScrollAreaThumb,ScrollAreaViewport,-} from '@/app/components/base/ui/scroll-area'+} from '@langgenius/dify-ui/scroll-area'+import * as React from 'react'+import { useState } from 'react'import { useAppContext } from '@/context/app-context'import { useGetPricingPageLanguage } from '@/context/i18n'import { useProviderContext } from '@/context/provider-context'diff --git a/web/app/components/billing/pricing/plan-switcher/plan-range-switcher.tsx b/web/app/components/billing/pricing/plan-switcher/plan-range-switcher.tsxindex 55700385d97..163a315e2f4 100644--- a/web/app/components/billing/pricing/plan-switcher/plan-range-switcher.tsx+++ b/web/app/components/billing/pricing/plan-switcher/plan-range-switcher.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'+import { Switch } from '@langgenius/dify-ui/switch'import * as React from 'react'import { useTranslation } from 'react-i18next'-import Switch from '../../../base/switch'export enum PlanRange {monthly = 'monthly',diff --git a/web/app/components/billing/pricing/plans/cloud-plan-item/__tests__/index.spec.tsx b/web/app/components/billing/pricing/plans/cloud-plan-item/__tests__/index.spec.tsxindex a4b8888b276..cb83fdc3660 100644--- a/web/app/components/billing/pricing/plans/cloud-plan-item/__tests__/index.spec.tsx+++ b/web/app/components/billing/pricing/plans/cloud-plan-item/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import type { Mock } from 'vitest'+import { toast, ToastHost } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import * as React from 'react'-import { toast, ToastHost } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { useAsyncWindowOpen } from '@/hooks/use-async-window-open'import { fetchSubscriptionUrls } from '@/service/billing'diff --git a/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx b/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsxindex 99d956ba90e..53d5025f087 100644--- a/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx+++ b/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'import type { BasicPlan } from '../../../type'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { useAsyncWindowOpen } from '@/hooks/use-async-window-open'import { fetchSubscriptionUrls } from '@/service/billing'diff --git a/web/app/components/billing/pricing/plans/self-hosted-plan-item/__tests__/index.spec.tsx b/web/app/components/billing/pricing/plans/self-hosted-plan-item/__tests__/index.spec.tsxindex 103b1880465..1a2a8b10a13 100644--- a/web/app/components/billing/pricing/plans/self-hosted-plan-item/__tests__/index.spec.tsx+++ b/web/app/components/billing/pricing/plans/self-hosted-plan-item/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import type { Mock } from 'vitest'+import { toast, ToastHost } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import { toast, ToastHost } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { contactSalesUrl, getStartedWithCommunityUrl, getWithPremiumUrl } from '../../../../config'import { SelfHostedPlan } from '../../../../type'diff --git a/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsx b/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsxindex fa6e9a45c97..8dee91d4a26 100644--- a/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsx+++ b/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { Azure, GoogleCloud } from '@/app/components/base/icons/src/public/billing'-import { toast } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { contactSalesUrl, getStartedWithCommunityUrl, getWithPremiumUrl } from '../../../config'import { SelfHostedPlan } from '../../../type'diff --git a/web/app/components/billing/upgrade-btn/index.tsx b/web/app/components/billing/upgrade-btn/index.tsxindex 510ab4c18fe..5eb1eb1d7fe 100644--- a/web/app/components/billing/upgrade-btn/index.tsx+++ b/web/app/components/billing/upgrade-btn/index.tsx@@ -1,10 +1,10 @@'use client'import type { CSSProperties, FC } from 'react'import type { I18nKeysWithPrefix } from '@/types/i18n'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import { SparklesSoft } from '@/app/components/base/icons/src/public/common'-import { Button } from '@/app/components/base/ui/button'import { useModalContext } from '@/context/modal-context'import PremiumBadge from '../../base/premium-badge'diff --git a/web/app/components/custom/custom-page/__tests__/index.spec.tsx b/web/app/components/custom/custom-page/__tests__/index.spec.tsxindex 5514d21b502..d6cc15ed2b6 100644--- a/web/app/components/custom/custom-page/__tests__/index.spec.tsx+++ b/web/app/components/custom/custom-page/__tests__/index.spec.tsx@@ -47,7 +47,7 @@ vi.mock('@/context/app-context', async (importOriginal) => {vi.mock('@/context/global-public-context', () => ({useGlobalPublicStore: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/custom/custom-web-app-brand/components/chat-preview-card.tsx b/web/app/components/custom/custom-web-app-brand/components/chat-preview-card.tsxindex c92ef14c9ff..1ea03c7bc68 100644--- a/web/app/components/custom/custom-web-app-brand/components/chat-preview-card.tsx+++ b/web/app/components/custom/custom-web-app-brand/components/chat-preview-card.tsx@@ -1,5 +1,5 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'-import { Button } from '@/app/components/base/ui/button'import PoweredByBrand from './powered-by-brand'type ChatPreviewCardProps = {diff --git a/web/app/components/custom/custom-web-app-brand/components/workflow-preview-card.tsx b/web/app/components/custom/custom-web-app-brand/components/workflow-preview-card.tsxindex 0b9b61d94c3..b4f30827bc2 100644--- a/web/app/components/custom/custom-web-app-brand/components/workflow-preview-card.tsx+++ b/web/app/components/custom/custom-web-app-brand/components/workflow-preview-card.tsx@@ -1,5 +1,5 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'-import { Button } from '@/app/components/base/ui/button'import PoweredByBrand from './powered-by-brand'type WorkflowPreviewCardProps = {diff --git a/web/app/components/custom/custom-web-app-brand/hooks/__tests__/use-web-app-brand.spec.tsx b/web/app/components/custom/custom-web-app-brand/hooks/__tests__/use-web-app-brand.spec.tsxindex a2730ffd27a..3ca7c34b846 100644--- a/web/app/components/custom/custom-web-app-brand/hooks/__tests__/use-web-app-brand.spec.tsx+++ b/web/app/components/custom/custom-web-app-brand/hooks/__tests__/use-web-app-brand.spec.tsx@@ -33,7 +33,7 @@ const { mockNotify, mockToast } = vi.hoisted(() => {return { mockNotify, mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))vi.mock('@/service/common', () => ({diff --git a/web/app/components/custom/custom-web-app-brand/hooks/use-web-app-brand.ts b/web/app/components/custom/custom-web-app-brand/hooks/use-web-app-brand.tsindex 44810de1fda..145e7ee806c 100644--- a/web/app/components/custom/custom-web-app-brand/hooks/use-web-app-brand.ts+++ b/web/app/components/custom/custom-web-app-brand/hooks/use-web-app-brand.ts@@ -1,8 +1,8 @@import type { ChangeEvent } from 'react'+import { toast } from '@langgenius/dify-ui/toast'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { getImageUploadErrorMessage, imageUpload } from '@/app/components/base/image-uploader/utils'-import { toast } from '@/app/components/base/ui/toast'import { Plan } from '@/app/components/billing/type'import { useAppContext } from '@/context/app-context'import { useGlobalPublicStore } from '@/context/global-public-context'diff --git a/web/app/components/custom/custom-web-app-brand/index.tsx b/web/app/components/custom/custom-web-app-brand/index.tsxindex 5dbb76f8c60..53e6ff36ec0 100644--- a/web/app/components/custom/custom-web-app-brand/index.tsx+++ b/web/app/components/custom/custom-web-app-brand/index.tsx@@ -1,8 +1,8 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import Switch from '@/app/components/base/switch'-import { Button } from '@/app/components/base/ui/button'import ChatPreviewCard from './components/chat-preview-card'import WorkflowPreviewCard from './components/workflow-preview-card'import useWebAppBrand from './hooks/use-web-app-brand'diff --git a/web/app/components/datasets/common/document-status-with-action/__tests__/auto-disabled-document.spec.tsx b/web/app/components/datasets/common/document-status-with-action/__tests__/auto-disabled-document.spec.tsxindex fcaca86e89d..ba058860d3a 100644--- a/web/app/components/datasets/common/document-status-with-action/__tests__/auto-disabled-document.spec.tsx+++ b/web/app/components/datasets/common/document-status-with-action/__tests__/auto-disabled-document.spec.tsx@@ -1,6 +1,6 @@+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import { toast } from '@/app/components/base/ui/toast'import { useAutoDisabledDocuments } from '@/service/knowledge/use-document'import AutoDisabledDocument from '../auto-disabled-document'@@ -30,7 +30,7 @@ vi.mock('@/service/knowledge/use-document', () => ({useInvalidDisabledDocument: vi.fn(() => mockInvalidDisabledDocument),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: mockToastSuccess,},diff --git a/web/app/components/datasets/common/document-status-with-action/auto-disabled-document.tsx b/web/app/components/datasets/common/document-status-with-action/auto-disabled-document.tsxindex c6c7e03bd1c..c150ac823f8 100644--- a/web/app/components/datasets/common/document-status-with-action/auto-disabled-document.tsx+++ b/web/app/components/datasets/common/document-status-with-action/auto-disabled-document.tsx@@ -1,9 +1,9 @@'use client'import type { FC } from 'react'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useAutoDisabledDocuments, useDocumentEnable, useInvalidDisabledDocument } from '@/service/knowledge/use-document'import StatusWithAction from './status-with-action'diff --git a/web/app/components/datasets/common/image-previewer/index.tsx b/web/app/components/datasets/common/image-previewer/index.tsxindex 2cc51a3be5d..42b4ce33a9f 100644--- a/web/app/components/datasets/common/image-previewer/index.tsx+++ b/web/app/components/datasets/common/image-previewer/index.tsx@@ -1,9 +1,9 @@+import { Button } from '@langgenius/dify-ui/button'import { RiArrowLeftLine, RiArrowRightLine, RiCloseLine, RiRefreshLine } from '@remixicon/react'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { createPortal } from 'react-dom'import { useHotkeys } from 'react-hotkeys-hook'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'import { formatFileSize } from '@/utils/format'type CachedImage = {diff --git a/web/app/components/datasets/common/image-uploader/hooks/__tests__/use-upload.spec.tsx b/web/app/components/datasets/common/image-uploader/hooks/__tests__/use-upload.spec.tsxindex 47a29fcfa17..53354deede7 100644--- a/web/app/components/datasets/common/image-uploader/hooks/__tests__/use-upload.spec.tsx+++ b/web/app/components/datasets/common/image-uploader/hooks/__tests__/use-upload.spec.tsx@@ -1,9 +1,9 @@import type { PropsWithChildren } from 'react'import type { FileEntity } from '../../types'+import { toast } from '@langgenius/dify-ui/toast'import { act, fireEvent, render, renderHook, screen, waitFor } from '@testing-library/react'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import { toast } from '@/app/components/base/ui/toast'import { FileContextProvider } from '../../store'import { useUpload } from '../use-upload'@@ -21,7 +21,7 @@ vi.mock('@/service/use-common', () => ({})),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,},diff --git a/web/app/components/datasets/common/image-uploader/hooks/use-upload.ts b/web/app/components/datasets/common/image-uploader/hooks/use-upload.tsindex 2c8bc611dc8..d07c0952fb4 100644--- a/web/app/components/datasets/common/image-uploader/hooks/use-upload.ts+++ b/web/app/components/datasets/common/image-uploader/hooks/use-upload.ts@@ -1,10 +1,10 @@import type { FileEntity, FileUploadConfig } from '../types'+import { toast } from '@langgenius/dify-ui/toast'import { produce } from 'immer'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { v4 as uuid4 } from 'uuid'import { fileUpload, getFileUploadErrorMessage } from '@/app/components/base/file-uploader/utils'-import { toast } from '@/app/components/base/ui/toast'import { useFileUploadConfig } from '@/service/use-common'import { ACCEPT_TYPES } from '../constants'import { useFileStore } from '../store'diff --git a/web/app/components/datasets/common/image-uploader/image-uploader-in-chunk/image-item.tsx b/web/app/components/datasets/common/image-uploader/image-uploader-in-chunk/image-item.tsxindex e02c29399e8..af405b63019 100644--- a/web/app/components/datasets/common/image-uploader/image-uploader-in-chunk/image-item.tsx+++ b/web/app/components/datasets/common/image-uploader/image-uploader-in-chunk/image-item.tsx@@ -1,4 +1,5 @@import type { FileEntity } from '../types'+import { Button } from '@langgenius/dify-ui/button'import {RiCloseLine,} from '@remixicon/react'@@ -9,7 +10,6 @@ import {import FileImageRender from '@/app/components/base/file-uploader/file-image-render'import { ReplayLine } from '@/app/components/base/icons/src/vender/other'import ProgressCircle from '@/app/components/base/progress-bar/progress-circle'-import { Button } from '@/app/components/base/ui/button'import { fileIsUploaded } from '../utils'type ImageItemProps = {diff --git a/web/app/components/datasets/common/image-uploader/image-uploader-in-retrieval-testing/image-item.tsx b/web/app/components/datasets/common/image-uploader/image-uploader-in-retrieval-testing/image-item.tsxindex 9e5c044e77b..49c95852be2 100644--- a/web/app/components/datasets/common/image-uploader/image-uploader-in-retrieval-testing/image-item.tsx+++ b/web/app/components/datasets/common/image-uploader/image-uploader-in-retrieval-testing/image-item.tsx@@ -1,4 +1,5 @@import type { FileEntity } from '../types'+import { Button } from '@langgenius/dify-ui/button'import {RiCloseLine,} from '@remixicon/react'@@ -9,7 +10,6 @@ import {import FileImageRender from '@/app/components/base/file-uploader/file-image-render'import { ReplayLine } from '@/app/components/base/icons/src/vender/other'import ProgressCircle from '@/app/components/base/progress-bar/progress-circle'-import { Button } from '@/app/components/base/ui/button'import { fileIsUploaded } from '../utils'type ImageItemProps = {diff --git a/web/app/components/datasets/common/retrieval-param-config/__tests__/index.spec.tsx b/web/app/components/datasets/common/retrieval-param-config/__tests__/index.spec.tsxindex 6566aa5951e..1b208c549d0 100644--- a/web/app/components/datasets/common/retrieval-param-config/__tests__/index.spec.tsx+++ b/web/app/components/datasets/common/retrieval-param-config/__tests__/index.spec.tsx@@ -5,7 +5,7 @@ import { RETRIEVE_METHOD } from '@/types/app'import RetrievalParamConfig from '../index'const mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (message: string) => mockNotify(message),},@@ -122,8 +122,8 @@ vi.mock('@/app/components/base/radio-card', () => ({),}))-vi.mock('@/app/components/base/switch', () => ({- default: ({ checked, onCheckedChange }: { checked: boolean, onCheckedChange?: (v: boolean) => void }) => (+vi.mock('@langgenius/dify-ui/switch', () => ({+ Switch: ({ checked, onCheckedChange }: { checked: boolean, onCheckedChange?: (v: boolean) => void }) => (<buttondata-testid="rerank-switch"data-checked={checked}diff --git a/web/app/components/datasets/common/retrieval-param-config/index.tsx b/web/app/components/datasets/common/retrieval-param-config/index.tsxindex 9f227baa227..8514e1fae2e 100644--- a/web/app/components/datasets/common/retrieval-param-config/index.tsx+++ b/web/app/components/datasets/common/retrieval-param-config/index.tsx@@ -3,6 +3,8 @@ import type { FC } from 'react'import type { RetrievalConfig } from '@/types/app'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useMemo } from 'react'import { useTranslation } from 'react-i18next'@@ -11,9 +13,7 @@ import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alerimport ScoreThresholdItem from '@/app/components/base/param-item/score-threshold-item'import TopKItem from '@/app/components/base/param-item/top-k-item'import RadioCard from '@/app/components/base/radio-card'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'-import { toast } from '@/app/components/base/ui/toast'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useCurrentProviderAndModel, useModelListAndDefaultModel } from '@/app/components/header/account-setting/model-provider-page/hooks'import ModelSelector from '@/app/components/header/account-setting/model-provider-page/model-selector'diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/__tests__/index.spec.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/__tests__/index.spec.tsxindex 7719c5b7443..b5c73f34228 100644--- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/__tests__/index.spec.tsx+++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/__tests__/index.spec.tsx@@ -52,7 +52,7 @@ const toastMocks = vi.hoisted(() => {}})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: toastMocks.api,}))diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/__tests__/uploader.spec.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/__tests__/uploader.spec.tsxindex f553f491e58..f4263ab4394 100644--- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/__tests__/uploader.spec.tsx+++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/__tests__/uploader.spec.tsx@@ -16,7 +16,7 @@ const { mockToast } = vi.hoisted(() => {return { mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/dsl-confirm-modal.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/dsl-confirm-modal.tsxindex 59ba840a070..d0c97e185c8 100644--- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/dsl-confirm-modal.tsx+++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/dsl-confirm-modal.tsx@@ -1,6 +1,6 @@+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'type DSLConfirmModalProps = {versions?: {diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/hooks/__tests__/use-dsl-import.spec.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/hooks/__tests__/use-dsl-import.spec.tsxindex 2a0f7f2cf07..b95fa4d5dbf 100644--- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/hooks/__tests__/use-dsl-import.spec.tsx+++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/hooks/__tests__/use-dsl-import.spec.tsx@@ -49,7 +49,7 @@ const toastMocks = vi.hoisted(() => {}})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: toastMocks.api,}))diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/hooks/use-dsl-import.ts b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/hooks/use-dsl-import.tsindex 992d0526bee..e085ffe1bcd 100644--- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/hooks/use-dsl-import.ts+++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/hooks/use-dsl-import.ts@@ -1,8 +1,8 @@'use client'+import { toast } from '@langgenius/dify-ui/toast'import { useDebounceFn } from 'ahooks'import { useCallback, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks'import { DSLImportMode, DSLImportStatus } from '@/models/app'import { useRouter } from '@/next/navigation'diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsxindex ab311bd6992..4f5b5c23fdf 100644--- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx+++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx@@ -1,10 +1,10 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { useKeyPress } from 'ahooks'import { noop } from 'es-toolkit/function'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import DSLConfirmModal from './dsl-confirm-modal'import Header from './header'import { CreateFromDSLModalTab, useDSLImport } from './hooks/use-dsl-import'diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/uploader.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/uploader.tsxindex 69b8d07ce8f..f0499c69651 100644--- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/uploader.tsx+++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/uploader.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiDeleteBinLine, RiNodeTree, RiUploadCloud2Line } from '@remixicon/react'import * as React from 'react'import { useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'-import { toast } from '@/app/components/base/ui/toast'import { formatFileSize } from '@/utils/format'type Props = {diff --git a/web/app/components/datasets/create-from-pipeline/header.tsx b/web/app/components/datasets/create-from-pipeline/header.tsxindex bc34c79d383..7b680a1e94a 100644--- a/web/app/components/datasets/create-from-pipeline/header.tsx+++ b/web/app/components/datasets/create-from-pipeline/header.tsx@@ -1,7 +1,7 @@+import { Button } from '@langgenius/dify-ui/button'import { RiArrowLeftLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import Link from '@/next/link'const Header = () => {diff --git a/web/app/components/datasets/create-from-pipeline/list/__tests__/create-card.spec.tsx b/web/app/components/datasets/create-from-pipeline/list/__tests__/create-card.spec.tsxindex 773e7e7f748..57f6b008191 100644--- a/web/app/components/datasets/create-from-pipeline/list/__tests__/create-card.spec.tsx+++ b/web/app/components/datasets/create-from-pipeline/list/__tests__/create-card.spec.tsx@@ -18,8 +18,8 @@ const { mockToastSuccess, mockToastError } = vi.hoisted(() => ({mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/datasets/create-from-pipeline/list/create-card.tsx b/web/app/components/datasets/create-from-pipeline/list/create-card.tsxindex 3d75a31a3b4..25f538c1c20 100644--- a/web/app/components/datasets/create-from-pipeline/list/create-card.tsx+++ b/web/app/components/datasets/create-from-pipeline/list/create-card.tsx@@ -1,9 +1,9 @@+import { toast } from '@langgenius/dify-ui/toast'import { RiAddCircleLine } from '@remixicon/react'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { trackEvent } from '@/app/components/base/amplitude'-import { toast } from '@/app/components/base/ui/toast'import { useRouter } from '@/next/navigation'import { useCreatePipelineDataset } from '@/service/knowledge/use-create-dataset'import { useInvalidDatasetList } from '@/service/knowledge/use-dataset'diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/__tests__/edit-pipeline-info.spec.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/__tests__/edit-pipeline-info.spec.tsxindex d7f990aa822..f0867545cc5 100644--- a/web/app/components/datasets/create-from-pipeline/list/template-card/__tests__/edit-pipeline-info.spec.tsx+++ b/web/app/components/datasets/create-from-pipeline/list/template-card/__tests__/edit-pipeline-info.spec.tsx@@ -18,8 +18,8 @@ const { mockToastError } = vi.hoisted(() => ({mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/__tests__/index.spec.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/__tests__/index.spec.tsxindex 43c20234373..bcf2c068ef1 100644--- a/web/app/components/datasets/create-from-pipeline/list/template-card/__tests__/index.spec.tsx+++ b/web/app/components/datasets/create-from-pipeline/list/template-card/__tests__/index.spec.tsx@@ -19,8 +19,8 @@ const { mockToastSuccess, mockToastError } = vi.hoisted(() => ({mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/actions.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/actions.tsxindex af366b0188f..34b0673c599 100644--- a/web/app/components/datasets/create-from-pipeline/list/template-card/actions.tsx+++ b/web/app/components/datasets/create-from-pipeline/list/template-card/actions.tsx@@ -1,12 +1,12 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import {DropdownMenu,DropdownMenuContent,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import * as React from 'react'+import { useTranslation } from 'react-i18next'import Operations from './operations'type ActionsProps = {diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/details/index.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/details/index.tsxindex aa3b4b7b5be..22866b0b9ed 100644--- a/web/app/components/datasets/create-from-pipeline/list/template-card/details/index.tsx+++ b/web/app/components/datasets/create-from-pipeline/list/template-card/details/index.tsx@@ -1,4 +1,5 @@import type { AppIconType } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { RiAddLine, RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useMemo } from 'react'@@ -6,7 +7,6 @@ import { useTranslation } from 'react-i18next'import AppIcon from '@/app/components/base/app-icon'import Loading from '@/app/components/base/loading'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import WorkflowPreview from '@/app/components/workflow/workflow-preview'import { usePipelineTemplateById } from '@/service/use-pipeline'import ChunkStructureCard from './chunk-structure-card'diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/edit-pipeline-info.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/edit-pipeline-info.tsxindex 73f71231466..2cf27821857 100644--- a/web/app/components/datasets/create-from-pipeline/list/template-card/edit-pipeline-info.tsx+++ b/web/app/components/datasets/create-from-pipeline/list/template-card/edit-pipeline-info.tsx@@ -1,5 +1,7 @@import type { AppIconSelection } from '@/app/components/base/app-icon-picker'import type { PipelineTemplate } from '@/models/pipeline'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useRef, useState } from 'react'@@ -8,8 +10,6 @@ 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 Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useInvalidCustomizedTemplateList, useUpdateTemplateInfo } from '@/service/use-pipeline'type EditPipelineInfoProps = {diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsxindex 5fa3511e7c1..03bda31f1fe 100644--- a/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx+++ b/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx@@ -1,9 +1,4 @@import type { PipelineTemplate } from '@/models/pipeline'-import * as React from 'react'-import { useCallback, useState } from 'react'-import { useTranslation } from 'react-i18next'-import { trackEvent } from '@/app/components/base/amplitude'-import Modal from '@/app/components/base/modal'import {AlertDialog,AlertDialogActions,@@ -12,8 +7,13 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/alert-dialog'+import { toast } from '@langgenius/dify-ui/toast'+import * as React from 'react'+import { useCallback, useState } from 'react'+import { useTranslation } from 'react-i18next'+import { trackEvent } from '@/app/components/base/amplitude'+import Modal from '@/app/components/base/modal'import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks'import { useRouter } from '@/next/navigation'import { useCreatePipelineDatasetFromCustomized } from '@/service/knowledge/use-create-dataset'diff --git a/web/app/components/datasets/create/embedding-process/index.tsx b/web/app/components/datasets/create/embedding-process/index.tsxindex 93840efc9ef..bb577a8dd20 100644--- a/web/app/components/datasets/create/embedding-process/index.tsx+++ b/web/app/components/datasets/create/embedding-process/index.tsx@@ -1,6 +1,7 @@import type { FC } from 'react'import type { FullDocumentDetail } from '@/models/datasets'import type { RETRIEVE_METHOD } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import {RiArrowRightLine,RiLoader2Fill,@@ -9,7 +10,6 @@ import {import { useMemo } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import { Button } from '@/app/components/base/ui/button'import { Plan } from '@/app/components/billing/type'import { useProviderContext } from '@/context/provider-context'import { useDatasetApiAccessUrl } from '@/hooks/use-api-access-url'diff --git a/web/app/components/datasets/create/empty-dataset-creation-modal/__tests__/index.spec.tsx b/web/app/components/datasets/create/empty-dataset-creation-modal/__tests__/index.spec.tsxindex 8b8e0a67698..a9b91fb1bcc 100644--- a/web/app/components/datasets/create/empty-dataset-creation-modal/__tests__/index.spec.tsx+++ b/web/app/components/datasets/create/empty-dataset-creation-modal/__tests__/index.spec.tsx@@ -18,7 +18,7 @@ const { mockNotify, mockToast } = vi.hoisted(() => {return { mockNotify, mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx b/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsxindex 581082ca75c..fdb032b1ef7 100644--- a/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx+++ b/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx@@ -1,13 +1,13 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { trackEvent } from '@/app/components/base/amplitude'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useRouter } from '@/next/navigation'import { createEmptyDataset } from '@/service/datasets'import { useInvalidDatasetList } from '@/service/knowledge/use-dataset'diff --git a/web/app/components/datasets/create/file-uploader/hooks/__tests__/use-file-upload.spec.tsx b/web/app/components/datasets/create/file-uploader/hooks/__tests__/use-file-upload.spec.tsxindex bde599320c3..74cd91c6d0a 100644--- a/web/app/components/datasets/create/file-uploader/hooks/__tests__/use-file-upload.spec.tsx+++ b/web/app/components/datasets/create/file-uploader/hooks/__tests__/use-file-upload.spec.tsx@@ -10,7 +10,7 @@ import { useFileUpload } from '../use-file-upload'// Mock notify functionconst mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (message: string) => mockNotify({ type: 'error', message }),},diff --git a/web/app/components/datasets/create/file-uploader/hooks/use-file-upload.ts b/web/app/components/datasets/create/file-uploader/hooks/use-file-upload.tsindex 05827d0a9ec..8345d11d291 100644--- a/web/app/components/datasets/create/file-uploader/hooks/use-file-upload.ts+++ b/web/app/components/datasets/create/file-uploader/hooks/use-file-upload.ts@@ -1,10 +1,10 @@'use client'import type { RefObject } from 'react'import type { CustomFile as File, FileItem } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { getFileUploadErrorMessage } from '@/app/components/base/file-uploader/utils'-import { toast } from '@/app/components/base/ui/toast'import { IS_CE_EDITION } from '@/config'import { useLocale } from '@/context/i18n'import { LanguagesSupported } from '@/i18n-config/language'diff --git a/web/app/components/datasets/create/step-one/components/next-step-button.tsx b/web/app/components/datasets/create/step-one/components/next-step-button.tsxindex 9a343ae7454..10da1b47f7d 100644--- a/web/app/components/datasets/create/step-one/components/next-step-button.tsx+++ b/web/app/components/datasets/create/step-one/components/next-step-button.tsx@@ -1,8 +1,8 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowRightLine } from '@remixicon/react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type NextStepButtonProps = {disabled: booleandiff --git a/web/app/components/datasets/create/step-two/components/general-chunking-options.tsx b/web/app/components/datasets/create/step-two/components/general-chunking-options.tsxindex c3e506fc020..e2be96da86c 100644--- a/web/app/components/datasets/create/step-two/components/general-chunking-options.tsx+++ b/web/app/components/datasets/create/step-two/components/general-chunking-options.tsx@@ -2,6 +2,7 @@import type { FC } from 'react'import type { PreProcessingRule, SummaryIndexSetting as SummaryIndexSettingType } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import {RiAlertFill,RiSearchEyeLine,@@ -10,7 +11,6 @@ import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'import Divider from '@/app/components/base/divider'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import SummaryIndexSetting from '@/app/components/datasets/settings/summary-index-setting'import { IS_CE_EDITION } from '@/config'import { ChunkingMode } from '@/models/datasets'diff --git a/web/app/components/datasets/create/step-two/components/indexing-mode-section.tsx b/web/app/components/datasets/create/step-two/components/indexing-mode-section.tsxindex 156cb922b33..1639df2320e 100644--- a/web/app/components/datasets/create/step-two/components/indexing-mode-section.tsx+++ b/web/app/components/datasets/create/step-two/components/indexing-mode-section.tsx@@ -3,6 +3,7 @@import type { FC } from 'react'import type { DefaultModel, Model } from '@/app/components/header/account-setting/model-provider-page/declarations'import type { RetrievalConfig } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useTranslation } from 'react-i18next'import Badge from '@/app/components/base/badge'@@ -10,7 +11,6 @@ import CustomDialog from '@/app/components/base/dialog'import Divider from '@/app/components/base/divider'import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import EconomicalRetrievalMethodConfig from '@/app/components/datasets/common/economical-retrieval-method-config'import RetrievalMethodConfig from '@/app/components/datasets/common/retrieval-method-config'import ModelSelector from '@/app/components/header/account-setting/model-provider-page/model-selector'diff --git a/web/app/components/datasets/create/step-two/components/inputs.tsx b/web/app/components/datasets/create/step-two/components/inputs.tsxindex 4733852d19b..12af1de1aab 100644--- a/web/app/components/datasets/create/step-two/components/inputs.tsx+++ b/web/app/components/datasets/create/step-two/components/inputs.tsx@@ -1,10 +1,6 @@+import type { NumberFieldInputProps, NumberFieldRootProps, NumberFieldSize } from '@langgenius/dify-ui/number-field'import type { FC, PropsWithChildren, ReactNode } from 'react'import type { InputProps } from '@/app/components/base/input'-import type { NumberFieldInputProps, NumberFieldRootProps, NumberFieldSize } from '@/app/components/base/ui/number-field'-import { useRef, useState } from 'react'-import { useTranslation } from 'react-i18next'-import Input from '@/app/components/base/input'-import Tooltip from '@/app/components/base/tooltip'import {NumberField,NumberFieldControls,@@ -13,7 +9,11 @@ import {NumberFieldIncrement,NumberFieldInput,NumberFieldUnit,-} from '@/app/components/base/ui/number-field'+} from '@langgenius/dify-ui/number-field'+import { useRef, useState } from 'react'+import { useTranslation } from 'react-i18next'+import Input from '@/app/components/base/input'+import Tooltip from '@/app/components/base/tooltip'import { env } from '@/env'const TextLabel: FC<PropsWithChildren> = (props) => {diff --git a/web/app/components/datasets/create/step-two/components/parent-child-options.tsx b/web/app/components/datasets/create/step-two/components/parent-child-options.tsxindex e00a9b28805..d3f0509e932 100644--- a/web/app/components/datasets/create/step-two/components/parent-child-options.tsx+++ b/web/app/components/datasets/create/step-two/components/parent-child-options.tsx@@ -3,13 +3,13 @@import type { FC } from 'react'import type { ParentChildConfig } from '../hooks'import type { ParentMode, PreProcessingRule, SummaryIndexSetting as SummaryIndexSettingType } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import { RiSearchEyeLine } from '@remixicon/react'import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'import Divider from '@/app/components/base/divider'import { ParentChildChunk } from '@/app/components/base/icons/src/vender/knowledge'import RadioCard from '@/app/components/base/radio-card'-import { Button } from '@/app/components/base/ui/button'import SummaryIndexSetting from '@/app/components/datasets/settings/summary-index-setting'import { IS_CE_EDITION } from '@/config'import { ChunkingMode } from '@/models/datasets'diff --git a/web/app/components/datasets/create/step-two/components/step-two-footer.tsx b/web/app/components/datasets/create/step-two/components/step-two-footer.tsxindex 37f15ecd9fc..768ed906ae2 100644--- a/web/app/components/datasets/create/step-two/components/step-two-footer.tsx+++ b/web/app/components/datasets/create/step-two/components/step-two-footer.tsx@@ -1,9 +1,9 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowLeftLine } from '@remixicon/react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type StepTwoFooterProps = {isSetting?: booleandiff --git a/web/app/components/datasets/create/step-two/hooks/__tests__/use-document-creation.spec.ts b/web/app/components/datasets/create/step-two/hooks/__tests__/use-document-creation.spec.tsindex 7d8cde264b3..52099668ec6 100644--- a/web/app/components/datasets/create/step-two/hooks/__tests__/use-document-creation.spec.ts+++ b/web/app/components/datasets/create/step-two/hooks/__tests__/use-document-creation.spec.ts@@ -14,7 +14,7 @@ const mocks = vi.hoisted(() => ({invalidDatasetList: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: { notify: mocks.toastNotify },toast: {success: (message: string) => mocks.toastNotify({ type: 'success', message }),diff --git a/web/app/components/datasets/create/step-two/hooks/use-document-creation.ts b/web/app/components/datasets/create/step-two/hooks/use-document-creation.tsindex 1c80a188e5b..27d96e66099 100644--- a/web/app/components/datasets/create/step-two/hooks/use-document-creation.ts+++ b/web/app/components/datasets/create/step-two/hooks/use-document-creation.ts@@ -2,10 +2,10 @@ import type { DefaultModel, Model } from '@/app/components/header/account-settinimport type { NotionPage } from '@/models/common'import type { ChunkingMode, CrawlOptions, CrawlResultItem, CreateDocumentReq, createDocumentResponse, CustomFile, FullDocumentDetail, ProcessRule, SummaryIndexSetting as SummaryIndexSettingType } from '@/models/datasets'import type { RetrievalConfig, RETRIEVE_METHOD } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { trackEvent } from '@/app/components/base/amplitude'-import { toast } from '@/app/components/base/ui/toast'import { isReRankModelSelected } from '@/app/components/datasets/common/check-rerank-model'import { DataSourceProvider } from '@/models/common'import { DataSourceType } from '@/models/datasets'diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsxindex 16e14e35f64..3d87de985fb 100644--- a/web/app/components/datasets/create/step-two/index.tsx+++ b/web/app/components/datasets/create/step-two/index.tsx@@ -3,10 +3,10 @@import type { FC } from 'react'import type { StepTwoProps } from './types'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import { toast } from '@/app/components/base/ui/toast'import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'import { useLocale } from '@/context/i18n'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'diff --git a/web/app/components/datasets/create/step-two/language-select/__tests__/index.spec.tsx b/web/app/components/datasets/create/step-two/language-select/__tests__/index.spec.tsxindex 9c34552988a..f75d45c41c9 100644--- a/web/app/components/datasets/create/step-two/language-select/__tests__/index.spec.tsx+++ b/web/app/components/datasets/create/step-two/language-select/__tests__/index.spec.tsx@@ -108,7 +108,7 @@ describe('LanguageSelect', () => {it('should ignore null values emitted by the select control', async () => {vi.resetModules()- vi.doMock('@/app/components/base/ui/select', () => ({+ vi.doMock('@langgenius/dify-ui/select', () => ({Select: ({ onValueChange, children }: { onValueChange?: (value: string | null) => void, children: React.ReactNode }) => {React.useEffect(() => {onValueChange?.(null)@@ -131,7 +131,7 @@ describe('LanguageSelect', () => {expect(onSelect).not.toHaveBeenCalled()})- vi.doUnmock('@/app/components/base/ui/select')+ vi.doUnmock('@langgenius/dify-ui/select')})})diff --git a/web/app/components/datasets/create/step-two/language-select/index.tsx b/web/app/components/datasets/create/step-two/language-select/index.tsxindex 4f13ff27523..fdef23ff27b 100644--- a/web/app/components/datasets/create/step-two/language-select/index.tsx+++ b/web/app/components/datasets/create/step-two/language-select/index.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger } from '@langgenius/dify-ui/select'import * as React from 'react'-import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger } from '@/app/components/base/ui/select'import { languages } from '@/i18n-config/language'export type ILanguageSelectProps = {diff --git a/web/app/components/datasets/create/stop-embedding-modal/index.tsx b/web/app/components/datasets/create/stop-embedding-modal/index.tsxindex ac9be31199a..93df58d276e 100644--- a/web/app/components/datasets/create/stop-embedding-modal/index.tsx+++ b/web/app/components/datasets/create/stop-embedding-modal/index.tsx@@ -1,9 +1,9 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import s from './index.module.css'type IProps = {diff --git a/web/app/components/datasets/create/website/base/crawled-result-item.tsx b/web/app/components/datasets/create/website/base/crawled-result-item.tsxindex 273fe72abec..967e9810699 100644--- a/web/app/components/datasets/create/website/base/crawled-result-item.tsx+++ b/web/app/components/datasets/create/website/base/crawled-result-item.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'import type { CrawlResultItem as CrawlResultItemType } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'-import { Button } from '@/app/components/base/ui/button'type Props = {payload: CrawlResultItemTypediff --git a/web/app/components/datasets/create/website/base/header.tsx b/web/app/components/datasets/create/website/base/header.tsxindex b72d117968f..e24a428aa18 100644--- a/web/app/components/datasets/create/website/base/header.tsx+++ b/web/app/components/datasets/create/website/base/header.tsx@@ -1,8 +1,8 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiBookOpenLine, RiEqualizer2Line } from '@remixicon/react'import * as React from 'react'import Divider from '@/app/components/base/divider'-import { Button } from '@/app/components/base/ui/button'type HeaderProps = {isInPipeline?: booleandiff --git a/web/app/components/datasets/create/website/base/url-input.tsx b/web/app/components/datasets/create/website/base/url-input.tsxindex 21f7d2ca672..6f49235e8b2 100644--- a/web/app/components/datasets/create/website/base/url-input.tsx+++ b/web/app/components/datasets/create/website/base/url-input.tsx@@ -1,9 +1,9 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { useDocLink } from '@/context/i18n'import Input from './input'diff --git a/web/app/components/datasets/create/website/firecrawl/index.tsx b/web/app/components/datasets/create/website/firecrawl/index.tsxindex d7d9ad45b97..33aa43b4028 100644--- a/web/app/components/datasets/create/website/firecrawl/index.tsx+++ b/web/app/components/datasets/create/website/firecrawl/index.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'import type { CrawlOptions, CrawlResultItem } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { useModalContextSelector } from '@/context/modal-context'import { checkFirecrawlTaskStatus, createFirecrawlTask } from '@/service/datasets'diff --git a/web/app/components/datasets/create/website/jina-reader/base/url-input.tsx b/web/app/components/datasets/create/website/jina-reader/base/url-input.tsxindex a5045d601fd..6b78833ccfa 100644--- a/web/app/components/datasets/create/website/jina-reader/base/url-input.tsx+++ b/web/app/components/datasets/create/website/jina-reader/base/url-input.tsx@@ -1,9 +1,9 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { useDocLink } from '@/context/i18n'import Input from '../../base/input'diff --git a/web/app/components/datasets/create/website/jina-reader/index.tsx b/web/app/components/datasets/create/website/jina-reader/index.tsxindex 16ab2b414a6..0beee86103a 100644--- a/web/app/components/datasets/create/website/jina-reader/index.tsx+++ b/web/app/components/datasets/create/website/jina-reader/index.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'import type { CrawlOptions, CrawlResultItem } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { useModalContext } from '@/context/modal-context'import { checkJinaReaderTaskStatus, createJinaReaderTask } from '@/service/datasets'diff --git a/web/app/components/datasets/create/website/no-data.tsx b/web/app/components/datasets/create/website/no-data.tsxindex 9bf2c91ec72..0659d103335 100644--- a/web/app/components/datasets/create/website/no-data.tsx+++ b/web/app/components/datasets/create/website/no-data.tsx@@ -1,9 +1,9 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import { Icon3Dots } from '@/app/components/base/icons/src/vender/line/others'-import { Button } from '@/app/components/base/ui/button'import { ENABLE_WEBSITE_FIRECRAWL, ENABLE_WEBSITE_JINAREADER, ENABLE_WEBSITE_WATERCRAWL } from '@/config'import { DataSourceProvider } from '@/models/common'import s from './index.module.css'diff --git a/web/app/components/datasets/create/website/watercrawl/index.tsx b/web/app/components/datasets/create/website/watercrawl/index.tsxindex 8d371b07403..d8e3c6c0679 100644--- a/web/app/components/datasets/create/website/watercrawl/index.tsx+++ b/web/app/components/datasets/create/website/watercrawl/index.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'import type { CrawlOptions, CrawlResultItem } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { useModalContext } from '@/context/modal-context'import { checkWatercrawlTaskStatus, createWatercrawlTask } from '@/service/datasets'diff --git a/web/app/components/datasets/documents/components/__tests__/operations.spec.tsx b/web/app/components/datasets/documents/components/__tests__/operations.spec.tsxindex c89059d1852..637e3341667 100644--- a/web/app/components/datasets/documents/components/__tests__/operations.spec.tsx+++ b/web/app/components/datasets/documents/components/__tests__/operations.spec.tsx@@ -23,7 +23,7 @@ const { mockToast } = vi.hoisted(() => {return { mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/datasets/documents/components/__tests__/rename-modal.spec.tsx b/web/app/components/datasets/documents/components/__tests__/rename-modal.spec.tsxindex ad40e52752f..34351dc71d2 100644--- a/web/app/components/datasets/documents/components/__tests__/rename-modal.spec.tsx+++ b/web/app/components/datasets/documents/components/__tests__/rename-modal.spec.tsx@@ -15,7 +15,7 @@ vi.mock('@/service/datasets', () => ({renameDocumentName: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: mockToastSuccess,error: mockToastError,diff --git a/web/app/components/datasets/documents/components/document-list/hooks/__tests__/use-document-actions.spec.ts b/web/app/components/datasets/documents/components/document-list/hooks/__tests__/use-document-actions.spec.tsindex 449478eb7b5..9eebae4f812 100644--- a/web/app/components/datasets/documents/components/document-list/hooks/__tests__/use-document-actions.spec.ts+++ b/web/app/components/datasets/documents/components/document-list/hooks/__tests__/use-document-actions.spec.ts@@ -27,7 +27,7 @@ vi.mock('@/service/knowledge/use-document', () => ({useDocumentDownloadZip: () => ({ mutateAsync: mockDownloadZip, isPending: mockIsDownloadingZip }),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: mockToastSuccess,error: mockToastError,diff --git a/web/app/components/datasets/documents/components/document-list/hooks/use-document-actions.ts b/web/app/components/datasets/documents/components/document-list/hooks/use-document-actions.tsindex 8b6c40e2be4..a46c4fcfccd 100644--- a/web/app/components/datasets/documents/components/document-list/hooks/use-document-actions.ts+++ b/web/app/components/datasets/documents/components/document-list/hooks/use-document-actions.ts@@ -1,7 +1,7 @@import type { CommonResponse } from '@/models/common'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useMemo } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { DocumentActionType } from '@/models/datasets'import {useDocumentArchive,diff --git a/web/app/components/datasets/documents/components/documents-header.tsx b/web/app/components/datasets/documents/components/documents-header.tsxindex 4e098f5eda0..bd74ad0487d 100644--- a/web/app/components/datasets/documents/components/documents-header.tsx+++ b/web/app/components/datasets/documents/components/documents-header.tsx@@ -4,13 +4,13 @@ import type { Item } from '@/app/components/base/select'import type { BuiltInMetadataItem, MetadataItemWithValueLength } from '@/app/components/datasets/metadata/types'import type { SortType } from '@/service/datasets'import { PlusIcon } from '@heroicons/react/24/solid'+import { Button } from '@langgenius/dify-ui/button'import { RiDraftLine, RiExternalLinkLine } from '@remixicon/react'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'import Chip from '@/app/components/base/chip'import Input from '@/app/components/base/input'import Sort from '@/app/components/base/sort'-import { Button } from '@/app/components/base/ui/button'import AutoDisabledDocument from '@/app/components/datasets/common/document-status-with-action/auto-disabled-document'import IndexFailed from '@/app/components/datasets/common/document-status-with-action/index-failed'import StatusWithAction from '@/app/components/datasets/common/document-status-with-action/status-with-action'diff --git a/web/app/components/datasets/documents/components/empty-element.tsx b/web/app/components/datasets/documents/components/empty-element.tsxindex 6eacf89264b..506b8ab6dbb 100644--- a/web/app/components/datasets/documents/components/empty-element.tsx+++ b/web/app/components/datasets/documents/components/empty-element.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'import { PlusIcon } from '@heroicons/react/24/solid'+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import s from '../style.module.css'import { FolderPlusIcon, NotionIcon, ThreeDotsIcon } from './icons'diff --git a/web/app/components/datasets/documents/components/operations.tsx b/web/app/components/datasets/documents/components/operations.tsxindex e7bbb03c941..8692da927d2 100644--- a/web/app/components/datasets/documents/components/operations.tsx+++ b/web/app/components/datasets/documents/components/operations.tsx@@ -1,15 +1,6 @@import type { OperationName } from '../types'import type { CommonResponse } from '@/models/common'import type { DocumentDownloadResponse } from '@/service/datasets'-import { cn } from '@langgenius/dify-ui/cn'-import { useBoolean, useDebounceFn } from 'ahooks'-import { noop } from 'es-toolkit/function'-import * as React from 'react'-import { useCallback, useState } from 'react'-import { useTranslation } from 'react-i18next'-import Divider from '@/app/components/base/divider'-import Switch from '@/app/components/base/switch'-import Tooltip from '@/app/components/base/tooltip'import {AlertDialog,AlertDialogActions,@@ -18,13 +9,22 @@ 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,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/dropdown-menu'+import { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'+import { useBoolean, useDebounceFn } from 'ahooks'+import { noop } from 'es-toolkit/function'+import * as React from 'react'+import { useCallback, useState } from 'react'+import { useTranslation } from 'react-i18next'+import Divider from '@/app/components/base/divider'+import Tooltip from '@/app/components/base/tooltip'import { IS_CE_EDITION } from '@/config'import { DataSourceType, DocumentActionType } from '@/models/datasets'import { useRouter } from '@/next/navigation'diff --git a/web/app/components/datasets/documents/components/rename-modal.tsx b/web/app/components/datasets/documents/components/rename-modal.tsxindex c6f393f1ce3..fc4626676bd 100644--- a/web/app/components/datasets/documents/components/rename-modal.tsx+++ b/web/app/components/datasets/documents/components/rename-modal.tsx@@ -1,13 +1,13 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { renameDocumentName } from '@/service/datasets'type Props = {diff --git a/web/app/components/datasets/documents/create-from-pipeline/actions/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/actions/index.tsxindex 64c5faac33d..caffed6500d 100644--- a/web/app/components/datasets/documents/create-from-pipeline/actions/index.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/actions/index.tsx@@ -1,9 +1,9 @@+import { Button } from '@langgenius/dify-ui/button'import { RiArrowRightLine } from '@remixicon/react'import * as React from 'react'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'-import { Button } from '@/app/components/base/ui/button'import Link from '@/next/link'import { useParams } from '@/next/navigation'diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/base/__tests__/header.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/base/__tests__/header.spec.tsxindex b736935cc8c..a6abad358e4 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/base/__tests__/header.spec.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/base/__tests__/header.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import { describe, expect, it, vi } from 'vitest'import Header from '../header'-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children }: { children: React.ReactNode }) => <button>{children}</button>,}))diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/base/header.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/base/header.tsxindex 034556d96fd..a2859462726 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/base/header.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/base/header.tsx@@ -1,10 +1,10 @@import type { CredentialSelectorProps } from './credential-selector'+import { Button } from '@langgenius/dify-ui/button'import { RiBookOpenLine, RiEqualizer2Line } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import CredentialSelector from './credential-selector'type HeaderProps = {diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/local-file/hooks/__tests__/use-local-file-upload.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/local-file/hooks/__tests__/use-local-file-upload.spec.tsxindex 80a8fc854d9..dc20688e9eb 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/local-file/hooks/__tests__/use-local-file-upload.spec.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/local-file/hooks/__tests__/use-local-file-upload.spec.tsx@@ -18,7 +18,7 @@ const { mockNotify, mockToast } = vi.hoisted(() => {return { mockNotify, mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-documents/__tests__/index.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-documents/__tests__/index.spec.tsxindex 6be0e28d311..c193638a6a6 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-documents/__tests__/index.spec.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-documents/__tests__/index.spec.tsx@@ -37,8 +37,8 @@ const { mockToastError } = vi.hoisted(() => ({mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-documents/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-documents/index.tsxindex 5321986cd78..22bc8a65e05 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-documents/index.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-documents/index.tsx@@ -1,11 +1,11 @@import type { DataSourceNodeType } from '@/app/components/workflow/nodes/data-source/types'import type { DataSourceNotionPageMap, DataSourceNotionWorkspace } from '@/models/common'import type { DataSourceNodeCompletedResponse, DataSourceNodeErrorResponse } from '@/types/pipeline'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useMemo } from 'react'import { useShallow } from 'zustand/react/shallow'import Loading from '@/app/components/base/loading'import SearchInput from '@/app/components/base/notion-page-selector/search-input'-import { toast } from '@/app/components/base/ui/toast'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'import { useDocLink } from '@/context/i18n'diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/__tests__/index.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/__tests__/index.spec.tsxindex 6eed119ede2..c8fdf49fd12 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/__tests__/index.spec.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/__tests__/index.spec.tsx@@ -49,8 +49,8 @@ const { mockToastError } = vi.hoisted(() => ({mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/connect/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/connect/index.tsxindex 5b1b0a6b1af..6a7190161d3 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/connect/index.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/connect/index.tsx@@ -1,7 +1,7 @@import type { DataSourceNodeType } from '@/app/components/workflow/nodes/data-source/types'+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'import { Icon3Dots } from '@/app/components/base/icons/src/vender/line/others'-import { Button } from '@/app/components/base/ui/button'import BlockIcon from '@/app/components/workflow/block-icon'import { useToolIcon } from '@/app/components/workflow/hooks'import { BlockEnum } from '@/app/components/workflow/types'diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/dropdown/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/dropdown/index.tsxindex c6a90824ab2..43b5fcc71a8 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/dropdown/index.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/dropdown/index.tsx@@ -1,11 +1,11 @@import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import { useCallback, useState } from 'react'import {DropdownMenu,DropdownMenuContent,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import * as React from 'react'+import { useCallback, useState } from 'react'import Menu from './menu'type DropdownProps = {diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/empty-search-result.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/empty-search-result.tsxindex ca110d36943..1691bf90b29 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/empty-search-result.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/empty-search-result.tsx@@ -1,7 +1,7 @@+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import { SearchMenu } from '@/app/components/base/icons/src/vender/knowledge'-import { Button } from '@/app/components/base/ui/button'type EmptySearchResultProps = {onResetKeywords: () => voiddiff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/header.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/header.tsxindex 5c12aaa68c1..bc51751aefc 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/header.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/header.tsx@@ -1,7 +1,7 @@+import { Button } from '@langgenius/dify-ui/button'import { RiBookOpenLine, RiEqualizer2Line } from '@remixicon/react'import * as React from 'react'import Divider from '@/app/components/base/divider'-import { Button } from '@/app/components/base/ui/button'type HeaderProps = {onClickConfiguration?: () => voiddiff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/index.tsxindex 2113e8841c8..76614e3865d 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/index.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/index.tsx@@ -1,10 +1,10 @@import type { DataSourceNodeType } from '@/app/components/workflow/nodes/data-source/types'import type { OnlineDriveFile } from '@/models/pipeline'import type { DataSourceNodeCompletedResponse, DataSourceNodeErrorResponse } from '@/types/pipeline'+import { toast } from '@langgenius/dify-ui/toast'import { produce } from 'immer'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useShallow } from 'zustand/react/shallow'-import { toast } from '@/app/components/base/ui/toast'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'import { useDocLink } from '@/context/i18n'diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/__tests__/crawled-result-item.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/__tests__/crawled-result-item.spec.tsxindex 62dba84e30a..cded02b4315 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/__tests__/crawled-result-item.spec.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/__tests__/crawled-result-item.spec.tsx@@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'import CrawledResultItem from '../crawled-result-item'-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick }: { children: React.ReactNode, onClick: () => void }) => (<button data-testid="preview-button" onClick={onClick}>{children}</button>),diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/crawled-result-item.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/crawled-result-item.tsxindex 664a251e25e..19019b4dd7b 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/crawled-result-item.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/crawled-result-item.tsx@@ -1,12 +1,12 @@'use client'import type { CrawlResultItem as CrawlResultItemType } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'import Radio from '@/app/components/base/radio/ui'-import { Button } from '@/app/components/base/ui/button'type CrawledResultItemProps = {payload: CrawlResultItemTypediff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/options/__tests__/index.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/options/__tests__/index.spec.tsxindex cea569fa5f7..2ab8ad6d4b3 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/options/__tests__/index.spec.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/options/__tests__/index.spec.tsx@@ -10,8 +10,8 @@ const { mockToastError } = vi.hoisted(() => ({mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/options/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/options/index.tsxindex c8a06ea8072..46c6c6f462b 100644--- a/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/options/index.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/website-crawl/base/options/index.tsx@@ -1,5 +1,7 @@import type { RAGPipelineVariables } from '@/models/pipeline'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiPlayLargeLine } from '@remixicon/react'import { useBoolean } from 'ahooks'import { useEffect, useMemo } from 'react'@@ -8,8 +10,6 @@ import { useAppForm } from '@/app/components/base/form'import BaseField from '@/app/components/base/form/form-scenarios/base/field'import { generateZodSchema } from '@/app/components/base/form/form-scenarios/base/utils'import { ArrowDownRoundFill } from '@/app/components/base/icons/src/vender/solid/general'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useConfigurations, useInitialData } from '@/app/components/rag-pipeline/hooks/use-input-fields'import { CrawlStep } from '@/models/datasets'diff --git a/web/app/components/datasets/documents/create-from-pipeline/left-header.tsx b/web/app/components/datasets/documents/create-from-pipeline/left-header.tsxindex 925da571972..ab432d69627 100644--- a/web/app/components/datasets/documents/create-from-pipeline/left-header.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/left-header.tsx@@ -1,8 +1,8 @@import type { Step } from './step-indicator'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowLeftLine } from '@remixicon/react'import * as React from 'react'import Effect from '@/app/components/base/effect'-import { Button } from '@/app/components/base/ui/button'import Link from '@/next/link'import { useParams } from '@/next/navigation'import StepIndicator from './step-indicator'diff --git a/web/app/components/datasets/documents/create-from-pipeline/preview/__tests__/online-document-preview.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/preview/__tests__/online-document-preview.spec.tsxindex 1e094fedb07..96033a6f608 100644--- a/web/app/components/datasets/documents/create-from-pipeline/preview/__tests__/online-document-preview.spec.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/preview/__tests__/online-document-preview.spec.tsx@@ -9,8 +9,8 @@ const { mockToastError } = vi.hoisted(() => ({mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/datasets/documents/create-from-pipeline/preview/chunk-preview.tsx b/web/app/components/datasets/documents/create-from-pipeline/preview/chunk-preview.tsxindex 2d729ee0793..9b56c6c8a31 100644--- a/web/app/components/datasets/documents/create-from-pipeline/preview/chunk-preview.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/preview/chunk-preview.tsx@@ -1,13 +1,13 @@import type { NotionPage } from '@/models/common'import type { CrawlResultItem, CustomFile, DocumentItem, FileIndexingEstimateResponse } from '@/models/datasets'import type { OnlineDriveFile } from '@/models/pipeline'+import { Button } from '@langgenius/dify-ui/button'import { RiSearchEyeLine } from '@remixicon/react'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Badge from '@/app/components/base/badge'import { SkeletonContainer, SkeletonPoint, SkeletonRectangle, SkeletonRow } from '@/app/components/base/skeleton'-import { Button } from '@/app/components/base/ui/button'import SummaryLabel from '@/app/components/datasets/documents/detail/completed/common/summary-label'import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'import { ChunkingMode } from '@/models/datasets'diff --git a/web/app/components/datasets/documents/create-from-pipeline/preview/online-document-preview.tsx b/web/app/components/datasets/documents/create-from-pipeline/preview/online-document-preview.tsxindex 3e9b409a70f..793ba1f22bb 100644--- a/web/app/components/datasets/documents/create-from-pipeline/preview/online-document-preview.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/preview/online-document-preview.tsx@@ -1,12 +1,12 @@'use client'import type { NotionPage } from '@/models/common'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import { Notion } from '@/app/components/base/icons/src/public/common'import { Markdown } from '@/app/components/base/markdown'-import { toast } from '@/app/components/base/ui/toast'import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'import { usePreviewOnlineDocument } from '@/service/use-pipeline'import { formatNumberAbbreviated } from '@/utils/format'diff --git a/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/components.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/components.spec.tsxindex ff5f8afa665..16b6ef13731 100644--- a/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/components.spec.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/components.spec.tsx@@ -11,8 +11,8 @@ const { mockToastError } = vi.hoisted(() => ({mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/form.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/form.spec.tsxindex 09f28fc5dab..dc54ba2757e 100644--- a/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/form.spec.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/form.spec.tsx@@ -8,8 +8,8 @@ const { mockToastError } = vi.hoisted(() => ({mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/header.spec.tsx b/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/header.spec.tsxindex 7e9eabaedac..431fa76f2c0 100644--- a/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/header.spec.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/process-documents/__tests__/header.spec.tsx@@ -2,7 +2,7 @@ import { fireEvent, render, screen } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'import Header from '../header'-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick, disabled, variant }: { children: React.ReactNode, onClick: () => void, disabled?: boolean, variant: string }) => (<button data-testid={`btn-${variant}`} onClick={onClick} disabled={disabled}>{children}diff --git a/web/app/components/datasets/documents/create-from-pipeline/process-documents/actions.tsx b/web/app/components/datasets/documents/create-from-pipeline/process-documents/actions.tsxindex 7526826cfce..9d5a18b58d0 100644--- a/web/app/components/datasets/documents/create-from-pipeline/process-documents/actions.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/process-documents/actions.tsx@@ -1,7 +1,7 @@+import { Button } from '@langgenius/dify-ui/button'import { RiArrowLeftLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type ActionsProps = {onBack: () => voiddiff --git a/web/app/components/datasets/documents/create-from-pipeline/process-documents/form.tsx b/web/app/components/datasets/documents/create-from-pipeline/process-documents/form.tsxindex 7fde02adcdd..80cd737e7e6 100644--- a/web/app/components/datasets/documents/create-from-pipeline/process-documents/form.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/process-documents/form.tsx@@ -1,9 +1,9 @@import type { ZodSchema } from 'zod'import type { BaseConfiguration } from '@/app/components/base/form/form-scenarios/base/types'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useImperativeHandle } from 'react'import { useAppForm } from '@/app/components/base/form'import BaseField from '@/app/components/base/form/form-scenarios/base/field'-import { toast } from '@/app/components/base/ui/toast'import Header from './header'type OptionsProps = {diff --git a/web/app/components/datasets/documents/create-from-pipeline/process-documents/header.tsx b/web/app/components/datasets/documents/create-from-pipeline/process-documents/header.tsxindex 04d4304d21d..a4ae99e4502 100644--- a/web/app/components/datasets/documents/create-from-pipeline/process-documents/header.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/process-documents/header.tsx@@ -1,7 +1,7 @@+import { Button } from '@langgenius/dify-ui/button'import { RiSearchEyeLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type HeaderProps = {onReset: () => voiddiff --git a/web/app/components/datasets/documents/create-from-pipeline/processing/embedding-process/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/processing/embedding-process/index.tsxindex 09d6eb09609..797f7b296a6 100644--- a/web/app/components/datasets/documents/create-from-pipeline/processing/embedding-process/index.tsx+++ b/web/app/components/datasets/documents/create-from-pipeline/processing/embedding-process/index.tsx@@ -2,6 +2,7 @@ import type { IndexingType } from '@/app/components/datasets/create/step-two'import type { IndexingStatusResponse } from '@/models/datasets'import type { InitialDocumentDetail } from '@/models/pipeline'import type { RETRIEVE_METHOD } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiAedFill,@@ -17,7 +18,6 @@ import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import NotionIcon from '@/app/components/base/notion-icon'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import PriorityLabel from '@/app/components/billing/priority-label'import { Plan } from '@/app/components/billing/type'import UpgradeBtn from '@/app/components/billing/upgrade-btn'diff --git a/web/app/components/datasets/documents/detail/__tests__/index.spec.tsx b/web/app/components/datasets/documents/detail/__tests__/index.spec.tsxindex 91e9bccc663..dc0dd438ce5 100644--- a/web/app/components/datasets/documents/detail/__tests__/index.spec.tsx+++ b/web/app/components/datasets/documents/detail/__tests__/index.spec.tsx@@ -74,7 +74,7 @@ vi.mock('@/service/use-base', () => ({},}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: { notify: mocks.toastNotify },}))diff --git a/web/app/components/datasets/documents/detail/__tests__/new-segment.spec.tsx b/web/app/components/datasets/documents/detail/__tests__/new-segment.spec.tsxindex a46b659f11a..f6ebf0d29d0 100644--- a/web/app/components/datasets/documents/detail/__tests__/new-segment.spec.tsx+++ b/web/app/components/datasets/documents/detail/__tests__/new-segment.spec.tsx@@ -1,6 +1,6 @@+import { toast, ToastHost } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import { toast, ToastHost } from '@/app/components/base/ui/toast'import { ChunkingMode } from '@/models/datasets'import { IndexingType } from '../../../create/step-two'diff --git a/web/app/components/datasets/documents/detail/batch-modal/__tests__/csv-uploader.spec.tsx b/web/app/components/datasets/documents/detail/batch-modal/__tests__/csv-uploader.spec.tsxindex 6e3ba6ab90e..0cd2a314911 100644--- a/web/app/components/datasets/documents/detail/batch-modal/__tests__/csv-uploader.spec.tsx+++ b/web/app/components/datasets/documents/detail/batch-modal/__tests__/csv-uploader.spec.tsx@@ -39,7 +39,7 @@ const toastMocks = vi.hoisted(() => {}})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: toastMocks.api,}))diff --git a/web/app/components/datasets/documents/detail/batch-modal/csv-uploader.tsx b/web/app/components/datasets/documents/detail/batch-modal/csv-uploader.tsxindex 1d26877b775..0e86c057ccd 100644--- a/web/app/components/datasets/documents/detail/batch-modal/csv-uploader.tsx+++ b/web/app/components/datasets/documents/detail/batch-modal/csv-uploader.tsx@@ -1,7 +1,9 @@'use client'import type { FC } from 'react'import type { FileItem } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiDeleteBinLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'@@ -9,8 +11,6 @@ import { useTranslation } from 'react-i18next'import { getFileUploadErrorMessage } from '@/app/components/base/file-uploader/utils'import { Csv as CSVIcon } from '@/app/components/base/icons/src/public/files'import SimplePieChart from '@/app/components/base/simple-pie-chart'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import useTheme from '@/hooks/use-theme'import { upload } from '@/service/base'import { useFileUploadConfig } from '@/service/use-common'diff --git a/web/app/components/datasets/documents/detail/batch-modal/index.tsx b/web/app/components/datasets/documents/detail/batch-modal/index.tsxindex fe3c3993553..c0d9a58e984 100644--- a/web/app/components/datasets/documents/detail/batch-modal/index.tsx+++ b/web/app/components/datasets/documents/detail/batch-modal/index.tsx@@ -1,13 +1,13 @@'use client'import type { FC } from 'react'import type { ChunkingMode, FileItem } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import { RiCloseLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import CSVDownloader from './csv-downloader'import CSVUploader from './csv-uploader'diff --git a/web/app/components/datasets/documents/detail/completed/__tests__/index.spec.tsx b/web/app/components/datasets/documents/detail/completed/__tests__/index.spec.tsxindex b7344d7a0f5..f50b405c6f5 100644--- a/web/app/components/datasets/documents/detail/completed/__tests__/index.spec.tsx+++ b/web/app/components/datasets/documents/detail/completed/__tests__/index.spec.tsx@@ -73,7 +73,7 @@ vi.mock('../../context', () => ({},}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/datasets/documents/detail/completed/__tests__/new-child-segment.spec.tsx b/web/app/components/datasets/documents/detail/completed/__tests__/new-child-segment.spec.tsxindex ff9fb4c5243..d993ff849e9 100644--- a/web/app/components/datasets/documents/detail/completed/__tests__/new-child-segment.spec.tsx+++ b/web/app/components/datasets/documents/detail/completed/__tests__/new-child-segment.spec.tsx@@ -1,6 +1,6 @@+import { toast, ToastHost } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import { toast, ToastHost } from '@/app/components/base/ui/toast'import NewChildSegmentModal from '../new-child-segment'diff --git a/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx b/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsxindex 9bd2913cdad..3b2e63977d6 100644--- a/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx+++ b/web/app/components/datasets/documents/detail/completed/common/action-buttons.tsx@@ -1,9 +1,9 @@import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { useKeyPress } from 'ahooks'import * as React from 'react'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import ShortcutsName from '@/app/components/workflow/shortcuts-name'import { getKeyboardKeyCodeBySystem } from '@/app/components/workflow/utils'import { ChunkingMode } from '@/models/datasets'diff --git a/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx b/web/app/components/datasets/documents/detail/completed/common/batch-action.tsxindex 59129077654..2b04d21d6dd 100644--- a/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx+++ b/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx@@ -1,11 +1,4 @@import type { FC } from 'react'-import { cn } from '@langgenius/dify-ui/cn'-import { RiArchive2Line, RiCheckboxCircleLine, RiCloseCircleLine, RiDeleteBinLine, RiDownload2Line, RiDraftLine, RiRefreshLine } from '@remixicon/react'-import { useBoolean } from 'ahooks'-import * as React from 'react'-import { useTranslation } from 'react-i18next'-import Divider from '@/app/components/base/divider'-import { SearchLinesSparkle } from '@/app/components/base/icons/src/vender/knowledge'import {AlertDialog,AlertDialogActions,@@ -14,8 +7,15 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import { cn } from '@langgenius/dify-ui/cn'+import { RiArchive2Line, RiCheckboxCircleLine, RiCloseCircleLine, RiDeleteBinLine, RiDownload2Line, RiDraftLine, RiRefreshLine } from '@remixicon/react'+import { useBoolean } from 'ahooks'+import * as React from 'react'+import { useTranslation } from 'react-i18next'+import Divider from '@/app/components/base/divider'+import { SearchLinesSparkle } from '@/app/components/base/icons/src/vender/knowledge'import { IS_CE_EDITION } from '@/config'const i18nPrefix = 'batchAction'diff --git a/web/app/components/datasets/documents/detail/completed/common/regeneration-modal.tsx b/web/app/components/datasets/documents/detail/completed/common/regeneration-modal.tsxindex 33d9f550a85..9b2a2e36ee3 100644--- a/web/app/components/datasets/documents/detail/completed/common/regeneration-modal.tsx+++ b/web/app/components/datasets/documents/detail/completed/common/regeneration-modal.tsx@@ -1,4 +1,5 @@import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { RiLoader2Line } from '@remixicon/react'import { useCountDown } from 'ahooks'import { noop } from 'es-toolkit/function'@@ -6,7 +7,6 @@ import * as React from 'react'import { useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import { useEventEmitterContextContext } from '@/context/event-emitter'type IDefaultContentProps = {diff --git a/web/app/components/datasets/documents/detail/completed/hooks/__tests__/use-child-segment-data.spec.ts b/web/app/components/datasets/documents/detail/completed/hooks/__tests__/use-child-segment-data.spec.tsindex 7817a3b2aa3..fb19d49bc21 100644--- a/web/app/components/datasets/documents/detail/completed/hooks/__tests__/use-child-segment-data.spec.ts+++ b/web/app/components/datasets/documents/detail/completed/hooks/__tests__/use-child-segment-data.spec.ts@@ -59,7 +59,7 @@ vi.mock('../../../context', () => ({},}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockNotify({ type: 'success', message }),error: (message: string) => mockNotify({ type: 'error', message }),diff --git a/web/app/components/datasets/documents/detail/completed/hooks/__tests__/use-segment-list-data.spec.ts b/web/app/components/datasets/documents/detail/completed/hooks/__tests__/use-segment-list-data.spec.tsindex ec5ad265c18..5b8f8d7e53c 100644--- a/web/app/components/datasets/documents/detail/completed/hooks/__tests__/use-segment-list-data.spec.ts+++ b/web/app/components/datasets/documents/detail/completed/hooks/__tests__/use-segment-list-data.spec.ts@@ -92,7 +92,7 @@ vi.mock('../../../context', () => ({},}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockNotify({ type: 'success', message }),error: (message: string) => mockNotify({ type: 'error', message }),diff --git a/web/app/components/datasets/documents/detail/completed/hooks/use-child-segment-data.ts b/web/app/components/datasets/documents/detail/completed/hooks/use-child-segment-data.tsindex fab8b160194..4e3c09d73de 100644--- a/web/app/components/datasets/documents/detail/completed/hooks/use-child-segment-data.ts+++ b/web/app/components/datasets/documents/detail/completed/hooks/use-child-segment-data.ts@@ -1,8 +1,8 @@import type { ChildChunkDetail, ChildSegmentsResponse, SegmentDetailModel, SegmentUpdater } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import { useQueryClient } from '@tanstack/react-query'import { useCallback, useEffect, useMemo, useRef } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useEventEmitterContextContext } from '@/context/event-emitter'import { useChildSegmentList, useChildSegmentListKey, useDeleteChildSegment, useUpdateChildSegment } from '@/service/knowledge/use-segment'import { useInvalid } from '@/service/use-base'diff --git a/web/app/components/datasets/documents/detail/completed/hooks/use-segment-list-data.ts b/web/app/components/datasets/documents/detail/completed/hooks/use-segment-list-data.tsindex 3a3c486070e..1c55d12d15d 100644--- a/web/app/components/datasets/documents/detail/completed/hooks/use-segment-list-data.ts+++ b/web/app/components/datasets/documents/detail/completed/hooks/use-segment-list-data.ts@@ -1,9 +1,9 @@import type { FileEntity } from '@/app/components/datasets/common/image-uploader/types'import type { SegmentDetailModel, SegmentsResponse, SegmentUpdater } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import { useQueryClient } from '@tanstack/react-query'import { useCallback, useEffect, useMemo, useRef } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useEventEmitterContextContext } from '@/context/event-emitter'import { ChunkingMode } from '@/models/datasets'import { usePathname } from '@/next/navigation'diff --git a/web/app/components/datasets/documents/detail/completed/new-child-segment.tsx b/web/app/components/datasets/documents/detail/completed/new-child-segment.tsxindex 68efea843ba..386757a5b2c 100644--- a/web/app/components/datasets/documents/detail/completed/new-child-segment.tsx+++ b/web/app/components/datasets/documents/detail/completed/new-child-segment.tsx@@ -1,11 +1,11 @@import type { FC } from 'react'import type { ChildChunkDetail, SegmentUpdater } from '@/models/datasets'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine, RiExpandDiagonalLine } from '@remixicon/react'import { memo, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import { toast } from '@/app/components/base/ui/toast'import { ChunkingMode } from '@/models/datasets'import { useParams } from '@/next/navigation'import { useAddChildSegment } from '@/service/knowledge/use-segment'diff --git a/web/app/components/datasets/documents/detail/completed/segment-card/index.tsx b/web/app/components/datasets/documents/detail/completed/segment-card/index.tsxindex c39c8ba10fb..1111bb64118 100644--- a/web/app/components/datasets/documents/detail/completed/segment-card/index.tsx+++ b/web/app/components/datasets/documents/detail/completed/segment-card/index.tsx@@ -1,22 +1,22 @@import type { FC } from 'react'import type { ChildChunkDetail, SegmentDetailModel } from '@/models/datasets'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { RiDeleteBinLine, RiEditLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import Badge from '@/app/components/base/badge'import Divider from '@/app/components/base/divider'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'import ImageList from '@/app/components/datasets/common/image-list'import { ChunkingMode } from '@/models/datasets'import { formatNumber } from '@/utils/format'diff --git a/web/app/components/datasets/documents/detail/embedding/__tests__/index.spec.tsx b/web/app/components/datasets/documents/detail/embedding/__tests__/index.spec.tsxindex 1a07847a136..56894cbf452 100644--- a/web/app/components/datasets/documents/detail/embedding/__tests__/index.spec.tsx+++ b/web/app/components/datasets/documents/detail/embedding/__tests__/index.spec.tsx@@ -28,7 +28,7 @@ const { mockToast } = vi.hoisted(() => {vi.mock('@/service/datasets')vi.mock('@/service/knowledge/use-dataset')-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/datasets/documents/detail/embedding/index.tsx b/web/app/components/datasets/documents/detail/embedding/index.tsxindex c917ee9906a..01548ecdd61 100644--- a/web/app/components/datasets/documents/detail/embedding/index.tsx+++ b/web/app/components/datasets/documents/detail/embedding/index.tsx@@ -1,10 +1,10 @@import type { FC } from 'react'import type { IndexingType } from '../../../create/step-two'import type { RETRIEVE_METHOD } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useProcessRule } from '@/service/knowledge/use-dataset'import { useDocumentContext } from '../context'import { ProgressBar, RuleDetail, SegmentProgress, StatusHeader } from './components'diff --git a/web/app/components/datasets/documents/detail/index.tsx b/web/app/components/datasets/documents/detail/index.tsxindex be72975099f..8a684a4e44f 100644--- a/web/app/components/datasets/documents/detail/index.tsx+++ b/web/app/components/datasets/documents/detail/index.tsx@@ -2,13 +2,13 @@import type { FC } from 'react'import type { DataSourceInfo, DocumentDisplayStatus, FileItem, FullDocumentDetail, LegacyDataSourceInfo } from '@/models/datasets'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import FloatRightContainer from '@/app/components/base/float-right-container'import Loading from '@/app/components/base/loading'-import { toast } from '@/app/components/base/ui/toast'import Metadata from '@/app/components/datasets/metadata/metadata-document'import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'diff --git a/web/app/components/datasets/documents/detail/metadata/__tests__/index.spec.tsx b/web/app/components/datasets/documents/detail/metadata/__tests__/index.spec.tsxindex 5b268e554cd..7f405ea07fa 100644--- a/web/app/components/datasets/documents/detail/metadata/__tests__/index.spec.tsx+++ b/web/app/components/datasets/documents/detail/metadata/__tests__/index.spec.tsx@@ -34,7 +34,7 @@ vi.mock('use-context-selector', async (importOriginal) => {}})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: toastMocks.api,}))diff --git a/web/app/components/datasets/documents/detail/metadata/components/doc-type-selector.tsx b/web/app/components/datasets/documents/detail/metadata/components/doc-type-selector.tsxindex 8e3857c4920..c6044b261a0 100644--- a/web/app/components/datasets/documents/detail/metadata/components/doc-type-selector.tsx+++ b/web/app/components/datasets/documents/detail/metadata/components/doc-type-selector.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'import type { DocType } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useTranslation } from 'react-i18next'import Radio from '@/app/components/base/radio'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import { useMetadataMap } from '@/hooks/use-metadata'import { CUSTOMIZABLE_DOC_TYPES } from '@/models/datasets'import s from '../style.module.css'diff --git a/web/app/components/datasets/documents/detail/metadata/hooks/__tests__/use-metadata-state.spec.ts b/web/app/components/datasets/documents/detail/metadata/hooks/__tests__/use-metadata-state.spec.tsindex 3c66d472dcf..2d5afcc3a99 100644--- a/web/app/components/datasets/documents/detail/metadata/hooks/__tests__/use-metadata-state.spec.ts+++ b/web/app/components/datasets/documents/detail/metadata/hooks/__tests__/use-metadata-state.spec.ts@@ -20,7 +20,7 @@ const { mockNotify, mockModifyDocMetadata, mockToast } = vi.hoisted(() => {return { mockNotify, mockModifyDocMetadata: vi.fn(), mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/datasets/documents/detail/metadata/hooks/use-metadata-state.ts b/web/app/components/datasets/documents/detail/metadata/hooks/use-metadata-state.tsindex 04d920b459e..7bfa64ac8e9 100644--- a/web/app/components/datasets/documents/detail/metadata/hooks/use-metadata-state.ts+++ b/web/app/components/datasets/documents/detail/metadata/hooks/use-metadata-state.ts@@ -1,9 +1,9 @@'use client'import type { CommonResponse } from '@/models/common'import type { DocType, FullDocumentDetail } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { modifyDocMetadata } from '@/service/datasets'import { asyncRunSafe } from '@/utils'import { useDocumentContext } from '../../context'diff --git a/web/app/components/datasets/documents/detail/metadata/index.tsx b/web/app/components/datasets/documents/detail/metadata/index.tsxindex 0d06b43118f..762f1ff3e41 100644--- a/web/app/components/datasets/documents/detail/metadata/index.tsx+++ b/web/app/components/datasets/documents/detail/metadata/index.tsx@@ -2,10 +2,10 @@import type { FC } from 'react'import type { FullDocumentDetail } from '@/models/datasets'import { PencilIcon } from '@heroicons/react/24/outline'+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'import { useMetadataMap } from '@/hooks/use-metadata'import DocTypeSelector, { DocumentTypeDisplay } from './components/doc-type-selector'import MetadataFieldList from './components/metadata-field-list'diff --git a/web/app/components/datasets/documents/detail/new-segment.tsx b/web/app/components/datasets/documents/detail/new-segment.tsxindex 35f3eacfc8a..0426bb9584a 100644--- a/web/app/components/datasets/documents/detail/new-segment.tsx+++ b/web/app/components/datasets/documents/detail/new-segment.tsx@@ -2,11 +2,11 @@ import type { FC } from 'react'import type { FileEntity } from '@/app/components/datasets/common/image-uploader/types'import type { SegmentUpdater } from '@/models/datasets'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine, RiExpandDiagonalLine } from '@remixicon/react'import { memo, useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import { toast } from '@/app/components/base/ui/toast'import ImageUploaderInChunk from '@/app/components/datasets/common/image-uploader/image-uploader-in-chunk'import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'import { ChunkingMode } from '@/models/datasets'diff --git a/web/app/components/datasets/documents/detail/segment-add/index.tsx b/web/app/components/datasets/documents/detail/segment-add/index.tsxindex db810b1d6b9..de9735f62f6 100644--- a/web/app/components/datasets/documents/detail/segment-add/index.tsx+++ b/web/app/components/datasets/documents/detail/segment-add/index.tsx@@ -1,16 +1,16 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'-import { useBoolean } from 'ahooks'-import * as React from 'react'-import { useCallback, useMemo, useRef, useState } from 'react'-import { useTranslation } from 'react-i18next'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { useBoolean } from 'ahooks'+import * as React from 'react'+import { useCallback, useMemo, useRef, useState } from 'react'+import { useTranslation } from 'react-i18next'import PlanUpgradeModal from '@/app/components/billing/plan-upgrade-modal'import { Plan } from '@/app/components/billing/type'import { useProviderContext } from '@/context/provider-context'diff --git a/web/app/components/datasets/documents/detail/settings/pipeline-settings/left-header.tsx b/web/app/components/datasets/documents/detail/settings/pipeline-settings/left-header.tsxindex 28e8d4bb30e..a2f2b7f269f 100644--- a/web/app/components/datasets/documents/detail/settings/pipeline-settings/left-header.tsx+++ b/web/app/components/datasets/documents/detail/settings/pipeline-settings/left-header.tsx@@ -1,9 +1,9 @@+import { Button } from '@langgenius/dify-ui/button'import { RiArrowLeftLine } from '@remixicon/react'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import Effect from '@/app/components/base/effect'-import { Button } from '@/app/components/base/ui/button'import { useRouter } from '@/next/navigation'type LeftHeaderProps = {diff --git a/web/app/components/datasets/documents/detail/settings/pipeline-settings/process-documents/actions.tsx b/web/app/components/datasets/documents/detail/settings/pipeline-settings/process-documents/actions.tsxindex a3ba4243095..bb63720b08d 100644--- a/web/app/components/datasets/documents/detail/settings/pipeline-settings/process-documents/actions.tsx+++ b/web/app/components/datasets/documents/detail/settings/pipeline-settings/process-documents/actions.tsx@@ -1,6 +1,6 @@+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type ActionsProps = {runDisabled?: booleandiff --git a/web/app/components/datasets/documents/status-item/__tests__/index.spec.tsx b/web/app/components/datasets/documents/status-item/__tests__/index.spec.tsxindex a99aeb269b1..b69835d7f2b 100644--- a/web/app/components/datasets/documents/status-item/__tests__/index.spec.tsx+++ b/web/app/components/datasets/documents/status-item/__tests__/index.spec.tsx@@ -27,7 +27,7 @@ vi.mock('use-context-selector', () => ({useContextSelector: (context: unknown, selector: (state: unknown) => unknown) => selector({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: toastMocks.api,}))diff --git a/web/app/components/datasets/documents/status-item/index.tsx b/web/app/components/datasets/documents/status-item/index.tsxindex 362db58a905..9970c6bca8d 100644--- a/web/app/components/datasets/documents/status-item/index.tsx+++ b/web/app/components/datasets/documents/status-item/index.tsx@@ -3,13 +3,13 @@ import type { ColorMap, IndicatorProps } from '@/app/components/header/indicatorimport type { CommonResponse } from '@/models/common'import type { DocumentDisplayStatus } from '@/models/datasets'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'import { useDebounceFn } from 'ahooks'import * as React from 'react'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'-import { toast } from '@/app/components/base/ui/toast'import Indicator from '@/app/components/header/indicator'import { useDocumentDelete, useDocumentDisable, useDocumentEnable } from '@/service/knowledge/use-document'import { asyncRunSafe } from '@/utils'diff --git a/web/app/components/datasets/external-api/external-api-modal/__tests__/index.spec.tsx b/web/app/components/datasets/external-api/external-api-modal/__tests__/index.spec.tsxindex e24712887af..18b38c807c7 100644--- a/web/app/components/datasets/external-api/external-api-modal/__tests__/index.spec.tsx+++ b/web/app/components/datasets/external-api/external-api-modal/__tests__/index.spec.tsx@@ -12,7 +12,7 @@ vi.mock('@/service/datasets', () => ({}))const mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => mockNotify(args),},diff --git a/web/app/components/datasets/external-api/external-api-modal/index.tsx b/web/app/components/datasets/external-api/external-api-modal/index.tsxindex 0cd65932327..cb2176b2a1f 100644--- a/web/app/components/datasets/external-api/external-api-modal/index.tsx+++ b/web/app/components/datasets/external-api/external-api-modal/index.tsx@@ -1,11 +1,5 @@import type { FC } from 'react'import type { CreateExternalAPIReq, FormSchema } from '../declarations'-import { RiBook2Line, RiCloseLine, RiInformation2Line, RiLock2Fill } from '@remixicon/react'-import { memo, useEffect, useState } from 'react'-import { useTranslation } from 'react-i18next'-import ActionButton from '@/app/components/base/action-button'-import { PortalToFollowElem, PortalToFollowElemContent } from '@/app/components/base/portal-to-follow-elem'-import Tooltip from '@/app/components/base/tooltip'import {AlertDialog,AlertDialogActions,@@ -14,9 +8,15 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'+import { RiBook2Line, RiCloseLine, RiInformation2Line, RiLock2Fill } from '@remixicon/react'+import { memo, useEffect, useState } from 'react'+import { useTranslation } from 'react-i18next'+import ActionButton from '@/app/components/base/action-button'+import { PortalToFollowElem, PortalToFollowElemContent } from '@/app/components/base/portal-to-follow-elem'+import Tooltip from '@/app/components/base/tooltip'import { createExternalAPI } from '@/service/datasets'import Form from './Form'diff --git a/web/app/components/datasets/external-api/external-api-panel/index.tsx b/web/app/components/datasets/external-api/external-api-panel/index.tsxindex 93ccdd3c4ec..cee1dcc83df 100644--- a/web/app/components/datasets/external-api/external-api-panel/index.tsx+++ b/web/app/components/datasets/external-api/external-api-panel/index.tsx@@ -1,3 +1,4 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiAddLine,@@ -8,7 +9,6 @@ import * as React from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'import { useExternalKnowledgeApi } from '@/context/external-knowledge-api-context'import { useDocLink } from '@/context/i18n'import { useModalContext } from '@/context/modal-context'diff --git a/web/app/components/datasets/external-api/external-knowledge-api-card/index.tsx b/web/app/components/datasets/external-api/external-knowledge-api-card/index.tsxindex 23993db7dda..ee21fe98848 100644--- a/web/app/components/datasets/external-api/external-knowledge-api-card/index.tsx+++ b/web/app/components/datasets/external-api/external-knowledge-api-card/index.tsx@@ -1,5 +1,14 @@import type { CreateExternalAPIReq } from '../declarations'import type { ExternalAPIItem } from '@/models/datasets'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'import {RiDeleteBinLine,RiEditLine,@@ -9,15 +18,6 @@ import { useState } from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import { ApiConnectionMod } from '@/app/components/base/icons/src/vender/solid/development'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'import { useExternalKnowledgeApi } from '@/context/external-knowledge-api-context'import { useModalContext } from '@/context/modal-context'import { checkUsageExternalAPI, deleteExternalAPI, fetchExternalAPI, updateExternalAPI } from '@/service/datasets'diff --git a/web/app/components/datasets/external-knowledge-base/connector/__tests__/index.spec.tsx b/web/app/components/datasets/external-knowledge-base/connector/__tests__/index.spec.tsxindex 0949648fa09..7da605725cb 100644--- a/web/app/components/datasets/external-knowledge-base/connector/__tests__/index.spec.tsx+++ b/web/app/components/datasets/external-knowledge-base/connector/__tests__/index.spec.tsx@@ -23,8 +23,8 @@ vi.mock('@/context/i18n', () => ({const mockToastSuccess = vi.hoisted(() => vi.fn())const mockToastError = vi.hoisted(() => vi.fn())-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/datasets/external-knowledge-base/connector/index.tsx b/web/app/components/datasets/external-knowledge-base/connector/index.tsxindex 85fc254cfc3..180bd507e72 100644--- a/web/app/components/datasets/external-knowledge-base/connector/index.tsx+++ b/web/app/components/datasets/external-knowledge-base/connector/index.tsx@@ -1,11 +1,11 @@'use client'import type { CreateKnowledgeBaseReq } from '@/app/components/datasets/external-knowledge-base/create/declarations'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { trackEvent } from '@/app/components/base/amplitude'-import { toast } from '@/app/components/base/ui/toast'import ExternalKnowledgeBaseCreate from '@/app/components/datasets/external-knowledge-base/create'import { useRouter } from '@/next/navigation'import { createExternalKnowledgeBase } from '@/service/datasets'diff --git a/web/app/components/datasets/external-knowledge-base/create/ExternalApiSelection.tsx b/web/app/components/datasets/external-knowledge-base/create/ExternalApiSelection.tsxindex fea71a7e788..a4e846abbf7 100644--- a/web/app/components/datasets/external-knowledge-base/create/ExternalApiSelection.tsx+++ b/web/app/components/datasets/external-knowledge-base/create/ExternalApiSelection.tsx@@ -1,11 +1,11 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { RiAddLine } from '@remixicon/react'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'import { useExternalKnowledgeApi } from '@/context/external-knowledge-api-context'import { useModalContext } from '@/context/modal-context'import { useRouter } from '@/next/navigation'diff --git a/web/app/components/datasets/external-knowledge-base/create/index.tsx b/web/app/components/datasets/external-knowledge-base/create/index.tsxindex 9024d8e1623..ea7a02a8598 100644--- a/web/app/components/datasets/external-knowledge-base/create/index.tsx+++ b/web/app/components/datasets/external-knowledge-base/create/index.tsx@@ -1,11 +1,11 @@'use client'import type { CreateKnowledgeBaseReq } from './declarations'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowLeftLine, RiArrowRightLine } from '@remixicon/react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import { Button } from '@/app/components/base/ui/button'import { useDocLink } from '@/context/i18n'import { useRouter } from '@/next/navigation'import ExternalApiSelection from './ExternalApiSelection'diff --git a/web/app/components/datasets/extra-info/api-access/card.tsx b/web/app/components/datasets/extra-info/api-access/card.tsxindex 02299228488..268f35fda35 100644--- a/web/app/components/datasets/extra-info/api-access/card.tsx+++ b/web/app/components/datasets/extra-info/api-access/card.tsx@@ -1,9 +1,9 @@import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { RiArrowRightUpLine, RiBookOpenLine } from '@remixicon/react'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'import Indicator from '@/app/components/header/indicator'import { useSelector as useAppContextSelector } from '@/context/app-context'import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'diff --git a/web/app/components/datasets/extra-info/api-access/index.tsx b/web/app/components/datasets/extra-info/api-access/index.tsxindex ece4c0835c1..9983030cf26 100644--- a/web/app/components/datasets/extra-info/api-access/index.tsx+++ b/web/app/components/datasets/extra-info/api-access/index.tsx@@ -1,9 +1,9 @@import { cn } from '@langgenius/dify-ui/cn'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { ApiAggregate } from '@/app/components/base/icons/src/vender/knowledge'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import Indicator from '@/app/components/header/indicator'import Card from './card'diff --git a/web/app/components/datasets/extra-info/service-api/card.tsx b/web/app/components/datasets/extra-info/service-api/card.tsxindex 36808a781b5..6f024c3f5db 100644--- a/web/app/components/datasets/extra-info/service-api/card.tsx+++ b/web/app/components/datasets/extra-info/service-api/card.tsx@@ -1,10 +1,10 @@+import { Button } from '@langgenius/dify-ui/button'import { RiBookOpenLine, RiKey2Line } from '@remixicon/react'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import CopyFeedback from '@/app/components/base/copy-feedback'import { ApiAggregate } from '@/app/components/base/icons/src/vender/knowledge'-import { Button } from '@/app/components/base/ui/button'import SecretKeyModal from '@/app/components/develop/secret-key/secret-key-modal'import Indicator from '@/app/components/header/indicator'import { useDatasetApiAccessUrl } from '@/hooks/use-api-access-url'diff --git a/web/app/components/datasets/extra-info/service-api/index.tsx b/web/app/components/datasets/extra-info/service-api/index.tsxindex c4494f4ed7e..c3fe05248d6 100644--- a/web/app/components/datasets/extra-info/service-api/index.tsx+++ b/web/app/components/datasets/extra-info/service-api/index.tsx@@ -1,8 +1,8 @@import { cn } from '@langgenius/dify-ui/cn'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import Indicator from '@/app/components/header/indicator'import Card from './card'diff --git a/web/app/components/datasets/hit-testing/__tests__/modify-external-retrieval-modal.spec.tsx b/web/app/components/datasets/hit-testing/__tests__/modify-external-retrieval-modal.spec.tsxindex 77e02f85823..7a9ca20e403 100644--- a/web/app/components/datasets/hit-testing/__tests__/modify-external-retrieval-modal.spec.tsx+++ b/web/app/components/datasets/hit-testing/__tests__/modify-external-retrieval-modal.spec.tsx@@ -8,7 +8,7 @@ vi.mock('@/app/components/base/action-button', () => ({),}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick, variant }: { children: React.ReactNode, onClick: () => void, variant?: string }) => (<button data-testid={variant === 'primary' ? 'save-button' : 'cancel-button'} onClick={onClick}>{children}diff --git a/web/app/components/datasets/hit-testing/__tests__/modify-retrieval-modal.spec.tsx b/web/app/components/datasets/hit-testing/__tests__/modify-retrieval-modal.spec.tsxindex 9e9adf74add..aa64962aa6c 100644--- a/web/app/components/datasets/hit-testing/__tests__/modify-retrieval-modal.spec.tsx+++ b/web/app/components/datasets/hit-testing/__tests__/modify-retrieval-modal.spec.tsx@@ -17,11 +17,11 @@ const { mockToast } = vi.hoisted(() => {return { mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick, variant }: { children: React.ReactNode, onClick: () => void, variant?: string }) => (<button data-testid={variant === 'primary' ? 'save-button' : 'cancel-button'} onClick={onClick}>{children}diff --git a/web/app/components/datasets/hit-testing/components/query-input/index.tsx b/web/app/components/datasets/hit-testing/components/query-input/index.tsxindex cd0cfe984e1..99796015c64 100644--- a/web/app/components/datasets/hit-testing/components/query-input/index.tsx+++ b/web/app/components/datasets/hit-testing/components/query-input/index.tsx@@ -10,6 +10,7 @@ import type {Query,} from '@/models/datasets'import type { RetrievalConfig } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiEqualizer2Line,@@ -19,7 +20,6 @@ import * as React from 'react'import { useCallback, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import { v4 as uuid4 } from 'uuid'-import { Button } from '@/app/components/base/ui/button'import ImageUploaderInRetrievalTesting from '@/app/components/datasets/common/image-uploader/image-uploader-in-retrieval-testing'import { getIcon } from '@/app/components/datasets/common/retrieval-method-info'import ModifyExternalRetrievalModal from '@/app/components/datasets/hit-testing/modify-external-retrieval-modal'diff --git a/web/app/components/datasets/hit-testing/modify-external-retrieval-modal.tsx b/web/app/components/datasets/hit-testing/modify-external-retrieval-modal.tsxindex 097155f68fc..35fdc3ccf7b 100644--- a/web/app/components/datasets/hit-testing/modify-external-retrieval-modal.tsx+++ b/web/app/components/datasets/hit-testing/modify-external-retrieval-modal.tsx@@ -1,10 +1,10 @@+import { Button } from '@langgenius/dify-ui/button'import {RiCloseLine,} from '@remixicon/react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'-import { Button } from '@/app/components/base/ui/button'import RetrievalSettings from '../external-knowledge-base/create/RetrievalSettings'type ModifyExternalRetrievalModalProps = {diff --git a/web/app/components/datasets/hit-testing/modify-retrieval-modal.tsx b/web/app/components/datasets/hit-testing/modify-retrieval-modal.tsxindex b85a0400734..98bcab27555 100644--- a/web/app/components/datasets/hit-testing/modify-retrieval-modal.tsx+++ b/web/app/components/datasets/hit-testing/modify-retrieval-modal.tsx@@ -2,12 +2,12 @@import type { FC } from 'react'import type { IndexingType } from '../create/step-two'import type { RetrievalConfig } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { isReRankModelSelected } from '@/app/components/datasets/common/check-rerank-model'import EconomicalRetrievalMethodConfig from '@/app/components/datasets/common/economical-retrieval-method-config'import RetrievalMethodConfig from '@/app/components/datasets/common/retrieval-method-config'diff --git a/web/app/components/datasets/list/dataset-card/__tests__/operations.spec.tsx b/web/app/components/datasets/list/dataset-card/__tests__/operations.spec.tsxindex a6765c0ebed..41c0b2749ba 100644--- a/web/app/components/datasets/list/dataset-card/__tests__/operations.spec.tsx+++ b/web/app/components/datasets/list/dataset-card/__tests__/operations.spec.tsx@@ -1,6 +1,6 @@+import { DropdownMenu } from '@langgenius/dify-ui/dropdown-menu'import { fireEvent, render, screen } from '@testing-library/react'import { describe, expect, it, vi } from 'vitest'-import { DropdownMenu } from '@/app/components/base/ui/dropdown-menu'import Operations from '../operations'function renderInMenu(ui: React.ReactElement) {diff --git a/web/app/components/datasets/list/dataset-card/components/dataset-card-modals.tsx b/web/app/components/datasets/list/dataset-card/components/dataset-card-modals.tsxindex 79b0d73799b..47a195943b4 100644--- a/web/app/components/datasets/list/dataset-card/components/dataset-card-modals.tsx+++ b/web/app/components/datasets/list/dataset-card/components/dataset-card-modals.tsx@@ -1,6 +1,4 @@import type { DataSet } from '@/models/datasets'-import * as React from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -9,7 +7,9 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import * as React from 'react'+import { useTranslation } from 'react-i18next'import RenameDatasetModal from '../../../rename-modal'type ModalState = {diff --git a/web/app/components/datasets/list/dataset-card/components/operations-dropdown.tsx b/web/app/components/datasets/list/dataset-card/components/operations-dropdown.tsxindex 22ba6737173..a7918ef0336 100644--- a/web/app/components/datasets/list/dataset-card/components/operations-dropdown.tsx+++ b/web/app/components/datasets/list/dataset-card/components/operations-dropdown.tsx@@ -1,11 +1,11 @@import type { DataSet } from '@/models/datasets'import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'import {DropdownMenu,DropdownMenuContent,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import * as React from 'react'import Operations from '../operations'type OperationsDropdownProps = {diff --git a/web/app/components/datasets/list/dataset-card/hooks/__tests__/use-dataset-card-state.spec.ts b/web/app/components/datasets/list/dataset-card/hooks/__tests__/use-dataset-card-state.spec.tsindex 935f1329d1e..7d07bcf9d05 100644--- a/web/app/components/datasets/list/dataset-card/hooks/__tests__/use-dataset-card-state.spec.ts+++ b/web/app/components/datasets/list/dataset-card/hooks/__tests__/use-dataset-card-state.spec.ts@@ -10,7 +10,7 @@ const { mockToastSuccess, mockToastError } = vi.hoisted(() => ({mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: mockToastSuccess,error: mockToastError,@@ -305,7 +305,7 @@ describe('useDatasetCardState', () => {describe('Error Handling', () => {it('should show error toast when export pipeline fails', async () => {- const { toast } = await import('@/app/components/base/ui/toast')+ const { toast } = await import('@langgenius/dify-ui/toast')mockExportPipeline.mockRejectedValue(new Error('Export failed'))const dataset = createMockDataset({ pipeline_id: 'pipeline-1' })@@ -321,7 +321,7 @@ describe('useDatasetCardState', () => {})it('should handle Response error in detectIsUsedByApp', async () => {- const { toast } = await import('@/app/components/base/ui/toast')+ const { toast } = await import('@langgenius/dify-ui/toast')const mockResponse = new Response(JSON.stringify({ message: 'API Error' }), {status: 400,})@@ -340,7 +340,7 @@ describe('useDatasetCardState', () => {})it('should handle generic Error in detectIsUsedByApp', async () => {- const { toast } = await import('@/app/components/base/ui/toast')+ const { toast } = await import('@langgenius/dify-ui/toast')mockCheckUsage.mockRejectedValue(new Error('Network error'))const dataset = createMockDataset()@@ -356,7 +356,7 @@ describe('useDatasetCardState', () => {})it('should handle error without message in detectIsUsedByApp', async () => {- const { toast } = await import('@/app/components/base/ui/toast')+ const { toast } = await import('@langgenius/dify-ui/toast')mockCheckUsage.mockRejectedValue({})const dataset = createMockDataset()diff --git a/web/app/components/datasets/list/dataset-card/hooks/use-dataset-card-state.ts b/web/app/components/datasets/list/dataset-card/hooks/use-dataset-card-state.tsindex 850eee43642..6cffbb68282 100644--- a/web/app/components/datasets/list/dataset-card/hooks/use-dataset-card-state.ts+++ b/web/app/components/datasets/list/dataset-card/hooks/use-dataset-card-state.ts@@ -1,8 +1,8 @@import type { Tag } from '@/app/components/base/tag-management/constant'import type { DataSet } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useCheckDatasetUsage, useDeleteDataset } from '@/service/use-dataset-card'import { useExportPipelineDSL } from '@/service/use-pipeline'import { downloadBlob } from '@/utils/download'diff --git a/web/app/components/datasets/list/dataset-card/operations.tsx b/web/app/components/datasets/list/dataset-card/operations.tsxindex 9d116572192..1349ae05e72 100644--- a/web/app/components/datasets/list/dataset-card/operations.tsx+++ b/web/app/components/datasets/list/dataset-card/operations.tsx@@ -1,9 +1,9 @@-import * as React from 'react'-import { useTranslation } from 'react-i18next'import {DropdownMenuItem,DropdownMenuSeparator,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import * as React from 'react'+import { useTranslation } from 'react-i18next'type OperationsProps = {showDelete: booleandiff --git a/web/app/components/datasets/list/index.tsx b/web/app/components/datasets/list/index.tsxindex ffc9950f46c..34be78ab3ff 100644--- a/web/app/components/datasets/list/index.tsx+++ b/web/app/components/datasets/list/index.tsx@@ -1,16 +1,16 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { useBoolean, useDebounceFn } from 'ahooks'// Librariesimport { useState } from 'react'-import { useTranslation } from 'react-i18next'+import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import TagManagementModal from '@/app/components/base/tag-management'import TagFilter from '@/app/components/base/tag-management/filter'// Hooksimport { useStore as useTagStore } from '@/app/components/base/tag-management/store'-import { Button } from '@/app/components/base/ui/button'import CheckboxWithLabel from '@/app/components/datasets/create/website/base/checkbox-with-label'import { useAppContext, useSelector as useAppContextSelector } from '@/context/app-context'import { useExternalApiPanel } from '@/context/external-api-panel-context'diff --git a/web/app/components/datasets/metadata/add-metadata-button.tsx b/web/app/components/datasets/metadata/add-metadata-button.tsxindex 8bf1c92023b..a8070dcaa12 100644--- a/web/app/components/datasets/metadata/add-metadata-button.tsx+++ b/web/app/components/datasets/metadata/add-metadata-button.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiAddLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type Props = {className?: stringdiff --git a/web/app/components/datasets/metadata/edit-metadata-batch/__tests__/modal.spec.tsx b/web/app/components/datasets/metadata/edit-metadata-batch/__tests__/modal.spec.tsxindex 40c925222c2..060befe7d30 100644--- a/web/app/components/datasets/metadata/edit-metadata-batch/__tests__/modal.spec.tsx+++ b/web/app/components/datasets/metadata/edit-metadata-batch/__tests__/modal.spec.tsx@@ -30,7 +30,7 @@ vi.mock('../../hooks/use-check-metadata-name', () => ({// Mock Toast to verify notificationsconst mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => mockToastNotify(args),},diff --git a/web/app/components/datasets/metadata/edit-metadata-batch/input-combined.tsx b/web/app/components/datasets/metadata/edit-metadata-batch/input-combined.tsxindex f11dba75331..3ac9baa006a 100644--- a/web/app/components/datasets/metadata/edit-metadata-batch/input-combined.tsx+++ b/web/app/components/datasets/metadata/edit-metadata-batch/input-combined.tsx@@ -1,8 +1,6 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import Input from '@/app/components/base/input'import {NumberField,NumberFieldControls,@@ -10,7 +8,9 @@ import {NumberFieldGroup,NumberFieldIncrement,NumberFieldInput,-} from '@/app/components/base/ui/number-field'+} from '@langgenius/dify-ui/number-field'+import * as React from 'react'+import Input from '@/app/components/base/input'import Datepicker from '../base/date-picker'import { DataType } from '../types'diff --git a/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx b/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsxindex 974ce977e73..8253f7faf69 100644--- a/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx+++ b/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx@@ -1,14 +1,14 @@'use client'import type { FC } from 'react'import type { BuiltInMetadataItem, MetadataItemInBatchEdit, MetadataItemWithEdit } from '../types'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiQuestionLine } from '@remixicon/react'import { produce } from 'immer'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useCreateMetaData } from '@/service/knowledge/use-metadata'import Checkbox from '../../../base/checkbox'import Modal from '../../../base/modal'diff --git a/web/app/components/datasets/metadata/hooks/__tests__/use-batch-edit-document-metadata.spec.ts b/web/app/components/datasets/metadata/hooks/__tests__/use-batch-edit-document-metadata.spec.tsindex a4650bac43c..84af2334943 100644--- a/web/app/components/datasets/metadata/hooks/__tests__/use-batch-edit-document-metadata.spec.ts+++ b/web/app/components/datasets/metadata/hooks/__tests__/use-batch-edit-document-metadata.spec.ts@@ -34,7 +34,7 @@ vi.mock('@/service/knowledge/use-metadata', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/datasets/metadata/hooks/__tests__/use-edit-dataset-metadata.spec.ts b/web/app/components/datasets/metadata/hooks/__tests__/use-edit-dataset-metadata.spec.tsindex 2fc6f3d0840..6fa6f6f4418 100644--- a/web/app/components/datasets/metadata/hooks/__tests__/use-edit-dataset-metadata.spec.ts+++ b/web/app/components/datasets/metadata/hooks/__tests__/use-edit-dataset-metadata.spec.ts@@ -40,7 +40,7 @@ vi.mock('@/service/knowledge/use-metadata', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: vi.fn(),},diff --git a/web/app/components/datasets/metadata/hooks/__tests__/use-metadata-document.spec.ts b/web/app/components/datasets/metadata/hooks/__tests__/use-metadata-document.spec.tsindex 9d8b73aaaa3..a13378ea80c 100644--- a/web/app/components/datasets/metadata/hooks/__tests__/use-metadata-document.spec.ts+++ b/web/app/components/datasets/metadata/hooks/__tests__/use-metadata-document.spec.ts@@ -81,7 +81,7 @@ vi.mock('@/hooks/use-metadata', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: vi.fn(),},diff --git a/web/app/components/datasets/metadata/hooks/use-batch-edit-document-metadata.ts b/web/app/components/datasets/metadata/hooks/use-batch-edit-document-metadata.tsindex 16252909a2f..df78b09fcac 100644--- a/web/app/components/datasets/metadata/hooks/use-batch-edit-document-metadata.ts+++ b/web/app/components/datasets/metadata/hooks/use-batch-edit-document-metadata.ts@@ -1,9 +1,9 @@import type { MetadataBatchEditToServer, MetadataItemInBatchEdit, MetadataItemWithEdit, MetadataItemWithValue } from '../types'import type { SimpleDocumentDetail } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import { t } from 'i18next'import { useMemo } from 'react'-import { toast } from '@/app/components/base/ui/toast'import { useBatchUpdateDocMetadata } from '@/service/knowledge/use-metadata'import { UpdateType } from '../types'diff --git a/web/app/components/datasets/metadata/hooks/use-edit-dataset-metadata.ts b/web/app/components/datasets/metadata/hooks/use-edit-dataset-metadata.tsindex 8f7ce0ab250..01ad98ef26d 100644--- a/web/app/components/datasets/metadata/hooks/use-edit-dataset-metadata.ts+++ b/web/app/components/datasets/metadata/hooks/use-edit-dataset-metadata.ts@@ -1,9 +1,9 @@import type { BuiltInMetadataItem, MetadataItemWithValueLength } from '../types'import type { DataSet } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useBuiltInMetaDataFields, useCreateMetaData, useDatasetMetaData, useDeleteMetaData, useRenameMeta, useUpdateBuiltInStatus } from '@/service/knowledge/use-metadata'import { isShowManageMetadataLocalStorageKey } from '../types'import useCheckMetadataName from './use-check-metadata-name'diff --git a/web/app/components/datasets/metadata/hooks/use-metadata-document.ts b/web/app/components/datasets/metadata/hooks/use-metadata-document.tsindex d70870690af..aa6162fb0d0 100644--- a/web/app/components/datasets/metadata/hooks/use-metadata-document.ts+++ b/web/app/components/datasets/metadata/hooks/use-metadata-document.ts@@ -1,9 +1,9 @@import type { BuiltInMetadataItem, MetadataItemWithValue } from '../types'import type { FullDocumentDetail } from '@/models/datasets'+import { toast } from '@langgenius/dify-ui/toast'import { get } from 'es-toolkit/compat'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useDatasetDetailContext } from '@/context/dataset-detail'import { useLanguages, useMetadataMap } from '@/hooks/use-metadata'import { useBatchUpdateDocMetadata, useCreateMetaData, useDatasetMetaData, useDocumentMetaData } from '@/service/knowledge/use-metadata'diff --git a/web/app/components/datasets/metadata/metadata-dataset/__tests__/create-metadata-modal.spec.tsx b/web/app/components/datasets/metadata/metadata-dataset/__tests__/create-metadata-modal.spec.tsxindex 1449ef8f600..7d09f4749ae 100644--- a/web/app/components/datasets/metadata/metadata-dataset/__tests__/create-metadata-modal.spec.tsx+++ b/web/app/components/datasets/metadata/metadata-dataset/__tests__/create-metadata-modal.spec.tsx@@ -26,7 +26,7 @@ type CreateContentProps = {hasBack?: boolean}-vi.mock('../../../../base/ui/popover', async () => {+vi.mock('@langgenius/dify-ui/popover', async () => {const React = await import('react')const PopoverContext = React.createContext<{ open: boolean, onOpenChange?: (open: boolean) => void } | null>(null)diff --git a/web/app/components/datasets/metadata/metadata-dataset/__tests__/dataset-metadata-drawer.spec.tsx b/web/app/components/datasets/metadata/metadata-dataset/__tests__/dataset-metadata-drawer.spec.tsxindex 95e9c130edc..55e5f9de65e 100644--- a/web/app/components/datasets/metadata/metadata-dataset/__tests__/dataset-metadata-drawer.spec.tsx+++ b/web/app/components/datasets/metadata/metadata-dataset/__tests__/dataset-metadata-drawer.spec.tsx@@ -23,7 +23,7 @@ vi.mock('../../hooks/use-check-metadata-name', () => ({}))const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => mockToastNotify(args),},diff --git a/web/app/components/datasets/metadata/metadata-dataset/__tests__/select-metadata-modal.spec.tsx b/web/app/components/datasets/metadata/metadata-dataset/__tests__/select-metadata-modal.spec.tsxindex 2a31169b15b..0ac3743a861 100644--- a/web/app/components/datasets/metadata/metadata-dataset/__tests__/select-metadata-modal.spec.tsx+++ b/web/app/components/datasets/metadata/metadata-dataset/__tests__/select-metadata-modal.spec.tsx@@ -50,7 +50,7 @@ vi.mock('@/service/knowledge/use-metadata', () => ({}),}))-vi.mock('../../../../base/ui/popover', async () => {+vi.mock('@langgenius/dify-ui/popover', async () => {const React = await import('react')const PopoverContext = React.createContext<{ open: boolean, onOpenChange?: (open: boolean) => void } | null>(null)diff --git a/web/app/components/datasets/metadata/metadata-dataset/create-metadata-modal.tsx b/web/app/components/datasets/metadata/metadata-dataset/create-metadata-modal.tsxindex 1e2e8fd9e82..687266eed98 100644--- a/web/app/components/datasets/metadata/metadata-dataset/create-metadata-modal.tsx+++ b/web/app/components/datasets/metadata/metadata-dataset/create-metadata-modal.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'import type { Props as CreateContentProps } from './create-content'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import * as React from 'react'-import { Popover, PopoverContent, PopoverTrigger } from '../../../base/ui/popover'import CreateContent from './create-content'type Props = {diff --git a/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx b/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsxindex 421babfb91a..03c9883fbf9 100644--- a/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx+++ b/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx@@ -1,7 +1,19 @@'use client'import type { FC } from 'react'import type { BuiltInMetadataItem, MetadataItemWithValueLength } from '../types'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'import { RiAddLine, RiDeleteBinLine, RiEditLine } from '@remixicon/react'import { useBoolean, useHover } from 'ahooks'import * as React from 'react'@@ -10,19 +22,7 @@ import { useTranslation } from 'react-i18next'import Drawer from '@/app/components/base/drawer'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import CreateModal from '@/app/components/datasets/metadata/metadata-dataset/create-metadata-modal'import { getIcon } from '../utils/get-icon'import Field from './field'diff --git a/web/app/components/datasets/metadata/metadata-dataset/select-metadata-modal.tsx b/web/app/components/datasets/metadata/metadata-dataset/select-metadata-modal.tsxindex f33a85642eb..e0ed692677c 100644--- a/web/app/components/datasets/metadata/metadata-dataset/select-metadata-modal.tsx+++ b/web/app/components/datasets/metadata/metadata-dataset/select-metadata-modal.tsx@@ -1,11 +1,11 @@'use client'+import type { Placement } from '@langgenius/dify-ui/popover'import type { FC } from 'react'import type { MetadataItem } from '../types'import type { Props as CreateContentProps } from './create-content'-import type { Placement } from '@/app/components/base/ui/placement'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import * as React from 'react'import { useCallback, useState } from 'react'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import { useDatasetMetaData } from '@/service/knowledge/use-metadata'import CreateContent from './create-content'import SelectMetadata from './select-metadata'diff --git a/web/app/components/datasets/metadata/metadata-document/index.tsx b/web/app/components/datasets/metadata/metadata-document/index.tsxindex 6fb069dd02f..18ee6e04eaa 100644--- a/web/app/components/datasets/metadata/metadata-document/index.tsx+++ b/web/app/components/datasets/metadata/metadata-document/index.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'import type { FullDocumentDetail } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiEditLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import { Button } from '@/app/components/base/ui/button'import useMetadataDocument from '../hooks/use-metadata-document'import InfoGroup from './info-group'import NoData from './no-data'diff --git a/web/app/components/datasets/metadata/metadata-document/no-data.tsx b/web/app/components/datasets/metadata/metadata-document/no-data.tsxindex e444827f1db..ee04c80be26 100644--- a/web/app/components/datasets/metadata/metadata-document/no-data.tsx+++ b/web/app/components/datasets/metadata/metadata-document/no-data.tsx@@ -1,9 +1,9 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowRightLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type Props = {onStart: () => voiddiff --git a/web/app/components/datasets/rename-modal/__tests__/index.spec.tsx b/web/app/components/datasets/rename-modal/__tests__/index.spec.tsxindex 600e6c3434e..4f8a421a52e 100644--- a/web/app/components/datasets/rename-modal/__tests__/index.spec.tsx+++ b/web/app/components/datasets/rename-modal/__tests__/index.spec.tsx@@ -17,7 +17,7 @@ const { mockToast } = vi.hoisted(() => {return { mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/datasets/rename-modal/index.tsx b/web/app/components/datasets/rename-modal/index.tsxindex acfca2bbbc9..a62c1c93bee 100644--- a/web/app/components/datasets/rename-modal/index.tsx+++ b/web/app/components/datasets/rename-modal/index.tsx@@ -2,7 +2,9 @@import type { MouseEventHandler } from 'react'import type { AppIconSelection } from '../../base/app-icon-picker'import type { DataSet } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import { useCallback, useRef, useState } from 'react'@@ -10,8 +12,6 @@ import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'import Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { updateDatasetSetting } from '@/service/datasets'import AppIcon from '../../base/app-icon'import AppIconPicker from '../../base/app-icon-picker'diff --git a/web/app/components/datasets/settings/form/__tests__/index.spec.tsx b/web/app/components/datasets/settings/form/__tests__/index.spec.tsxindex a3a22e000b9..94eda16b2e3 100644--- a/web/app/components/datasets/settings/form/__tests__/index.spec.tsx+++ b/web/app/components/datasets/settings/form/__tests__/index.spec.tsx@@ -193,7 +193,7 @@ vi.mock('@/app/components/datasets/common/check-rerank-model', () => ({isReRankModelSelected: () => true,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,success: vi.fn(),@@ -396,7 +396,7 @@ describe('Form', () => {})it('should show error when trying to save with empty name', async () => {- const { toast } = await import('@/app/components/base/ui/toast')+ const { toast } = await import('@langgenius/dify-ui/toast')render(<Form />)// Clear the namediff --git a/web/app/components/datasets/settings/form/hooks/__tests__/use-form-state.spec.ts b/web/app/components/datasets/settings/form/hooks/__tests__/use-form-state.spec.tsindex ece275c4336..62d41a4ce0d 100644--- a/web/app/components/datasets/settings/form/hooks/__tests__/use-form-state.spec.ts+++ b/web/app/components/datasets/settings/form/hooks/__tests__/use-form-state.spec.ts@@ -127,7 +127,7 @@ vi.mock('@/app/components/datasets/common/check-rerank-model', () => ({isReRankModelSelected: () => true,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: mockToastSuccess,error: mockToastError,@@ -429,7 +429,7 @@ describe('useFormState', () => {describe('handleSave', () => {it('should show error toast when name is empty', async () => {- const { toast } = await import('@/app/components/base/ui/toast')+ const { toast } = await import('@langgenius/dify-ui/toast')const { result } = renderHook(() => useFormState())act(() => {@@ -444,7 +444,7 @@ describe('useFormState', () => {})it('should show error toast when name is whitespace only', async () => {- const { toast } = await import('@/app/components/base/ui/toast')+ const { toast } = await import('@langgenius/dify-ui/toast')const { result } = renderHook(() => useFormState())act(() => {@@ -477,7 +477,7 @@ describe('useFormState', () => {})it('should show success toast on successful save', async () => {- const { toast } = await import('@/app/components/base/ui/toast')+ const { toast } = await import('@langgenius/dify-ui/toast')const { result } = renderHook(() => useFormState())await act(async () => {@@ -550,7 +550,7 @@ describe('useFormState', () => {it('should show error toast on save failure', async () => {const { updateDatasetSetting } = await import('@/service/datasets')- const { toast } = await import('@/app/components/base/ui/toast')+ const { toast } = await import('@langgenius/dify-ui/toast')vi.mocked(updateDatasetSetting).mockRejectedValueOnce(new Error('Network error'))const { result } = renderHook(() => useFormState())diff --git a/web/app/components/datasets/settings/form/hooks/use-form-state.ts b/web/app/components/datasets/settings/form/hooks/use-form-state.tsindex d00534f7f48..ff61c1e815a 100644--- a/web/app/components/datasets/settings/form/hooks/use-form-state.ts+++ b/web/app/components/datasets/settings/form/hooks/use-form-state.ts@@ -4,9 +4,9 @@ import type { DefaultModel } from '@/app/components/header/account-setting/modelimport type { Member } from '@/models/common'import type { IconInfo, SummaryIndexSetting as SummaryIndexSettingType } from '@/models/datasets'import type { RetrievalConfig } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { isReRankModelSelected } from '@/app/components/datasets/common/check-rerank-model'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useModelList } from '@/app/components/header/account-setting/model-provider-page/hooks'diff --git a/web/app/components/datasets/settings/form/index.tsx b/web/app/components/datasets/settings/form/index.tsxindex 99ebf843076..f103d9d951f 100644--- a/web/app/components/datasets/settings/form/index.tsx+++ b/web/app/components/datasets/settings/form/index.tsx@@ -1,7 +1,7 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import { Button } from '@/app/components/base/ui/button'import BasicInfoSection from './components/basic-info-section'import ExternalKnowledgeSection from './components/external-knowledge-section'import IndexingSection from './components/indexing-section'diff --git a/web/app/components/datasets/settings/index-method/keyword-number.tsx b/web/app/components/datasets/settings/index-method/keyword-number.tsxindex 03992fb027e..1f467e17989 100644--- a/web/app/components/datasets/settings/index-method/keyword-number.tsx+++ b/web/app/components/datasets/settings/index-method/keyword-number.tsx@@ -1,7 +1,3 @@-import * as React from 'react'-import { useCallback } from 'react'-import { useTranslation } from 'react-i18next'-import Tooltip from '@/app/components/base/tooltip'import {NumberField,NumberFieldControls,@@ -9,8 +5,12 @@ import {NumberFieldGroup,NumberFieldIncrement,NumberFieldInput,-} from '@/app/components/base/ui/number-field'-import { Slider } from '@/app/components/base/ui/slider'+} from '@langgenius/dify-ui/number-field'+import { Slider } from '@langgenius/dify-ui/slider'+import * as React from 'react'+import { useCallback } from 'react'+import { useTranslation } from 'react-i18next'+import Tooltip from '@/app/components/base/tooltip'const MIN_KEYWORD_NUMBER = 0const MAX_KEYWORD_NUMBER = 50diff --git a/web/app/components/datasets/settings/permission-selector/index.tsx b/web/app/components/datasets/settings/permission-selector/index.tsxindex 8c31799adde..a9b0c348d8c 100644--- a/web/app/components/datasets/settings/permission-selector/index.tsx+++ b/web/app/components/datasets/settings/permission-selector/index.tsx@@ -1,4 +1,5 @@import type { Member } from '@/models/common'+import { Avatar } from '@langgenius/dify-ui/avatar'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowDownSLine, RiGroup2Line, RiLock2Line } from '@remixicon/react'import { useDebounceFn } from 'ahooks'@@ -11,7 +12,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Avatar } from '@/app/components/base/ui/avatar'import { useSelector as useAppContextWithSelector } from '@/context/app-context'import { DatasetPermission } from '@/models/datasets'import MemberItem from './member-item'diff --git a/web/app/components/datasets/settings/summary-index-setting.tsx b/web/app/components/datasets/settings/summary-index-setting.tsxindex 0a25f820c55..3bd47bf4b9d 100644--- a/web/app/components/datasets/settings/summary-index-setting.tsx+++ b/web/app/components/datasets/settings/summary-index-setting.tsx@@ -1,13 +1,13 @@import type { ChangeEvent } from 'react'import type { DefaultModel } from '@/app/components/header/account-setting/model-provider-page/declarations'import type { SummaryIndexSetting as SummaryIndexSettingType } from '@/models/datasets'+import { Switch } from '@langgenius/dify-ui/switch'import {memo,useCallback,useMemo,} from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'import Textarea from '@/app/components/base/textarea'import Tooltip from '@/app/components/base/tooltip'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'diff --git a/web/app/components/develop/secret-key/secret-key-button.tsx b/web/app/components/develop/secret-key/secret-key-button.tsxindex 575ad93e883..ca5eb184034 100644--- a/web/app/components/develop/secret-key/secret-key-button.tsx+++ b/web/app/components/develop/secret-key/secret-key-button.tsx@@ -1,8 +1,8 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { RiKey2Line } from '@remixicon/react'import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import SecretKeyModal from '@/app/components/develop/secret-key/secret-key-modal'type ISecretKeyButtonProps = {diff --git a/web/app/components/develop/secret-key/secret-key-generate.tsx b/web/app/components/develop/secret-key/secret-key-generate.tsxindex 85bcd0db1cd..1fb6e657144 100644--- a/web/app/components/develop/secret-key/secret-key-generate.tsx+++ b/web/app/components/develop/secret-key/secret-key-generate.tsx@@ -1,9 +1,9 @@'use client'import type { CreateApiKeyResponse } from '@/models/app'import { XMarkIcon } from '@heroicons/react/20/solid'+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import InputCopy from './input-copy'import s from './style.module.css'diff --git a/web/app/components/develop/secret-key/secret-key-modal.tsx b/web/app/components/develop/secret-key/secret-key-modal.tsxindex 58895b26d6b..e8d92043184 100644--- a/web/app/components/develop/secret-key/secret-key-modal.tsx+++ b/web/app/components/develop/secret-key/secret-key-modal.tsx@@ -1,6 +1,16 @@'use client'import type { CreateApiKeyResponse } from '@/models/app'import { PlusIcon, XMarkIcon } from '@heroicons/react/20/solid'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import { RiDeleteBinLine } from '@remixicon/react'import {useState,@@ -10,16 +20,6 @@ import ActionButton from '@/app/components/base/action-button'import CopyFeedback from '@/app/components/base/copy-feedback'import Loading from '@/app/components/base/loading'import Modal from '@/app/components/base/modal'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'import { useAppContext } from '@/context/app-context'import useTimestamp from '@/hooks/use-timestamp'import {diff --git a/web/app/components/explore/app-card/index.tsx b/web/app/components/explore/app-card/index.tsxindex 00e21de7d68..869e2a6a181 100644--- a/web/app/components/explore/app-card/index.tsx+++ b/web/app/components/explore/app-card/index.tsx@@ -2,12 +2,12 @@import type { App } from '@/models/explore'import type { TryAppSelection } from '@/types/try-app'import { PlusIcon } from '@heroicons/react/20/solid'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiInformation2Line } from '@remixicon/react'import { useTranslation } from 'react-i18next'import { trackEvent } from '@/app/components/base/amplitude'import AppIcon from '@/app/components/base/app-icon'-import { Button } from '@/app/components/base/ui/button'import { useGlobalPublicStore } from '@/context/global-public-context'import { AppModeEnum } from '@/types/app'import { AppTypeIcon } from '../../app/type-selector'diff --git a/web/app/components/explore/app-list/index.tsx b/web/app/components/explore/app-list/index.tsxindex b0e20c531a1..d57283b9997 100644--- a/web/app/components/explore/app-list/index.tsx+++ b/web/app/components/explore/app-list/index.tsx@@ -3,6 +3,7 @@import type { CreateAppModalProps } from '@/app/components/explore/create-app-modal'import type { App } from '@/models/explore'import type { TryAppSelection } from '@/types/try-app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useDebounceFn } from 'ahooks'import { useQueryState } from 'nuqs'@@ -12,7 +13,6 @@ import { useTranslation } from 'react-i18next'import DSLConfirmModal from '@/app/components/app/create-from-dsl-modal/dsl-confirm-modal'import Input from '@/app/components/base/input'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'import AppCard from '@/app/components/explore/app-card'import Banner from '@/app/components/explore/banner/banner'import Category from '@/app/components/explore/category'diff --git a/web/app/components/explore/create-app-modal/index.tsx b/web/app/components/explore/create-app-modal/index.tsxindex ebfb562b0c5..ebe5a79a162 100644--- a/web/app/components/explore/create-app-modal/index.tsx+++ b/web/app/components/explore/create-app-modal/index.tsx@@ -1,5 +1,8 @@'use client'import type { AppIconType } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'+import { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import { useDebounceFn, useKeyPress } from 'ahooks'import { noop } from 'es-toolkit/function'@@ -9,10 +12,7 @@ import { useTranslation } from 'react-i18next'import AppIcon from '@/app/components/base/app-icon'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import Switch from '@/app/components/base/switch'import Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import AppsFull from '@/app/components/billing/apps-full-in-dialog'import { useProviderContext } from '@/context/provider-context'import { AppModeEnum } from '@/types/app'diff --git a/web/app/components/explore/item-operation/__tests__/index.spec.tsx b/web/app/components/explore/item-operation/__tests__/index.spec.tsxindex d54c644ab08..268fe8ebea6 100644--- a/web/app/components/explore/item-operation/__tests__/index.spec.tsx+++ b/web/app/components/explore/item-operation/__tests__/index.spec.tsx@@ -2,7 +2,7 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react'import * as React from 'react'import ItemOperation from '../index'-vi.mock('@/app/components/base/ui/dropdown-menu', () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', () => {const DropdownMenuContext = React.createContext<{ isOpen: boolean, setOpen: (open: boolean) => void } | null>(null)const useDropdownMenuContext = () => {diff --git a/web/app/components/explore/item-operation/index.tsx b/web/app/components/explore/item-operation/index.tsxindex 72bd00fa6e3..0d9d57841e3 100644--- a/web/app/components/explore/item-operation/index.tsx+++ b/web/app/components/explore/item-operation/index.tsx@@ -1,6 +1,12 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import {RiDeleteBinLine,RiEditLine,@@ -9,12 +15,6 @@ import { useBoolean } from 'ahooks'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import { Pin02 } from '../../base/icons/src/vender/line/general'import s from './style.module.css'diff --git a/web/app/components/explore/sidebar/__tests__/index.spec.tsx b/web/app/components/explore/sidebar/__tests__/index.spec.tsxindex 0ce98f45db2..cce42d6322b 100644--- a/web/app/components/explore/sidebar/__tests__/index.spec.tsx+++ b/web/app/components/explore/sidebar/__tests__/index.spec.tsx@@ -47,8 +47,8 @@ vi.mock('@/service/use-explore', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/explore/sidebar/index.tsx b/web/app/components/explore/sidebar/index.tsxindex 85602a6bcc3..c6128cb560f 100644--- a/web/app/components/explore/sidebar/index.tsx+++ b/web/app/components/explore/sidebar/index.tsx@@ -1,10 +1,4 @@'use client'-import { cn } from '@langgenius/dify-ui/cn'-import { useBoolean } from 'ahooks'-import * as React from 'react'-import { useState } from 'react'-import { useTranslation } from 'react-i18next'-import Divider from '@/app/components/base/divider'import {AlertDialog,AlertDialogActions,@@ -13,9 +7,15 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { ScrollArea } from '@/app/components/base/ui/scroll-area'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/alert-dialog'+import { cn } from '@langgenius/dify-ui/cn'+import { ScrollArea } from '@langgenius/dify-ui/scroll-area'+import { toast } from '@langgenius/dify-ui/toast'+import { useBoolean } from 'ahooks'+import * as React from 'react'+import { useState } from 'react'+import { useTranslation } from 'react-i18next'+import Divider from '@/app/components/base/divider'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'import Link from '@/next/link'import { useSelectedLayoutSegments } from '@/next/navigation'diff --git a/web/app/components/explore/try-app/app-info/index.tsx b/web/app/components/explore/try-app/app-info/index.tsxindex 441fabca829..a2c8c26e9f0 100644--- a/web/app/components/explore/try-app/app-info/index.tsx+++ b/web/app/components/explore/try-app/app-info/index.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'import type { TryAppInfo } from '@/service/try-app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useTranslation } from 'react-i18next'import { AppTypeIcon } from '@/app/components/app/type-selector'import AppIcon from '@/app/components/base/app-icon'-import { Button } from '@/app/components/base/ui/button'import useGetRequirements from './use-get-requirements'type Props = {diff --git a/web/app/components/explore/try-app/index.tsx b/web/app/components/explore/try-app/index.tsxindex 644047d06f8..209bde9cb6f 100644--- a/web/app/components/explore/try-app/index.tsx+++ b/web/app/components/explore/try-app/index.tsx@@ -2,12 +2,12 @@'use client'import type { FC } from 'react'import type { App as AppType } from '@/models/explore'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useState } from 'react'import AppUnavailable from '@/app/components/base/app-unavailable'import Loading from '@/app/components/base/loading'import Modal from '@/app/components/base/modal/index'-import { Button } from '@/app/components/base/ui/button'import { IS_CLOUD_EDITION } from '@/config'import { useGlobalPublicStore } from '@/context/global-public-context'import { useGetTryAppInfo } from '@/service/use-try-app'diff --git a/web/app/components/goto-anything/index.tsx b/web/app/components/goto-anything/index.tsxindex f3bf40f62a2..13f43ba75a7 100644--- a/web/app/components/goto-anything/index.tsx+++ b/web/app/components/goto-anything/index.tsx@@ -1,10 +1,10 @@'use client'import type { FC, KeyboardEvent } from 'react'+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'import { Command } from 'cmdk'import { useCallback, useEffect, useMemo, useRef } from 'react'import { useTranslation } from 'react-i18next'-import { Dialog, DialogContent } from '@/app/components/base/ui/dialog'import InstallFromMarketplace from '../plugins/install-plugin/install-from-marketplace'import { SlashCommandProvider } from './actions/commands'import { slashCommandRegistry } from './actions/commands/registry'diff --git a/web/app/components/header/account-about/index.tsx b/web/app/components/header/account-about/index.tsxindex cdab2815dca..93754975667 100644--- a/web/app/components/header/account-about/index.tsx+++ b/web/app/components/header/account-about/index.tsx@@ -1,11 +1,11 @@'use client'import type { LangGeniusVersionResponse } from '@/models/common'+import { Button } from '@langgenius/dify-ui/button'import { RiCloseLine } from '@remixicon/react'import dayjs from 'dayjs'import { useTranslation } from 'react-i18next'import DifyLogo from '@/app/components/base/logo/dify-logo'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import { IS_CE_EDITION } from '@/config'import { useGlobalPublicStore } from '@/context/global-public-context'diff --git a/web/app/components/header/account-dropdown/__tests__/compliance.spec.tsx b/web/app/components/header/account-dropdown/__tests__/compliance.spec.tsxindex 15439b157fa..b4a700e22d1 100644--- a/web/app/components/header/account-dropdown/__tests__/compliance.spec.tsx+++ b/web/app/components/header/account-dropdown/__tests__/compliance.spec.tsx@@ -1,8 +1,8 @@import type { ModalContextState } from '@/context/modal-context'+import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@langgenius/dify-ui/dropdown-menu'+import { toast } from '@langgenius/dify-ui/toast'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@/app/components/base/ui/dropdown-menu'-import { toast } from '@/app/components/base/ui/toast'import { Plan } from '@/app/components/billing/type'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { useModalContext } from '@/context/modal-context'diff --git a/web/app/components/header/account-dropdown/__tests__/support.spec.tsx b/web/app/components/header/account-dropdown/__tests__/support.spec.tsxindex a826038ad04..38be78abf5f 100644--- a/web/app/components/header/account-dropdown/__tests__/support.spec.tsx+++ b/web/app/components/header/account-dropdown/__tests__/support.spec.tsx@@ -1,7 +1,7 @@import type { AppContextValue } from '@/context/app-context'-import { fireEvent, render, screen } from '@testing-library/react'+import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@langgenius/dify-ui/dropdown-menu'-import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@/app/components/base/ui/dropdown-menu'+import { fireEvent, render, screen } from '@testing-library/react'import { Plan } from '@/app/components/billing/type'import { useAppContext } from '@/context/app-context'import { baseProviderContextValue, useProviderContext } from '@/context/provider-context'diff --git a/web/app/components/header/account-dropdown/compliance.tsx b/web/app/components/header/account-dropdown/compliance.tsxindex 2f79c631fbc..4f5b79fc662 100644--- a/web/app/components/header/account-dropdown/compliance.tsx+++ b/web/app/components/header/account-dropdown/compliance.tsx@@ -1,11 +1,11 @@import type { ReactNode } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger } from '@langgenius/dify-ui/dropdown-menu'+import { toast } from '@langgenius/dify-ui/toast'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useMutation } from '@tanstack/react-query'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger } from '@/app/components/base/ui/dropdown-menu'-import { toast } from '@/app/components/base/ui/toast'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { Plan } from '@/app/components/billing/type'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { useModalContext } from '@/context/modal-context'diff --git a/web/app/components/header/account-dropdown/index.tsx b/web/app/components/header/account-dropdown/index.tsxindex 8552852b817..27a601a4ab2 100644--- a/web/app/components/header/account-dropdown/index.tsx+++ b/web/app/components/header/account-dropdown/index.tsx@@ -1,14 +1,14 @@'use client'import type { MouseEventHandler, ReactNode } from 'react'+import { Avatar } from '@langgenius/dify-ui/avatar'import { cn } from '@langgenius/dify-ui/cn'+import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLinkItem, DropdownMenuSeparator, DropdownMenuTrigger } from '@langgenius/dify-ui/dropdown-menu'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { resetUser } from '@/app/components/base/amplitude/utils'import PremiumBadge from '@/app/components/base/premium-badge'import ThemeSwitcher from '@/app/components/base/theme-switcher'-import { Avatar } from '@/app/components/base/ui/avatar'-import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLinkItem, DropdownMenuSeparator, DropdownMenuTrigger } from '@/app/components/base/ui/dropdown-menu'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import { IS_CLOUD_EDITION } from '@/config'import { useAppContext } from '@/context/app-context'diff --git a/web/app/components/header/account-dropdown/support.tsx b/web/app/components/header/account-dropdown/support.tsxindex 97d87ac7e12..9a7023c415a 100644--- a/web/app/components/header/account-dropdown/support.tsx+++ b/web/app/components/header/account-dropdown/support.tsx@@ -1,5 +1,5 @@+import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuLinkItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger } from '@langgenius/dify-ui/dropdown-menu'import { useTranslation } from 'react-i18next'-import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuLinkItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger } from '@/app/components/base/ui/dropdown-menu'import { toggleZendeskWindow } from '@/app/components/base/zendesk/utils'import { Plan } from '@/app/components/billing/type'import { SUPPORT_EMAIL_ADDRESS, ZENDESK_WIDGET_KEY } from '@/config'diff --git a/web/app/components/header/account-dropdown/workplace-selector/__tests__/index.spec.tsx b/web/app/components/header/account-dropdown/workplace-selector/__tests__/index.spec.tsxindex 7e4a969089b..28b07d114b1 100644--- a/web/app/components/header/account-dropdown/workplace-selector/__tests__/index.spec.tsx+++ b/web/app/components/header/account-dropdown/workplace-selector/__tests__/index.spec.tsx@@ -33,7 +33,7 @@ vi.mock('@/service/common', () => ({switchWorkspace: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => toastMocks.mockNotify(args),},@@ -45,8 +45,8 @@ vi.mock('@/app/components/base/ui/toast', () => ({},}))-vi.mock('@/app/components/base/ui/select', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/select')>()+vi.mock('@langgenius/dify-ui/select', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/select')>()return {...actual,diff --git a/web/app/components/header/account-dropdown/workplace-selector/index.tsx b/web/app/components/header/account-dropdown/workplace-selector/index.tsxindex bb96137fb38..ae6f6729fd2 100644--- a/web/app/components/header/account-dropdown/workplace-selector/index.tsx+++ b/web/app/components/header/account-dropdown/workplace-selector/index.tsx@@ -1,5 +1,4 @@import type { Plan } from '@/app/components/billing/type'-import { useTranslation } from 'react-i18next'import {Select,SelectContent,@@ -8,8 +7,9 @@ import {SelectItemText,SelectLabel,SelectTrigger,-} from '@/app/components/base/ui/select'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/select'+import { toast } from '@langgenius/dify-ui/toast'+import { useTranslation } from 'react-i18next'import PlanBadge from '@/app/components/header/plan-badge'import { useWorkspacesContext } from '@/context/workspace-context'import { switchWorkspace } from '@/service/common'diff --git a/web/app/components/header/account-setting/__tests__/menu-dialog.dialog.spec.tsx b/web/app/components/header/account-setting/__tests__/menu-dialog.dialog.spec.tsxindex db8aec4ec1d..3ed0b70968e 100644--- a/web/app/components/header/account-setting/__tests__/menu-dialog.dialog.spec.tsx+++ b/web/app/components/header/account-setting/__tests__/menu-dialog.dialog.spec.tsx@@ -10,7 +10,7 @@ type DialogProps = {let latestOnOpenChange: DialogProps['onOpenChange']-vi.mock('@/app/components/base/ui/dialog', () => ({+vi.mock('@langgenius/dify-ui/dialog', () => ({Dialog: ({ children, onOpenChange }: DialogProps) => {latestOnOpenChange = onOpenChangereturn <div data-testid="dialog">{children}</div>diff --git a/web/app/components/header/account-setting/api-based-extension-page/__tests__/modal.spec.tsx b/web/app/components/header/account-setting/api-based-extension-page/__tests__/modal.spec.tsxindex 8bfc1b13df0..e006a6be039 100644--- a/web/app/components/header/account-setting/api-based-extension-page/__tests__/modal.spec.tsx+++ b/web/app/components/header/account-setting/api-based-extension-page/__tests__/modal.spec.tsx@@ -28,7 +28,7 @@ vi.mock('@/service/common', () => ({updateApiBasedExtension: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/header/account-setting/api-based-extension-page/index.tsx b/web/app/components/header/account-setting/api-based-extension-page/index.tsxindex b5d07dcfe10..bc26f63838b 100644--- a/web/app/components/header/account-setting/api-based-extension-page/index.tsx+++ b/web/app/components/header/account-setting/api-based-extension-page/index.tsx@@ -1,8 +1,8 @@+import { Button } from '@langgenius/dify-ui/button'import {RiAddLine,} from '@remixicon/react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { useModalContext } from '@/context/modal-context'import { useApiBasedExtensions } from '@/service/use-common'import Empty from './empty'diff --git a/web/app/components/header/account-setting/api-based-extension-page/item.tsx b/web/app/components/header/account-setting/api-based-extension-page/item.tsxindex 5ef349f5e06..cfda9a672f0 100644--- a/web/app/components/header/account-setting/api-based-extension-page/item.tsx+++ b/web/app/components/header/account-setting/api-based-extension-page/item.tsx@@ -1,11 +1,5 @@import type { FC } from 'react'import type { ApiBasedExtension } from '@/models/common'-import {- RiDeleteBinLine,- RiEditLine,-} from '@remixicon/react'-import { useState } from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -13,8 +7,14 @@ import {AlertDialogConfirmButton,AlertDialogContent,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import {+ RiDeleteBinLine,+ RiEditLine,+} from '@remixicon/react'+import { useState } from 'react'+import { useTranslation } from 'react-i18next'import { useModalContext } from '@/context/modal-context'import { deleteApiBasedExtension } from '@/service/common'diff --git a/web/app/components/header/account-setting/api-based-extension-page/modal.tsx b/web/app/components/header/account-setting/api-based-extension-page/modal.tsxindex bffd6da230b..b7d2e09734c 100644--- a/web/app/components/header/account-setting/api-based-extension-page/modal.tsx+++ b/web/app/components/header/account-setting/api-based-extension-page/modal.tsx@@ -1,12 +1,12 @@import type { FC } from 'react'import type { ApiBasedExtension } from '@/models/common'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { BookOpen01 } from '@/app/components/base/icons/src/vender/line/education'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useDocLink } from '@/context/i18n'import { addApiBasedExtension, updateApiBasedExtension } from '@/service/common'diff --git a/web/app/components/header/account-setting/data-source-page-new/card.tsx b/web/app/components/header/account-setting/data-source-page-new/card.tsxindex 9e8a54eeb23..3d875ab8fa2 100644--- a/web/app/components/header/account-setting/data-source-page-new/card.tsx+++ b/web/app/components/header/account-setting/data-source-page-new/card.tsx@@ -2,12 +2,6 @@ import type {DataSourceAuth,DataSourceCredential,} from './types'-import {- memo,- useCallback,- useRef,-} from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -15,7 +9,13 @@ import {AlertDialogConfirmButton,AlertDialogContent,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import {+ memo,+ useCallback,+ useRef,+} from 'react'+import { useTranslation } from 'react-i18next'import {ApiKeyModal,usePluginAuthAction,diff --git a/web/app/components/header/account-setting/data-source-page-new/configure.tsx b/web/app/components/header/account-setting/data-source-page-new/configure.tsxindex 1cf2c9d382e..712fb914153 100644--- a/web/app/components/header/account-setting/data-source-page-new/configure.tsx+++ b/web/app/components/header/account-setting/data-source-page-new/configure.tsx@@ -4,6 +4,7 @@ import type {AddOAuthButtonProps,PluginPayload,} from '@/app/components/plugins/plugin-auth/types'+import { Button } from '@langgenius/dify-ui/button'import {RiAddLine,} from '@remixicon/react'@@ -19,7 +20,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import {AddApiKeyButton,AddOAuthButton,diff --git a/web/app/components/header/account-setting/data-source-page-new/item.tsx b/web/app/components/header/account-setting/data-source-page-new/item.tsxindex 658d685ab2a..b00db1687f9 100644--- a/web/app/components/header/account-setting/data-source-page-new/item.tsx+++ b/web/app/components/header/account-setting/data-source-page-new/item.tsx@@ -1,13 +1,13 @@import type {DataSourceCredential,} from './types'+import { Button } from '@langgenius/dify-ui/button'import {memo,useState,} from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'import Operator from './operator'diff --git a/web/app/components/header/account-setting/data-source-page-new/operator.tsx b/web/app/components/header/account-setting/data-source-page-new/operator.tsxindex 437fa801391..bcd3acb6b2c 100644--- a/web/app/components/header/account-setting/data-source-page-new/operator.tsx+++ b/web/app/components/header/account-setting/data-source-page-new/operator.tsx@@ -1,6 +1,13 @@import type {DataSourceCredential,} from './types'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import {memo,useCallback,@@ -8,13 +15,6 @@ import {} from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuSeparator,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import { CredentialTypeEnum } from '@/app/components/plugins/plugin-auth/types'type OperatorProps = {diff --git a/web/app/components/header/account-setting/index.tsx b/web/app/components/header/account-setting/index.tsxindex 3ec6dea3151..f356bd71b28 100644--- a/web/app/components/header/account-setting/index.tsx+++ b/web/app/components/header/account-setting/index.tsx@@ -1,11 +1,11 @@'use client'import type { AccountSettingTab } from '@/app/components/header/account-setting/constants'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { ScrollArea } from '@langgenius/dify-ui/scroll-area'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import SearchInput from '@/app/components/base/search-input'-import { Button } from '@/app/components/base/ui/button'-import { ScrollArea } from '@/app/components/base/ui/scroll-area'import BillingPage from '@/app/components/billing/billing-page'import CustomPage from '@/app/components/custom/custom-page'import {diff --git a/web/app/components/header/account-setting/language-page/__tests__/index.spec.tsx b/web/app/components/header/account-setting/language-page/__tests__/index.spec.tsxindex 1139e953a8b..c026b42f22a 100644--- a/web/app/components/header/account-setting/language-page/__tests__/index.spec.tsx+++ b/web/app/components/header/account-setting/language-page/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import type { UserProfileResponse } from '@/models/common'+import { ToastHost } from '@langgenius/dify-ui/toast'import { act, fireEvent, render, screen, waitFor, within } from '@testing-library/react'-import { ToastHost } from '@/app/components/base/ui/toast'import { languages } from '@/i18n-config/language'import { updateUserProfile } from '@/service/common'import { timezones } from '@/utils/timezone'diff --git a/web/app/components/header/account-setting/language-page/index.tsx b/web/app/components/header/account-setting/language-page/index.tsxindex e538337d62b..effd4688959 100644--- a/web/app/components/header/account-setting/language-page/index.tsx+++ b/web/app/components/header/account-setting/language-page/index.tsx@@ -1,10 +1,10 @@'use client'import type { Item } from '@/app/components/base/select'import type { Locale } from '@/i18n-config'+import { toast } from '@langgenius/dify-ui/toast'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { SimpleSelect } from '@/app/components/base/select'-import { toast } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { useLocale } from '@/context/i18n'import { setLocaleOnClient } from '@/i18n-config'diff --git a/web/app/components/header/account-setting/members-page/edit-workspace-modal/__tests__/dialog.spec.tsx b/web/app/components/header/account-setting/members-page/edit-workspace-modal/__tests__/dialog.spec.tsxindex 1f3f4efff75..e134f8f93c6 100644--- a/web/app/components/header/account-setting/members-page/edit-workspace-modal/__tests__/dialog.spec.tsx+++ b/web/app/components/header/account-setting/members-page/edit-workspace-modal/__tests__/dialog.spec.tsx@@ -11,7 +11,7 @@ type DialogProps = {let latestOnOpenChange: DialogProps['onOpenChange']-vi.mock('@/app/components/base/ui/dialog', () => ({+vi.mock('@langgenius/dify-ui/dialog', () => ({Dialog: ({ children, onOpenChange }: DialogProps) => {latestOnOpenChange = onOpenChangereturn <div data-testid="dialog">{children}</div>diff --git a/web/app/components/header/account-setting/members-page/edit-workspace-modal/__tests__/index.spec.tsx b/web/app/components/header/account-setting/members-page/edit-workspace-modal/__tests__/index.spec.tsxindex d794a75ada8..e2248a44c35 100644--- a/web/app/components/header/account-setting/members-page/edit-workspace-modal/__tests__/index.spec.tsx+++ b/web/app/components/header/account-setting/members-page/edit-workspace-modal/__tests__/index.spec.tsx@@ -13,7 +13,7 @@ const toastMocks = vi.hoisted(() => ({vi.mock('@/context/app-context')vi.mock('@/service/common')-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => toastMocks.mockNotify(args),},diff --git a/web/app/components/header/account-setting/members-page/edit-workspace-modal/index.tsx b/web/app/components/header/account-setting/members-page/edit-workspace-modal/index.tsxindex b4dbe243cf5..0f6a6fb8d6d 100644--- a/web/app/components/header/account-setting/members-page/edit-workspace-modal/index.tsx+++ b/web/app/components/header/account-setting/members-page/edit-workspace-modal/index.tsx@@ -1,11 +1,11 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Dialog, DialogCloseButton, DialogContent, DialogTitle } from '@langgenius/dify-ui/dialog'+import { toast } from '@langgenius/dify-ui/toast'import { useId, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { Dialog, DialogCloseButton, DialogContent, DialogTitle } from '@/app/components/base/ui/dialog'-import { toast } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { updateWorkspaceInfo } from '@/service/common'diff --git a/web/app/components/header/account-setting/members-page/index.tsx b/web/app/components/header/account-setting/members-page/index.tsxindex 0a3ed87e8f9..f671eed94a7 100644--- a/web/app/components/header/account-setting/members-page/index.tsx+++ b/web/app/components/header/account-setting/members-page/index.tsx@@ -1,9 +1,9 @@'use client'import type { InvitationResult } from '@/models/common'+import { Avatar } from '@langgenius/dify-ui/avatar'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { Avatar } from '@/app/components/base/ui/avatar'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { NUM_INFINITE } from '@/app/components/billing/config'import { Plan } from '@/app/components/billing/type'import UpgradeBtn from '@/app/components/billing/upgrade-btn'diff --git a/web/app/components/header/account-setting/members-page/invite-button.tsx b/web/app/components/header/account-setting/members-page/invite-button.tsxindex c4e73b8feb5..c703924112f 100644--- a/web/app/components/header/account-setting/members-page/invite-button.tsx+++ b/web/app/components/header/account-setting/members-page/invite-button.tsx@@ -1,7 +1,7 @@+import { Button } from '@langgenius/dify-ui/button'import { RiUserAddLine } from '@remixicon/react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'import { useAppContext } from '@/context/app-context'import { useGlobalPublicStore } from '@/context/global-public-context'import { useWorkspacePermissions } from '@/service/use-workspace'diff --git a/web/app/components/header/account-setting/members-page/invite-modal/__tests__/index.spec.tsx b/web/app/components/header/account-setting/members-page/invite-modal/__tests__/index.spec.tsxindex 7de1fbeccb6..9ed99614e43 100644--- a/web/app/components/header/account-setting/members-page/invite-modal/__tests__/index.spec.tsx+++ b/web/app/components/header/account-setting/members-page/invite-modal/__tests__/index.spec.tsx@@ -1,8 +1,8 @@import type { InvitationResponse } from '@/models/common'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { vi } from 'vitest'-import { toast } from '@/app/components/base/ui/toast'import { useProviderContextSelector } from '@/context/provider-context'import { inviteMember } from '@/service/common'import InviteModal from '../index'@@ -18,7 +18,7 @@ vi.mock('@/context/provider-context', () => ({})),}))vi.mock('@/service/common')-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,},diff --git a/web/app/components/header/account-setting/members-page/invite-modal/index.tsx b/web/app/components/header/account-setting/members-page/invite-modal/index.tsxindex e90455f2d40..426d0491a2a 100644--- a/web/app/components/header/account-setting/members-page/invite-modal/index.tsx+++ b/web/app/components/header/account-setting/members-page/invite-modal/index.tsx@@ -1,14 +1,14 @@'use client'import type { RoleKey } from './role-selector'import type { InvitationResult } from '@/models/common'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Dialog, DialogCloseButton, DialogContent, DialogTitle } from '@langgenius/dify-ui/dialog'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import { ReactMultiEmail } from 'react-multi-email'-import { Button } from '@/app/components/base/ui/button'-import { Dialog, DialogCloseButton, DialogContent, DialogTitle } from '@/app/components/base/ui/dialog'-import { toast } from '@/app/components/base/ui/toast'import { emailRegex } from '@/config'import { useLocale } from '@/context/i18n'import { useProviderContextSelector } from '@/context/provider-context'diff --git a/web/app/components/header/account-setting/members-page/invite-modal/role-selector.tsx b/web/app/components/header/account-setting/members-page/invite-modal/role-selector.tsxindex 68cec4fe711..9c44e8b93d1 100644--- a/web/app/components/header/account-setting/members-page/invite-modal/role-selector.tsx+++ b/web/app/components/header/account-setting/members-page/invite-modal/role-selector.tsx@@ -1,11 +1,11 @@import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import { useTranslation } from 'react-i18next'import {Popover,PopoverContent,PopoverTrigger,-} from '@/app/components/base/ui/popover'+} from '@langgenius/dify-ui/popover'+import * as React from 'react'+import { useTranslation } from 'react-i18next'import { useProviderContext } from '@/context/provider-context'const roleI18nKeyMap = {diff --git a/web/app/components/header/account-setting/members-page/invited-modal/index.tsx b/web/app/components/header/account-setting/members-page/invited-modal/index.tsxindex d7d48759c05..52cc69f7260 100644--- a/web/app/components/header/account-setting/members-page/invited-modal/index.tsx+++ b/web/app/components/header/account-setting/members-page/invited-modal/index.tsx@@ -1,9 +1,9 @@import type { InvitationResult } from '@/models/common'+import { Button } from '@langgenius/dify-ui/button'+import { Dialog, DialogCloseButton, DialogContent, DialogTitle } from '@langgenius/dify-ui/dialog'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { Dialog, DialogCloseButton, DialogContent, DialogTitle } from '@/app/components/base/ui/dialog'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { IS_CE_EDITION } from '@/config'import InvitationLink from './invitation-link'diff --git a/web/app/components/header/account-setting/members-page/invited-modal/invitation-link.tsx b/web/app/components/header/account-setting/members-page/invited-modal/invitation-link.tsxindex 42970993827..778d9fc8c92 100644--- a/web/app/components/header/account-setting/members-page/invited-modal/invitation-link.tsx+++ b/web/app/components/header/account-setting/members-page/invited-modal/invitation-link.tsx@@ -1,10 +1,10 @@'use client'import type { SuccessInvitationResult } from '.'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import copy from 'copy-to-clipboard'import { t } from 'i18next'import * as React from 'react'import { useCallback, useEffect, useState } from 'react'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import s from './index.module.css'type IInvitationLinkProps = {diff --git a/web/app/components/header/account-setting/members-page/operation/index.tsx b/web/app/components/header/account-setting/members-page/operation/index.tsxindex dab0c84e5be..b67fb26bcd6 100644--- a/web/app/components/header/account-setting/members-page/operation/index.tsx+++ b/web/app/components/header/account-setting/members-page/operation/index.tsx@@ -1,16 +1,16 @@'use client'import type { Member } from '@/models/common'import { cn } from '@langgenius/dify-ui/cn'-import { memo, useMemo, useState } from 'react'-import { useTranslation } from 'react-i18next'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/dropdown-menu'+import { toast } from '@langgenius/dify-ui/toast'+import { memo, useMemo, useState } from 'react'+import { useTranslation } from 'react-i18next'import { useProviderContext } from '@/context/provider-context'import { deleteMemberOrCancelInvitation, updateMemberRole } from '@/service/common'diff --git a/web/app/components/header/account-setting/members-page/transfer-ownership-modal/__tests__/index.spec.tsx b/web/app/components/header/account-setting/members-page/transfer-ownership-modal/__tests__/index.spec.tsxindex 07a728d609d..9e05a93c7af 100644--- a/web/app/components/header/account-setting/members-page/transfer-ownership-modal/__tests__/index.spec.tsx+++ b/web/app/components/header/account-setting/members-page/transfer-ownership-modal/__tests__/index.spec.tsx@@ -15,7 +15,7 @@ const toastMocks = vi.hoisted(() => ({vi.mock('@/context/app-context')vi.mock('@/service/common')vi.mock('@/service/use-common')-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (args: unknown) => toastMocks.mockNotify(args),},diff --git a/web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsx b/web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsxindex 8554db341f4..85a3ac3b221 100644--- a/web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsx+++ b/web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsx@@ -1,11 +1,11 @@+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import * as React from 'react'import { useCallback, useState } from 'react'import { Trans, useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { ownershipTransfer, sendOwnerEmail, verifyOwnerEmail } from '@/service/common'import MemberSelector from './member-selector'diff --git a/web/app/components/header/account-setting/members-page/transfer-ownership-modal/member-selector.tsx b/web/app/components/header/account-setting/members-page/transfer-ownership-modal/member-selector.tsxindex 713104fcc3c..5875b4fb6a1 100644--- a/web/app/components/header/account-setting/members-page/transfer-ownership-modal/member-selector.tsx+++ b/web/app/components/header/account-setting/members-page/transfer-ownership-modal/member-selector.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'+import { Avatar } from '@langgenius/dify-ui/avatar'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger } from '@/app/components/base/portal-to-follow-elem'-import { Avatar } from '@/app/components/base/ui/avatar'import { useMembers } from '@/service/use-common'type Props = {diff --git a/web/app/components/header/account-setting/menu-dialog.tsx b/web/app/components/header/account-setting/menu-dialog.tsxindex f1a0307b0d7..9bd2df5fa41 100644--- a/web/app/components/header/account-setting/menu-dialog.tsx+++ b/web/app/components/header/account-setting/menu-dialog.tsx@@ -1,7 +1,7 @@import type { ReactNode } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'import { useCallback } from 'react'-import { Dialog, DialogContent } from '@/app/components/base/ui/dialog'type DialogProps = {className?: stringdiff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/add-custom-model.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/add-custom-model.tsxindex 50ea37e45e5..a1e181e97e8 100644--- a/web/app/components/header/account-setting/model-provider-page/model-auth/add-custom-model.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-auth/add-custom-model.tsx@@ -3,6 +3,9 @@ import type {CustomConfigurationModelFixedFields,ModelProvider,} from '@/app/components/header/account-setting/model-provider-page/declarations'+import {+ Button,+} from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiAddCircleFill,@@ -20,9 +23,6 @@ import {PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'import Tooltip from '@/app/components/base/tooltip'-import {- Button,-} from '@/app/components/base/ui/button'import { ModelModalModeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import ModelIcon from '../model-icon'import { useAuth } from './hooks/use-auth'diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/credential-item.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/credential-item.tsxindex 94b3ab2bc88..714c4921374 100644--- a/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/credential-item.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/credential-item.tsx@@ -1,5 +1,6 @@import type { Credential } from '../../declarations'import { cn } from '@langgenius/dify-ui/cn'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import {memo,useMemo,@@ -7,7 +8,6 @@ import {import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Badge from '@/app/components/base/badge'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import Indicator from '@/app/components/header/indicator'type CredentialItemProps = {diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/index.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/index.tsxindex 9c0d6577efa..ca0e0d9c73b 100644--- a/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/index.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/index.tsx@@ -9,6 +9,15 @@ import type {import type {PortalToFollowElemOptions,} from '@/app/components/base/portal-to-follow-elem'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiAddLine,@@ -25,15 +34,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'import { useAuth } from '../hooks'import AuthorizedItem from './authorized-item'diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/config-model.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/config-model.tsxindex 42f4b680265..b570a5335e4 100644--- a/web/app/components/header/account-setting/model-provider-page/model-auth/config-model.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-auth/config-model.tsx@@ -1,3 +1,4 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiEqualizer2Line,@@ -5,7 +6,6 @@ import {} from '@remixicon/react'import { memo } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'type ConfigModelProps = {diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/config-provider.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/config-provider.tsxindex e64c5aedc05..4a268168baa 100644--- a/web/app/components/header/account-setting/model-provider-page/model-auth/config-provider.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-auth/config-provider.tsx@@ -2,6 +2,9 @@ import type {CustomConfigurationModelFixedFields,ModelProvider,} from '@/app/components/header/account-setting/model-provider-page/declarations'+import {+ Button,+} from '@langgenius/dify-ui/button'import {RiEqualizer2Line,} from '@remixicon/react'@@ -11,9 +14,6 @@ import {} from 'react'import { useTranslation } from 'react-i18next'import Tooltip from '@/app/components/base/tooltip'-import {- Button,-} from '@/app/components/base/ui/button'import { ConfigurationMethodEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import Authorized from './authorized'import { useCredentialStatus } from './hooks'diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/hooks/__tests__/use-auth.spec.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/hooks/__tests__/use-auth.spec.tsxindex be9fb2c4864..bb682cf8a4d 100644--- a/web/app/components/header/account-setting/model-provider-page/model-auth/hooks/__tests__/use-auth.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-auth/hooks/__tests__/use-auth.spec.tsx@@ -21,8 +21,8 @@ const mockAddModelCredential = vi.fn()const mockEditProviderCredential = vi.fn()const mockEditModelCredential = vi.fn()-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,default: {diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/hooks/use-auth.ts b/web/app/components/header/account-setting/model-provider-page/model-auth/hooks/use-auth.tsindex 72587e3da6e..1cdb28523e3 100644--- a/web/app/components/header/account-setting/model-provider-page/model-auth/hooks/use-auth.ts+++ b/web/app/components/header/account-setting/model-provider-page/model-auth/hooks/use-auth.ts@@ -1,7 +1,7 @@import type { ConfigurationMethodEnum, Credential, CustomConfigurationModelFixedFields, CustomModel, ModelModalModeEnum, ModelProvider } from '../../declarations'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useModelModalHandler, useRefreshModel } from '@/app/components/header/account-setting/model-provider-page/hooks'import { useDeleteModel } from '@/service/use-models'import { useAuthService } from './use-auth-service'diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/manage-custom-model-credentials.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/manage-custom-model-credentials.tsxindex 6737a6ffff2..0979d4a4b76 100644--- a/web/app/components/header/account-setting/model-provider-page/model-auth/manage-custom-model-credentials.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-auth/manage-custom-model-credentials.tsx@@ -2,15 +2,15 @@ import type {CustomConfigurationModelFixedFields,ModelProvider,} from '@/app/components/header/account-setting/model-provider-page/declarations'+import {+ Button,+} from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {memo,useCallback,} from 'react'import { useTranslation } from 'react-i18next'-import {- Button,-} from '@/app/components/base/ui/button'import {ConfigurationMethodEnum,ModelModalModeEnum,diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/switch-credential-in-load-balancing.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/switch-credential-in-load-balancing.tsxindex af374b85884..58ffc180dd9 100644--- a/web/app/components/header/account-setting/model-provider-page/model-auth/switch-credential-in-load-balancing.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-auth/switch-credential-in-load-balancing.tsx@@ -4,6 +4,7 @@ import type {CustomModel,ModelProvider,} from '../declarations'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowDownSLine } from '@remixicon/react'import {@@ -13,7 +14,6 @@ import {import { useTranslation } from 'react-i18next'import Badge from '@/app/components/base/badge'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import { ConfigurationMethodEnum, ModelModalModeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import Indicator from '@/app/components/header/indicator'import Authorized from './authorized'diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/__tests__/dialog.spec.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/__tests__/dialog.spec.tsxindex 21f8d554c4e..e2c934bb7cc 100644--- a/web/app/components/header/account-setting/model-provider-page/model-modal/__tests__/dialog.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-modal/__tests__/dialog.spec.tsx@@ -31,7 +31,7 @@ vi.mock('../../model-auth', () => ({CredentialSelector: ({ credentials }: { credentials: Credential[] }) => <div>{`credentials:${credentials.length}`}</div>,}))-vi.mock('@/app/components/base/ui/dialog', () => ({+vi.mock('@langgenius/dify-ui/dialog', () => ({Dialog: ({ children, onOpenChange }: DialogProps) => {latestDialogOnOpenChange = onOpenChangereturn <div>{children}</div>@@ -40,7 +40,7 @@ vi.mock('@/app/components/base/ui/dialog', () => ({DialogCloseButton: () => <button type="button">close</button>,}))-vi.mock('@/app/components/base/ui/alert-dialog', () => ({+vi.mock('@langgenius/dify-ui/alert-dialog', () => ({AlertDialog: ({ children, onOpenChange }: AlertDialogProps) => {latestAlertDialogOnOpenChange = onOpenChangereturn <div>{children}</div>diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsxindex 995da8bb98b..a8f004f3a20 100644--- a/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx@@ -9,6 +9,20 @@ import type {FormRefObject,FormSchema,} from '@/app/components/base/form/types'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import {+ Dialog,+ DialogCloseButton,+ DialogContent,+} from '@langgenius/dify-ui/dialog'import {memo,useCallback,@@ -22,20 +36,6 @@ import AuthForm from '@/app/components/base/form/form-scenarios/auth'import { LinkExternal02 } from '@/app/components/base/icons/src/vender/line/general'import { Lock01 } from '@/app/components/base/icons/src/vender/solid/security'import Loading from '@/app/components/base/loading'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import {- Dialog,- DialogCloseButton,- DialogContent,-} from '@/app/components/base/ui/dialog'import {useAuth,useCredentialData,diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/__tests__/parameter-item.select.spec.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/__tests__/parameter-item.select.spec.tsxindex ae4a68bad7f..c221071b82b 100644--- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/__tests__/parameter-item.select.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/__tests__/parameter-item.select.spec.tsx@@ -6,8 +6,8 @@ vi.mock('../../hooks', () => ({useLanguage: () => 'en_US',}))-vi.mock('@/app/components/base/ui/select', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/select')>()+vi.mock('@langgenius/dify-ui/select', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/select')>()return {...actual,diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/__tests__/parameter-item.spec.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/__tests__/parameter-item.spec.tsxindex 2e928c36cc9..a57884df1d3 100644--- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/__tests__/parameter-item.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/__tests__/parameter-item.spec.tsx@@ -11,7 +11,7 @@ vi.mock('../../hooks', () => ({useLanguage: () => 'en_US',}))-vi.mock('@/app/components/base/ui/slider', () => ({+vi.mock('@langgenius/dify-ui/slider', () => ({Slider: ({ onValueChange }: { onValueChange: (v: number) => void }) => (<button onClick={() => onValueChange(2)} data-testid="slider-btn">Slide 2</button>),diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/configuration-button.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/configuration-button.tsxindex 7545cf6a223..598db04ee95 100644--- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/configuration-button.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/configuration-button.tsx@@ -1,5 +1,5 @@+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { ConfigurationMethodEnum } from '../declarations'type ConfigurationButtonProps = {diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsxindex 38b343bc196..6f377750528 100644--- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx@@ -14,16 +14,16 @@ import type {NodeOutPutVar,} from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'-import { useMemo, useRef, useState } from 'react'-import { useTranslation } from 'react-i18next'-import { ArrowNarrowLeft } from '@/app/components/base/icons/src/vender/line/arrows'-import Loading from '@/app/components/base/loading'import {Popover,PopoverClose,PopoverContent,PopoverTrigger,-} from '@/app/components/base/ui/popover'+} from '@langgenius/dify-ui/popover'+import { useMemo, useRef, useState } from 'react'+import { useTranslation } from 'react-i18next'+import { ArrowNarrowLeft } from '@/app/components/base/icons/src/vender/line/arrows'+import Loading from '@/app/components/base/loading'import { PROVIDER_WITH_PRESET_TONE, STOP_PARAMETER_RULE, TONE_LIST } from '@/config'import { useModelParameterRules } from '@/service/use-common'import {diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsxindex 4cda97031fd..f7e1962fd70 100644--- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx@@ -4,15 +4,15 @@ import type {NodeOutPutVar,} from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger, SelectValue } from '@langgenius/dify-ui/select'+import { Slider } from '@langgenius/dify-ui/slider'+import { Switch } from '@langgenius/dify-ui/switch'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import PromptEditor from '@/app/components/base/prompt-editor'import Radio from '@/app/components/base/radio'-import Switch from '@/app/components/base/switch'import TagInput from '@/app/components/base/tag-input'-import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger, SelectValue } from '@/app/components/base/ui/select'-import { Slider } from '@/app/components/base/ui/slider'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { BlockEnum } from '@/app/components/workflow/types'import { useLanguage } from '../hooks'import { isNullOrUndefined } from '../utils'diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/presets-parameter.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/presets-parameter.tsxindex c2138c1c6fc..cb537ab18f6 100644--- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/presets-parameter.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/presets-parameter.tsx@@ -1,15 +1,15 @@import type { ReactNode } from 'react'-import { useTranslation } from 'react-i18next'-import { Brush01 } from '@/app/components/base/icons/src/vender/solid/editor'-import { Scales02 } from '@/app/components/base/icons/src/vender/solid/FinanceAndECommerce'-import { Target04 } from '@/app/components/base/icons/src/vender/solid/general'-import { Button } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { useTranslation } from 'react-i18next'+import { Brush01 } from '@/app/components/base/icons/src/vender/solid/editor'+import { Scales02 } from '@/app/components/base/icons/src/vender/solid/FinanceAndECommerce'+import { Target04 } from '@/app/components/base/icons/src/vender/solid/general'import { TONE_LIST } from '@/config'const toneI18nKeyMap = {diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/trigger.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/trigger.tsxindex 06823d1a742..d9cb29abbf3 100644--- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/trigger.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/trigger.tsx@@ -5,8 +5,8 @@ import type {ModelProvider,} from '../declarations'import { cn } from '@langgenius/dify-ui/cn'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useTranslation } from 'react-i18next'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { useProviderContext } from '@/context/provider-context'import ModelIcon from '../model-icon'import ModelName from '../model-name'diff --git a/web/app/components/header/account-setting/model-provider-page/model-selector/__tests__/popover.spec.tsx b/web/app/components/header/account-setting/model-provider-page/model-selector/__tests__/popover.spec.tsxindex e92bab1db5a..d7501672f45 100644--- a/web/app/components/header/account-setting/model-provider-page/model-selector/__tests__/popover.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-selector/__tests__/popover.spec.tsx@@ -16,7 +16,7 @@ vi.mock('../../hooks', () => ({}),}))-vi.mock('@/app/components/base/ui/popover', () => ({+vi.mock('@langgenius/dify-ui/popover', () => ({Popover: ({ children, onOpenChange }: PopoverProps) => {latestOnOpenChange = onOpenChangereturn <div>{children}</div>diff --git a/web/app/components/header/account-setting/model-provider-page/model-selector/__tests__/popup-item.spec.tsx b/web/app/components/header/account-setting/model-provider-page/model-selector/__tests__/popup-item.spec.tsxindex 6728791120d..341a9c6abcd 100644--- a/web/app/components/header/account-setting/model-provider-page/model-selector/__tests__/popup-item.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-selector/__tests__/popup-item.spec.tsx@@ -44,7 +44,7 @@ vi.mock('@/app/components/base/tooltip', () => ({default: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,}))-vi.mock('@/app/components/base/ui/popover', () => ({+vi.mock('@langgenius/dify-ui/popover', () => ({Popover: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,PopoverTrigger: ({ render }: { render: React.ReactNode }) => <>{render}</>,PopoverContent: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,diff --git a/web/app/components/header/account-setting/model-provider-page/model-selector/index.tsx b/web/app/components/header/account-setting/model-provider-page/model-selector/index.tsxindex 44392a70a57..9241c592f50 100644--- a/web/app/components/header/account-setting/model-provider-page/model-selector/index.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-selector/index.tsx@@ -5,12 +5,12 @@ import type {ModelFeatureEnum,ModelItem,} from '../declarations'-import { useState } from 'react'import {Popover,PopoverContent,PopoverTrigger,-} from '@/app/components/base/ui/popover'+} from '@langgenius/dify-ui/popover'+import { useState } from 'react'import { useCurrentProviderAndModel } from '../hooks'import ModelSelectorTrigger from './model-selector-trigger'import Popup from './popup'diff --git a/web/app/components/header/account-setting/model-provider-page/model-selector/model-selector-trigger.tsx b/web/app/components/header/account-setting/model-provider-page/model-selector/model-selector-trigger.tsxindex d43324ca12d..6b9bcae8dc3 100644--- a/web/app/components/header/account-setting/model-provider-page/model-selector/model-selector-trigger.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-selector/model-selector-trigger.tsx@@ -5,8 +5,8 @@ import type {ModelItem,} from '../declarations'import { cn } from '@langgenius/dify-ui/cn'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useTranslation } from 'react-i18next'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { useProviderContext } from '@/context/provider-context'import {DERIVED_MODEL_STATUS_BADGE_I18N,diff --git a/web/app/components/header/account-setting/model-provider-page/model-selector/popup-item.tsx b/web/app/components/header/account-setting/model-provider-page/model-selector/popup-item.tsxindex e38cc07ca2e..ed16cd7904d 100644--- a/web/app/components/header/account-setting/model-provider-page/model-selector/popup-item.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-selector/popup-item.tsx@@ -5,15 +5,15 @@ import type {ModelItem,} from '../declarations'import { cn } from '@langgenius/dify-ui/cn'-import { useCallback, useState } from 'react'-import { useTranslation } from 'react-i18next'-import { CreditsCoin } from '@/app/components/base/icons/src/vender/line/financeAndECommerce'import {Popover,PopoverContent,PopoverTrigger,-} from '@/app/components/base/ui/popover'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'+} from '@langgenius/dify-ui/popover'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'+import { useCallback, useState } from 'react'+import { useTranslation } from 'react-i18next'+import { CreditsCoin } from '@/app/components/base/icons/src/vender/line/financeAndECommerce'import { useModalContext } from '@/context/modal-context'import { useProviderContext } from '@/context/provider-context'import {diff --git a/web/app/components/header/account-setting/model-provider-page/model-selector/popup.tsx b/web/app/components/header/account-setting/model-provider-page/model-selector/popup.tsxindex b40bc53a650..017194aaf5e 100644--- a/web/app/components/header/account-setting/model-provider-page/model-selector/popup.tsx+++ b/web/app/components/header/account-setting/model-provider-page/model-selector/popup.tsx@@ -5,11 +5,11 @@ import type {ModelItem,} from '../declarations'import type { ModelProviderQuotaGetPaid } from '@/types/model-provider'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useTheme } from 'next-themes'import { useCallback, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/constants'import checkTaskStatus from '@/app/components/plugins/install-plugin/base/check-task-status'import useRefreshPluginList from '@/app/components/plugins/install-plugin/hooks/use-refresh-plugin-list'diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/credential-panel.spec.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/credential-panel.spec.tsxindex 4f51de9b41e..f07f9652f88 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/credential-panel.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/credential-panel.spec.tsx@@ -32,7 +32,7 @@ vi.mock('@/context/global-public-context', () => ({useSystemFeaturesQuery: () => ({ data: { trial_models: ['langgenius/openai/openai'] } }),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: { notify: mockToastNotify },toast: {success: (message: string) => mockToastNotify({ type: 'success', message }),diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/model-load-balancing-modal.spec.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/model-load-balancing-modal.spec.tsxindex eedc04115c7..c4794c9775a 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/model-load-balancing-modal.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/model-load-balancing-modal.spec.tsx@@ -52,8 +52,8 @@ let mockCredentialData: CredentialData | undefined = {current_credential_name: 'Default',}-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,default: {diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/use-change-provider-priority.spec.ts b/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/use-change-provider-priority.spec.tsindex 57c51210149..7f6e7d393a5 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/use-change-provider-priority.spec.ts+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/__tests__/use-change-provider-priority.spec.ts@@ -16,7 +16,7 @@ const mockMutationOptions = vi.fn((options: Record<string, unknown>) => ({...options,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (...args: unknown[]) => mockNotify(...args),},diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/__tests__/dialog.spec.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/__tests__/dialog.spec.tsxindex b4ec0e09d25..85ae2d7e52b 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/__tests__/dialog.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/__tests__/dialog.spec.tsx@@ -34,7 +34,7 @@ vi.mock('../use-activate-credential', () => ({}),}))-vi.mock('@/app/components/base/ui/alert-dialog', () => ({+vi.mock('@langgenius/dify-ui/alert-dialog', () => ({AlertDialog: ({ children, onOpenChange }: AlertDialogProps) => {latestOnOpenChange = onOpenChangereturn <div>{children}</div>diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/__tests__/use-activate-credential.spec.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/__tests__/use-activate-credential.spec.tsxindex 12acf479c07..aec9c9f6911 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/__tests__/use-activate-credential.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/__tests__/use-activate-credential.spec.tsx@@ -1,6 +1,6 @@import type { Credential, ModelProvider } from '../../../declarations'+import { toast } from '@langgenius/dify-ui/toast'import { act, renderHook } from '@testing-library/react'-import { toast } from '@/app/components/base/ui/toast'import { useActivateCredential } from '../use-activate-credential'const mockMutate = vi.fn()diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/api-key-section.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/api-key-section.tsxindex e6f5e51d611..41645677b69 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/api-key-section.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/api-key-section.tsx@@ -1,7 +1,7 @@import type { Credential, CustomModel, ModelProvider } from '../../declarations'+import { Button } from '@langgenius/dify-ui/button'import { memo } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import CredentialItem from '../../model-auth/authorized/credential-item'type ApiKeySectionProps = {diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/dropdown-content.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/dropdown-content.tsxindex 415539383bd..0e0f3a67b17 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/dropdown-content.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/dropdown-content.tsx@@ -1,7 +1,5 @@import type { Credential, ModelProvider, PreferredProviderTypeEnum } from '../../declarations'import type { CredentialPanelState } from '../use-credential-panel-state'-import { memo, useCallback } from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -10,7 +8,9 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import { memo, useCallback } from 'react'+import { useTranslation } from 'react-i18next'import { ConfigurationMethodEnum } from '../../declarations'import { useAuth } from '../../model-auth/hooks'import ApiKeySection from './api-key-section'diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/index.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/index.tsxindex fc710ef73f7..67f73f6941d 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/index.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/index.tsx@@ -1,13 +1,13 @@import type { ModelProvider, PreferredProviderTypeEnum } from '../../declarations'import type { CardVariant, CredentialPanelState } from '../use-credential-panel-state'-import { memo, useCallback, useState } from 'react'-import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import {Popover,PopoverContent,PopoverTrigger,-} from '@/app/components/base/ui/popover'+} from '@langgenius/dify-ui/popover'+import { memo, useCallback, useState } from 'react'+import { useTranslation } from 'react-i18next'import DropdownContent from './dropdown-content'type ModelAuthDropdownProps = {diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/usage-priority-section.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/usage-priority-section.tsxindex 638f9d605b9..4ec7ce3cef3 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/usage-priority-section.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/usage-priority-section.tsx@@ -1,7 +1,7 @@import type { UsagePriority } from '../use-credential-panel-state'import { cn } from '@langgenius/dify-ui/cn'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useTranslation } from 'react-i18next'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { PreferredProviderTypeEnum } from '../../declarations'type UsagePrioritySectionProps = {diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/use-activate-credential.ts b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/use-activate-credential.tsindex 6f99c32296d..db9f735e3ae 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/use-activate-credential.ts+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/use-activate-credential.ts@@ -1,7 +1,7 @@import type { Credential, ModelProvider } from '../../declarations'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useActiveProviderCredential } from '@/service/use-models'import { useUpdateModelList, useUpdateModelProviders } from '../../hooks'diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-list-item.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-list-item.tsxindex d8f0b5928c0..305ef71c50c 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-list-item.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-list-item.tsx@@ -1,12 +1,12 @@import type { ModelItem, ModelProvider } from '../declarations'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { useQueryClient } from '@tanstack/react-query'import { useDebounceFn } from 'ahooks'import { memo, useCallback } from 'react'import { useTranslation } from 'react-i18next'import Badge from '@/app/components/base/badge'import { Balance } from '@/app/components/base/icons/src/vender/line/financeAndECommerce'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import { Plan } from '@/app/components/billing/type'import { useAppContext } from '@/context/app-context'diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-configs.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-configs.tsxindex ea4edace302..9b7b858c134 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-configs.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-configs.tsx@@ -9,11 +9,11 @@ import type {ModelProvider,} from '../declarations'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { useCallback, useMemo } from 'react'import { useTranslation } from 'react-i18next'import Badge from '@/app/components/base/badge/index'import GridMask from '@/app/components/base/grid-mask'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import UpgradeBtn from '@/app/components/billing/upgrade-btn'import s from '@/app/components/custom/style.module.css'diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-modal.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-modal.tsxindex 652630be671..34b9d1578f8 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-modal.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-modal.tsx@@ -1,9 +1,4 @@import type { Credential, CustomConfigurationModelFixedFields, ModelItem, ModelLoadBalancingConfig, ModelLoadBalancingConfigEntry, ModelProvider } from '../declarations'-import { cn } from '@langgenius/dify-ui/cn'-import { memo, useCallback, useEffect, useMemo, useState } from 'react'-import { useTranslation } from 'react-i18next'-import Loading from '@/app/components/base/loading'-import Modal from '@/app/components/base/modal'import {AlertDialog,AlertDialogActions,@@ -11,9 +6,14 @@ import {AlertDialogConfirmButton,AlertDialogContent,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'+import { memo, useCallback, useEffect, useMemo, useState } from 'react'+import { useTranslation } from 'react-i18next'+import Loading from '@/app/components/base/loading'+import Modal from '@/app/components/base/modal'import { SwitchCredentialInLoadBalancing } from '@/app/components/header/account-setting/model-provider-page/model-auth'import { useGetModelCredential, useUpdateModelLoadBalancingConfig } from '@/service/use-models'import { ConfigurationMethodEnum, FormTypeEnum } from '../declarations'diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/priority-selector.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/priority-selector.tsxindex e71a219dcd0..a74c4000359 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/priority-selector.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/priority-selector.tsx@@ -1,5 +1,6 @@import type { FC } from 'react'import { Popover, PopoverButton, PopoverPanel, Transition } from '@headlessui/react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiCheckLine,@@ -7,7 +8,6 @@ import {} from '@remixicon/react'import { Fragment } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { PreferredProviderTypeEnum } from '../declarations'type SelectorProps = {diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/provider-card-actions.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/provider-card-actions.tsxindex 2269354825b..861c4afa7a3 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/provider-card-actions.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/provider-card-actions.tsx@@ -1,11 +1,11 @@import type { FC } from 'react'import type { PluginDetail } from '@/app/components/plugins/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'import Badge from '@/app/components/base/badge'-import { Button } from '@/app/components/base/ui/button'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { HeaderModals } from '@/app/components/plugins/plugin-detail-panel/detail-header/components'import { useDetailHeaderState, usePluginOperations } from '@/app/components/plugins/plugin-detail-panel/detail-header/hooks'import OperationDropdown from '@/app/components/plugins/plugin-detail-panel/operation-dropdown'diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsxindex 03d7c28a889..5d31db11f96 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx@@ -3,12 +3,12 @@ import type { ModelProvider } from '../declarations'import type { Plugin } from '@/app/components/plugins/types'import type { ModelProviderQuotaGetPaid } from '@/types/model-provider'import { cn } from '@langgenius/dify-ui/cn'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useBoolean } from 'ahooks'import * as React from 'react'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import InstallFromMarketplace from '@/app/components/plugins/install-plugin/install-from-marketplace'import { useSystemFeaturesQuery } from '@/context/global-public-context'import useTimestamp from '@/hooks/use-timestamp'diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/use-change-provider-priority.ts b/web/app/components/header/account-setting/model-provider-page/provider-added-card/use-change-provider-priority.tsindex 2a9e7e62acc..c339af4b2ee 100644--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/use-change-provider-priority.ts+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/use-change-provider-priority.ts@@ -1,7 +1,7 @@import type { ModelProvider, PreferredProviderTypeEnum } from '../declarations'+import { toast } from '@langgenius/dify-ui/toast'import { useMutation, useQueryClient } from '@tanstack/react-query'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { consoleQuery } from '@/service/client'import { ConfigurationMethodEnum } from '../declarations'import { useUpdateModelList, useUpdateModelProviders } from '../hooks'diff --git a/web/app/components/header/account-setting/model-provider-page/system-model-selector/__tests__/index.spec.tsx b/web/app/components/header/account-setting/model-provider-page/system-model-selector/__tests__/index.spec.tsxindex c1b27a2c04c..8129ed721cd 100644--- a/web/app/components/header/account-setting/model-provider-page/system-model-selector/__tests__/index.spec.tsx+++ b/web/app/components/header/account-setting/model-provider-page/system-model-selector/__tests__/index.spec.tsx@@ -43,8 +43,8 @@ vi.mock('@/context/provider-context', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx b/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsxindex 8b86923391f..41bb3c3ab8c 100644--- a/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx+++ b/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx@@ -3,21 +3,21 @@ import type {DefaultModel,DefaultModelResponse,} from '../declarations'-import { useState } from 'react'-import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import {Dialog,DialogCloseButton,DialogContent,DialogTitle,-} from '@/app/components/base/ui/dialog'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/dialog'+import { toast } from '@langgenius/dify-ui/toast'import {Tooltip,TooltipContent,TooltipTrigger,-} from '@/app/components/base/ui/tooltip'+} from '@langgenius/dify-ui/tooltip'+import { useState } from 'react'+import { useTranslation } from 'react-i18next'import { useAppContext } from '@/context/app-context'import { useProviderContext } from '@/context/provider-context'import { updateDefaultModel } from '@/service/common'diff --git a/web/app/components/header/account-setting/plugin-page/SerpapiPlugin.tsx b/web/app/components/header/account-setting/plugin-page/SerpapiPlugin.tsxindex 7308691b54c..31c4ce2c3a0 100644--- a/web/app/components/header/account-setting/plugin-page/SerpapiPlugin.tsx+++ b/web/app/components/header/account-setting/plugin-page/SerpapiPlugin.tsx@@ -1,7 +1,7 @@import type { Form, ValidateValue } from '../key-validator/declarations'import type { PluginProvider } from '@/models/common'+import { toast } from '@langgenius/dify-ui/toast'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import SerpapiLogo from '../../assets/serpapi.png'import KeyValidator from '../key-validator'diff --git a/web/app/components/header/account-setting/plugin-page/__tests__/SerpapiPlugin.spec.tsx b/web/app/components/header/account-setting/plugin-page/__tests__/SerpapiPlugin.spec.tsxindex 85d205713bf..2055c0725de 100644--- a/web/app/components/header/account-setting/plugin-page/__tests__/SerpapiPlugin.spec.tsx+++ b/web/app/components/header/account-setting/plugin-page/__tests__/SerpapiPlugin.spec.tsx@@ -32,7 +32,7 @@ const { mockToast } = vi.hoisted(() => {return { mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/header/account-setting/plugin-page/__tests__/index.spec.tsx b/web/app/components/header/account-setting/plugin-page/__tests__/index.spec.tsxindex ff58fdd1822..ca0c41a83bf 100644--- a/web/app/components/header/account-setting/plugin-page/__tests__/index.spec.tsx+++ b/web/app/components/header/account-setting/plugin-page/__tests__/index.spec.tsx@@ -14,8 +14,8 @@ vi.mock('@/context/app-context', () => ({useAppContext: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,diff --git a/web/app/components/plugins/install-plugin/__tests__/hooks.spec.ts b/web/app/components/plugins/install-plugin/__tests__/hooks.spec.tsindex b4171de7f04..385b9e01e1c 100644--- a/web/app/components/plugins/install-plugin/__tests__/hooks.spec.ts+++ b/web/app/components/plugins/install-plugin/__tests__/hooks.spec.ts@@ -2,7 +2,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'import { checkForUpdates, fetchReleases, handleUpload } from '../hooks'const mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((...args: unknown[]) => mockNotify(...args), {success: (...args: unknown[]) => mockNotify(...args),error: (...args: unknown[]) => mockNotify(...args),diff --git a/web/app/components/plugins/install-plugin/base/installed.tsx b/web/app/components/plugins/install-plugin/base/installed.tsxindex 088d5873780..7b76767e77c 100644--- a/web/app/components/plugins/install-plugin/base/installed.tsx+++ b/web/app/components/plugins/install-plugin/base/installed.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'import type { Plugin, PluginDeclaration, PluginManifestInMarket } from '../../types'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import Badge, { BadgeState } from '@/app/components/base/badge/index'-import { Button } from '@/app/components/base/ui/button'import Card from '../../card'import { pluginManifestInMarketToPluginProps, pluginManifestToCardPluginProps } from '../utils'diff --git a/web/app/components/plugins/install-plugin/hooks.ts b/web/app/components/plugins/install-plugin/hooks.tsindex 4759953e30e..e7086a7fba0 100644--- a/web/app/components/plugins/install-plugin/hooks.ts+++ b/web/app/components/plugins/install-plugin/hooks.ts@@ -1,5 +1,5 @@import type { GitHubRepoReleaseResponse } from '../types'-import { toast } from '@/app/components/base/ui/toast'+import { toast } from '@langgenius/dify-ui/toast'import { uploadGitHub } from '@/service/plugins'import { compareVersion, getLatestVersion } from '@/utils/semver'diff --git a/web/app/components/plugins/install-plugin/install-bundle/steps/install.tsx b/web/app/components/plugins/install-plugin/install-bundle/steps/install.tsxindex df94331d58e..a94cd8588dc 100644--- a/web/app/components/plugins/install-plugin/install-bundle/steps/install.tsx+++ b/web/app/components/plugins/install-plugin/install-bundle/steps/install.tsx@@ -2,12 +2,12 @@import type { FC } from 'react'import type { Dependency, InstallStatus, InstallStatusResponse, Plugin, VersionInfo } from '../../../types'import type { ExposeRefs } from './install-multi'+import { Button } from '@langgenius/dify-ui/button'import { RiLoader2Line } from '@remixicon/react'import * as React from 'react'import { useCallback, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'-import { Button } from '@/app/components/base/ui/button'import { useCanInstallPluginFromMarketplace } from '@/app/components/plugins/plugin-page/use-reference-setting'import { useMittContextSelector } from '@/context/mitt-context'import { useInstallOrUpdate, usePluginTaskList } from '@/service/use-plugins'diff --git a/web/app/components/plugins/install-plugin/install-bundle/steps/installed.tsx b/web/app/components/plugins/install-plugin/install-bundle/steps/installed.tsxindex 1c64e73d62b..3fbf0c13ec2 100644--- a/web/app/components/plugins/install-plugin/install-bundle/steps/installed.tsx+++ b/web/app/components/plugins/install-plugin/install-bundle/steps/installed.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'import type { InstallStatus, Plugin } from '../../../types'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import Badge, { BadgeState } from '@/app/components/base/badge/index'-import { Button } from '@/app/components/base/ui/button'import Card from '@/app/components/plugins/card'import { MARKETPLACE_API_PREFIX } from '@/config'import useGetIcon from '../../base/use-get-icon'diff --git a/web/app/components/plugins/install-plugin/install-from-github/__tests__/index.spec.tsx b/web/app/components/plugins/install-plugin/install-from-github/__tests__/index.spec.tsxindex 2f35f484f05..e923de5e387 100644--- a/web/app/components/plugins/install-plugin/install-from-github/__tests__/index.spec.tsx+++ b/web/app/components/plugins/install-plugin/install-from-github/__tests__/index.spec.tsx@@ -57,7 +57,7 @@ const createUpdatePayload = (overrides: Partial<UpdateFromGitHubPayload> = {}):// Mock external dependenciesconst mockNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((props: { type: string, message: string }) => mockNotify(props), {success: (message: string) => mockNotify({ type: 'success', message }),error: (message: string) => mockNotify({ type: 'error', message }),diff --git a/web/app/components/plugins/install-plugin/install-from-github/index.tsx b/web/app/components/plugins/install-plugin/install-from-github/index.tsxindex f1e4d1b9bfd..4ac0a3aa7f1 100644--- a/web/app/components/plugins/install-plugin/install-from-github/index.tsx+++ b/web/app/components/plugins/install-plugin/install-from-github/index.tsx@@ -4,11 +4,11 @@ import type { PluginDeclaration, UpdateFromGitHubPayload } from '../../types'import type { Item } from '@/app/components/base/select'import type { InstallState } from '@/app/components/plugins/types'import { cn } from '@langgenius/dify-ui/cn'+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 { toast } from '@/app/components/base/ui/toast'import useGetIcon from '@/app/components/plugins/install-plugin/base/use-get-icon'import { InstallStepFromGitHub } from '../../types'import Installed from '../base/installed'diff --git a/web/app/components/plugins/install-plugin/install-from-github/steps/loaded.tsx b/web/app/components/plugins/install-plugin/install-from-github/steps/loaded.tsxindex c044445f19f..ff7630e3a21 100644--- a/web/app/components/plugins/install-plugin/install-from-github/steps/loaded.tsx+++ b/web/app/components/plugins/install-plugin/install-from-github/steps/loaded.tsx@@ -1,11 +1,11 @@'use client'import type { Plugin, PluginDeclaration, UpdateFromGitHubPayload } from '../../../types'+import { Button } from '@langgenius/dify-ui/button'import { RiLoader2Line } from '@remixicon/react'import * as React from 'react'import { useEffect } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import useCheckInstalled from '@/app/components/plugins/install-plugin/hooks/use-check-installed'import { updateFromGitHub } from '@/service/plugins'import { useInstallPackageFromGitHub, usePluginTaskList } from '@/service/use-plugins'diff --git a/web/app/components/plugins/install-plugin/install-from-github/steps/selectPackage.tsx b/web/app/components/plugins/install-plugin/install-from-github/steps/selectPackage.tsxindex a8236b4b933..18c33def820 100644--- a/web/app/components/plugins/install-plugin/install-from-github/steps/selectPackage.tsx+++ b/web/app/components/plugins/install-plugin/install-from-github/steps/selectPackage.tsx@@ -2,10 +2,10 @@import type { PluginDeclaration, UpdateFromGitHubPayload } from '../../../types'import type { Item } from '@/app/components/base/select'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import { PortalSelect } from '@/app/components/base/select'-import { Button } from '@/app/components/base/ui/button'import { handleUpload } from '../../hooks'const i18nPrefix = 'installFromGitHub'diff --git a/web/app/components/plugins/install-plugin/install-from-github/steps/setURL.tsx b/web/app/components/plugins/install-plugin/install-from-github/steps/setURL.tsxindex 2a7012d40c4..f1b149a8bfc 100644--- a/web/app/components/plugins/install-plugin/install-from-github/steps/setURL.tsx+++ b/web/app/components/plugins/install-plugin/install-from-github/steps/setURL.tsx@@ -1,8 +1,8 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type SetURLProps = {repoUrl: stringdiff --git a/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx b/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsxindex 9ef52d7a5d7..7c0a90f179b 100644--- a/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx+++ b/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'import type { PluginDeclaration } from '../../../types'+import { Button } from '@langgenius/dify-ui/button'import { RiLoader2Line } from '@remixicon/react'import * as React from 'react'import { useEffect, useMemo } from 'react'import { Trans, useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import useCheckInstalled from '@/app/components/plugins/install-plugin/hooks/use-check-installed'import { useAppContext } from '@/context/app-context'import { uninstallPlugin } from '@/service/plugins'diff --git a/web/app/components/plugins/install-plugin/install-from-local-package/steps/uploading.tsx b/web/app/components/plugins/install-plugin/install-from-local-package/steps/uploading.tsxindex f9f9969817f..e7c3b4cd0f6 100644--- a/web/app/components/plugins/install-plugin/install-from-local-package/steps/uploading.tsx+++ b/web/app/components/plugins/install-plugin/install-from-local-package/steps/uploading.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'import type { Dependency, PluginDeclaration } from '../../../types'+import { Button } from '@langgenius/dify-ui/button'import { RiLoader2Line } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { uploadFile } from '@/service/plugins'import Card from '../../../card'diff --git a/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx b/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsxindex ac8b458406c..91397f3189a 100644--- a/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx+++ b/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'import type { Plugin, PluginManifestInMarket } from '../../../types'+import { Button } from '@langgenius/dify-ui/button'import { RiLoader2Line } from '@remixicon/react'import * as React from 'react'import { useEffect, useMemo } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import useCheckInstalled from '@/app/components/plugins/install-plugin/hooks/use-check-installed'import { useAppContext } from '@/context/app-context'import { useInstallPackageFromMarketPlace, usePluginDeclarationFromMarketPlace, usePluginTaskList, useUpdatePackageFromMarketPlace } from '@/service/use-plugins'diff --git a/web/app/components/plugins/marketplace/list/card-wrapper.tsx b/web/app/components/plugins/marketplace/list/card-wrapper.tsxindex 6cab636392d..9dc5bc3d785 100644--- a/web/app/components/plugins/marketplace/list/card-wrapper.tsx+++ b/web/app/components/plugins/marketplace/list/card-wrapper.tsx@@ -1,12 +1,12 @@'use client'import type { Plugin } from '@/app/components/plugins/types'import { useLocale, useTranslation } from '#i18n'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowRightUpLine } from '@remixicon/react'import { useBoolean } from 'ahooks'import { useTheme } from 'next-themes'import * as React from 'react'import { useMemo } from 'react'-import { Button } from '@/app/components/base/ui/button'import Card from '@/app/components/plugins/card'import CardMoreInfo from '@/app/components/plugins/card/card-more-info'import { useTags } from '@/app/components/plugins/hooks'diff --git a/web/app/components/plugins/marketplace/sort-dropdown/__tests__/index.spec.tsx b/web/app/components/plugins/marketplace/sort-dropdown/__tests__/index.spec.tsxindex 990bb321de1..5bf5b6bb99a 100644--- a/web/app/components/plugins/marketplace/sort-dropdown/__tests__/index.spec.tsx+++ b/web/app/components/plugins/marketplace/sort-dropdown/__tests__/index.spec.tsx@@ -31,7 +31,7 @@ vi.mock('../../atoms', () => ({useMarketplaceSort: () => [mockSort, mockHandleSortChange],}))-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const React = await import('react')const DropdownMenuContext = React.createContext<{ open: boolean, setOpen: (open: boolean) => void } | null>(null)diff --git a/web/app/components/plugins/marketplace/sort-dropdown/index.tsx b/web/app/components/plugins/marketplace/sort-dropdown/index.tsxindex a47143de022..b8f5467fa1b 100644--- a/web/app/components/plugins/marketplace/sort-dropdown/index.tsx+++ b/web/app/components/plugins/marketplace/sort-dropdown/index.tsx@@ -1,12 +1,12 @@'use client'import { useTranslation } from '#i18n'-import { useState } from 'react'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { useState } from 'react'import { useMarketplaceSort } from '../atoms'const SortDropdown = () => {diff --git a/web/app/components/plugins/plugin-auth/authorize/__tests__/api-key-modal.spec.tsx b/web/app/components/plugins/plugin-auth/authorize/__tests__/api-key-modal.spec.tsxindex a4ddec8f515..2bfa94d2edd 100644--- a/web/app/components/plugins/plugin-auth/authorize/__tests__/api-key-modal.spec.tsx+++ b/web/app/components/plugins/plugin-auth/authorize/__tests__/api-key-modal.spec.tsx@@ -15,7 +15,7 @@ const mockToast = {promise: vi.fn(),}-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))const mockAddPluginCredential = vi.fn().mockResolvedValue({})diff --git a/web/app/components/plugins/plugin-auth/authorize/__tests__/authorize-components.spec.tsx b/web/app/components/plugins/plugin-auth/authorize/__tests__/authorize-components.spec.tsxindex c495d5501af..cba5c606548 100644--- a/web/app/components/plugins/plugin-auth/authorize/__tests__/authorize-components.spec.tsx+++ b/web/app/components/plugins/plugin-auth/authorize/__tests__/authorize-components.spec.tsx@@ -104,7 +104,7 @@ const mockToast = {promise: vi.fn(),}-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))// Factory function for creating test PluginPayloaddiff --git a/web/app/components/plugins/plugin-auth/authorize/__tests__/oauth-client-settings.spec.tsx b/web/app/components/plugins/plugin-auth/authorize/__tests__/oauth-client-settings.spec.tsxindex 5f9b6f5695c..2c86820202d 100644--- a/web/app/components/plugins/plugin-auth/authorize/__tests__/oauth-client-settings.spec.tsx+++ b/web/app/components/plugins/plugin-auth/authorize/__tests__/oauth-client-settings.spec.tsx@@ -14,7 +14,7 @@ const mockToast = {promise: vi.fn(),}-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))const mockSetPluginOAuthCustomClient = vi.fn().mockResolvedValue({})diff --git a/web/app/components/plugins/plugin-auth/authorize/add-api-key-button.tsx b/web/app/components/plugins/plugin-auth/authorize/add-api-key-button.tsxindex 2db1751bdc8..648a87dabce 100644--- a/web/app/components/plugins/plugin-auth/authorize/add-api-key-button.tsx+++ b/web/app/components/plugins/plugin-auth/authorize/add-api-key-button.tsx@@ -1,11 +1,11 @@+import type { ButtonProps } from '@langgenius/dify-ui/button'import type { PluginPayload } from '../types'import type { FormSchema } from '@/app/components/base/form/types'-import type { ButtonProps } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import {memo,useState,} from 'react'-import { Button } from '@/app/components/base/ui/button'import ApiKeyModal from './api-key-modal'export type AddApiKeyButtonProps = {diff --git a/web/app/components/plugins/plugin-auth/authorize/add-oauth-button.tsx b/web/app/components/plugins/plugin-auth/authorize/add-oauth-button.tsxindex 31e87564e77..44b48db7a21 100644--- a/web/app/components/plugins/plugin-auth/authorize/add-oauth-button.tsx+++ b/web/app/components/plugins/plugin-auth/authorize/add-oauth-button.tsx@@ -1,6 +1,7 @@+import type { ButtonProps } from '@langgenius/dify-ui/button'import type { PluginPayload } from '../types'import type { FormSchema } from '@/app/components/base/form/types'-import type { ButtonProps } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiClipboardLine,@@ -17,7 +18,6 @@ import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Badge from '@/app/components/base/badge'import { FormTypeEnum } from '@/app/components/base/form/types'-import { Button } from '@/app/components/base/ui/button'import { useRenderI18nObject } from '@/hooks/use-i18n'import { openOAuthPopup } from '@/hooks/use-oauth'import {diff --git a/web/app/components/plugins/plugin-auth/authorize/api-key-modal.tsx b/web/app/components/plugins/plugin-auth/authorize/api-key-modal.tsxindex 5d8eafbe67f..db513ecb6f4 100644--- a/web/app/components/plugins/plugin-auth/authorize/api-key-modal.tsx+++ b/web/app/components/plugins/plugin-auth/authorize/api-key-modal.tsx@@ -3,6 +3,7 @@ import type {FormRefObject,FormSchema,} from '@/app/components/base/form/types'+import { toast } from '@langgenius/dify-ui/toast'import {memo,useCallback,@@ -16,7 +17,6 @@ import AuthForm from '@/app/components/base/form/form-scenarios/auth'import { FormTypeEnum } from '@/app/components/base/form/types'import Loading from '@/app/components/base/loading'import Modal from '@/app/components/base/modal/modal'-import { toast } from '@/app/components/base/ui/toast'import { ReadmeEntrance } from '../../readme-panel/entrance'import { ReadmeShowType } from '../../readme-panel/store'import {diff --git a/web/app/components/plugins/plugin-auth/authorize/oauth-client-settings.tsx b/web/app/components/plugins/plugin-auth/authorize/oauth-client-settings.tsxindex 625fcaa980c..f52b76866a8 100644--- a/web/app/components/plugins/plugin-auth/authorize/oauth-client-settings.tsx+++ b/web/app/components/plugins/plugin-auth/authorize/oauth-client-settings.tsx@@ -3,6 +3,8 @@ import type {FormRefObject,FormSchema,} from '@/app/components/base/form/types'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import {useForm,useStore,@@ -16,8 +18,6 @@ import {import { useTranslation } from 'react-i18next'import AuthForm from '@/app/components/base/form/form-scenarios/auth'import Modal from '@/app/components/base/modal/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { ReadmeEntrance } from '../../readme-panel/entrance'import { ReadmeShowType } from '../../readme-panel/store'import {diff --git a/web/app/components/plugins/plugin-auth/authorized-in-data-source-node.tsx b/web/app/components/plugins/plugin-auth/authorized-in-data-source-node.tsxindex 548b1fb175a..13044d7bbcb 100644--- a/web/app/components/plugins/plugin-auth/authorized-in-data-source-node.tsx+++ b/web/app/components/plugins/plugin-auth/authorized-in-data-source-node.tsx@@ -1,10 +1,10 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiEqualizer2Line } from '@remixicon/react'import {memo,} from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'type AuthorizedInDataSourceNodeProps = {diff --git a/web/app/components/plugins/plugin-auth/authorized-in-node.tsx b/web/app/components/plugins/plugin-auth/authorized-in-node.tsxindex 048bbf3e8fb..e4f55e82e3a 100644--- a/web/app/components/plugins/plugin-auth/authorized-in-node.tsx+++ b/web/app/components/plugins/plugin-auth/authorized-in-node.tsx@@ -2,6 +2,7 @@ import type {Credential,PluginPayload,} from './types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowDownSLine } from '@remixicon/react'import {@@ -10,7 +11,6 @@ import {useState,} from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'import {Authorized,diff --git a/web/app/components/plugins/plugin-auth/authorized/__tests__/index.spec.tsx b/web/app/components/plugins/plugin-auth/authorized/__tests__/index.spec.tsxindex a1270675269..01e195b21b2 100644--- a/web/app/components/plugins/plugin-auth/authorized/__tests__/index.spec.tsx+++ b/web/app/components/plugins/plugin-auth/authorized/__tests__/index.spec.tsx@@ -57,7 +57,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),diff --git a/web/app/components/plugins/plugin-auth/authorized/index.tsx b/web/app/components/plugins/plugin-auth/authorized/index.tsxindex 4729909a1f9..fed2873b983 100644--- a/web/app/components/plugins/plugin-auth/authorized/index.tsx+++ b/web/app/components/plugins/plugin-auth/authorized/index.tsx@@ -2,7 +2,17 @@ import type { Credential, PluginPayload } from '../types'import type {PortalToFollowElemOptions,} from '@/app/components/base/portal-to-follow-elem'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {RiArrowDownSLine,} from '@remixicon/react'@@ -18,16 +28,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Indicator from '@/app/components/header/indicator'import Authorize from '../authorize'import ApiKeyModal from '../authorize/api-key-modal'diff --git a/web/app/components/plugins/plugin-auth/authorized/item.tsx b/web/app/components/plugins/plugin-auth/authorized/item.tsxindex 82e3fc45630..9193238a550 100644--- a/web/app/components/plugins/plugin-auth/authorized/item.tsx+++ b/web/app/components/plugins/plugin-auth/authorized/item.tsx@@ -1,4 +1,5 @@import type { Credential } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiCheckLine,@@ -16,7 +17,6 @@ import ActionButton from '@/app/components/base/action-button'import Badge from '@/app/components/base/badge'import Input from '@/app/components/base/input'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'import { CredentialTypeEnum } from '../types'diff --git a/web/app/components/plugins/plugin-auth/hooks/__tests__/use-plugin-auth-action.spec.ts b/web/app/components/plugins/plugin-auth/hooks/__tests__/use-plugin-auth-action.spec.tsindex ddf8f83019d..06af4a88ee4 100644--- a/web/app/components/plugins/plugin-auth/hooks/__tests__/use-plugin-auth-action.spec.ts+++ b/web/app/components/plugins/plugin-auth/hooks/__tests__/use-plugin-auth-action.spec.ts@@ -16,7 +16,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),diff --git a/web/app/components/plugins/plugin-auth/hooks/use-plugin-auth-action.ts b/web/app/components/plugins/plugin-auth/hooks/use-plugin-auth-action.tsindex b4714ff96c0..7c63753ee88 100644--- a/web/app/components/plugins/plugin-auth/hooks/use-plugin-auth-action.ts+++ b/web/app/components/plugins/plugin-auth/hooks/use-plugin-auth-action.ts@@ -1,11 +1,11 @@import type { PluginPayload } from '../types'+import { toast } from '@langgenius/dify-ui/toast'import {useCallback,useRef,useState,} from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import {useDeletePluginCredentialHook,useSetPluginDefaultCredentialHook,diff --git a/web/app/components/plugins/plugin-auth/plugin-auth-in-agent.tsx b/web/app/components/plugins/plugin-auth/plugin-auth-in-agent.tsxindex f54093f0f98..fd698f811ca 100644--- a/web/app/components/plugins/plugin-auth/plugin-auth-in-agent.tsx+++ b/web/app/components/plugins/plugin-auth/plugin-auth-in-agent.tsx@@ -2,6 +2,7 @@ import type {Credential,PluginPayload,} from './types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowDownSLine } from '@remixicon/react'import {@@ -10,7 +11,6 @@ import {useState,} from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'import Authorize from './authorize'import Authorized from './authorized'diff --git a/web/app/components/plugins/plugin-auth/plugin-auth-in-datasource-node.tsx b/web/app/components/plugins/plugin-auth/plugin-auth-in-datasource-node.tsxindex e3df399a1cc..5cdc893dddf 100644--- a/web/app/components/plugins/plugin-auth/plugin-auth-in-datasource-node.tsx+++ b/web/app/components/plugins/plugin-auth/plugin-auth-in-datasource-node.tsx@@ -1,8 +1,8 @@import type { ReactNode } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { RiAddLine } from '@remixicon/react'import { memo } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type PluginAuthInDataSourceNodeProps = {children?: ReactNodediff --git a/web/app/components/plugins/plugin-detail-panel/__tests__/detail-header.spec.tsx b/web/app/components/plugins/plugin-detail-panel/__tests__/detail-header.spec.tsxindex 0eacbf3bd33..63cf25d0398 100644--- a/web/app/components/plugins/plugin-detail-panel/__tests__/detail-header.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/__tests__/detail-header.spec.tsx@@ -17,7 +17,7 @@ const { mockToast } = vi.hoisted(() => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))diff --git a/web/app/components/plugins/plugin-detail-panel/__tests__/endpoint-card.spec.tsx b/web/app/components/plugins/plugin-detail-panel/__tests__/endpoint-card.spec.tsxindex 15c231cb17a..1dab8bdf844 100644--- a/web/app/components/plugins/plugin-detail-panel/__tests__/endpoint-card.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/__tests__/endpoint-card.spec.tsx@@ -10,7 +10,7 @@ const mockDeleteEndpoint = vi.fn()const mockUpdateEndpoint = vi.fn()const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }),{diff --git a/web/app/components/plugins/plugin-detail-panel/__tests__/endpoint-modal.spec.tsx b/web/app/components/plugins/plugin-detail-panel/__tests__/endpoint-modal.spec.tsxindex 0be17f07d41..7ccd5065e53 100644--- a/web/app/components/plugins/plugin-detail-panel/__tests__/endpoint-modal.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/__tests__/endpoint-modal.spec.tsx@@ -6,7 +6,7 @@ import EndpointModal from '../endpoint-modal'const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }),{diff --git a/web/app/components/plugins/plugin-detail-panel/__tests__/operation-dropdown.spec.tsx b/web/app/components/plugins/plugin-detail-panel/__tests__/operation-dropdown.spec.tsxindex fa3d6f22668..db6ff579570 100644--- a/web/app/components/plugins/plugin-detail-panel/__tests__/operation-dropdown.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/__tests__/operation-dropdown.spec.tsx@@ -14,7 +14,7 @@ vi.mock('@langgenius/dify-ui/cn', () => ({cn: (...args: (string | undefined | false | null)[]) => args.filter(Boolean).join(' '),}))-vi.mock('@/app/components/base/ui/dropdown-menu', () => ({+vi.mock('@langgenius/dify-ui/dropdown-menu', () => ({DropdownMenu: ({ children, open }: { children: ReactNode, open: boolean }) => (<div data-testid="dropdown-menu" data-open={open}>{children}</div>),diff --git a/web/app/components/plugins/plugin-detail-panel/datasource-action-list.tsx b/web/app/components/plugins/plugin-detail-panel/datasource-action-list.tsxindex cafdb7b4b9e..5bba7b823b6 100644--- a/web/app/components/plugins/plugin-detail-panel/datasource-action-list.tsx+++ b/web/app/components/plugins/plugin-detail-panel/datasource-action-list.tsx@@ -1,5 +1,5 @@// import { useAppContext } from '@/context/app-context'-// import { Button } from '@/app/components/base/ui/button'+// import { Button } from '@langgenius/dify-ui/button'// import Indicator from '@/app/components/header/indicator'// import ToolItem from '@/app/components/tools/provider/tool-item'// import ConfigCredential from '@/app/components/tools/setting/build-in/config-credentials'diff --git a/web/app/components/plugins/plugin-detail-panel/detail-header/__tests__/index.spec.tsx b/web/app/components/plugins/plugin-detail-panel/detail-header/__tests__/index.spec.tsxindex 84a61cd643f..24838fea592 100644--- a/web/app/components/plugins/plugin-detail-panel/detail-header/__tests__/index.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/detail-header/__tests__/index.spec.tsx@@ -45,7 +45,7 @@ vi.mock('@/app/components/base/action-button', () => ({),}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick }: { children: React.ReactNode, onClick?: () => void }) => (<button onClick={onClick}>{children}</button>),@@ -57,7 +57,7 @@ vi.mock('@/app/components/base/badge', () => ({),}))-vi.mock('@/app/components/base/ui/tooltip', () => ({+vi.mock('@langgenius/dify-ui/tooltip', () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,TooltipTrigger: ({ render }: { render: React.ReactNode }) => <>{render}</>,TooltipContent: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,diff --git a/web/app/components/plugins/plugin-detail-panel/detail-header/components/header-modals.tsx b/web/app/components/plugins/plugin-detail-panel/detail-header/components/header-modals.tsxindex 3bf24a19b71..c2f6bb8210b 100644--- a/web/app/components/plugins/plugin-detail-panel/detail-header/components/header-modals.tsx+++ b/web/app/components/plugins/plugin-detail-panel/detail-header/components/header-modals.tsx@@ -3,7 +3,6 @@import type { FC } from 'react'import type { PluginDetail } from '../../../types'import type { ModalStates, VersionTarget } from '../hooks'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -12,7 +11,8 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import { useTranslation } from 'react-i18next'import PluginInfo from '@/app/components/plugins/plugin-page/plugin-info'import UpdateFromMarketplace from '@/app/components/plugins/update-plugin/from-market-place'import { useGetLanguage } from '@/context/i18n'diff --git a/web/app/components/plugins/plugin-detail-panel/detail-header/hooks/__tests__/use-plugin-operations.spec.ts b/web/app/components/plugins/plugin-detail-panel/detail-header/hooks/__tests__/use-plugin-operations.spec.tsindex b8873f10875..855530bf186 100644--- a/web/app/components/plugins/plugin-detail-panel/detail-header/hooks/__tests__/use-plugin-operations.spec.ts+++ b/web/app/components/plugins/plugin-detail-panel/detail-header/hooks/__tests__/use-plugin-operations.spec.ts@@ -33,7 +33,7 @@ const {}})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }),{diff --git a/web/app/components/plugins/plugin-detail-panel/detail-header/hooks/use-plugin-operations.ts b/web/app/components/plugins/plugin-detail-panel/detail-header/hooks/use-plugin-operations.tsindex 765c0e8a4e6..62c762a35d1 100644--- a/web/app/components/plugins/plugin-detail-panel/detail-header/hooks/use-plugin-operations.ts+++ b/web/app/components/plugins/plugin-detail-panel/detail-header/hooks/use-plugin-operations.ts@@ -2,10 +2,10 @@import type { PluginDetail } from '../../../types'import type { ModalStates, VersionTarget } from './use-detail-header-state'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { trackEvent } from '@/app/components/base/amplitude'-import { toast } from '@/app/components/base/ui/toast'import { useModalContext } from '@/context/modal-context'import { useProviderContext } from '@/context/provider-context'import { uninstallPlugin } from '@/service/plugins'diff --git a/web/app/components/plugins/plugin-detail-panel/detail-header/index.tsx b/web/app/components/plugins/plugin-detail-panel/detail-header/index.tsxindex 5a89afa2c9d..1ed91a93f5a 100644--- a/web/app/components/plugins/plugin-detail-panel/detail-header/index.tsx+++ b/web/app/components/plugins/plugin-detail-panel/detail-header/index.tsx@@ -1,13 +1,13 @@'use client'import type { PluginDetail } from '../../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Badge from '@/app/components/base/badge'-import { Button } from '@/app/components/base/ui/button'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { AuthCategory, PluginAuth } from '@/app/components/plugins/plugin-auth'import OperationDropdown from '@/app/components/plugins/plugin-detail-panel/operation-dropdown'import PluginVersionPicker from '@/app/components/plugins/update-plugin/plugin-version-picker'diff --git a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsxindex a8729763ec5..e1adc6282dd 100644--- a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx+++ b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx@@ -1,4 +1,14 @@import type { EndpointListItem, PluginDetail } from '../types'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'import { RiClipboardLine, RiDeleteBinLine, RiEditLine, RiLoginCircleLine } from '@remixicon/react'import { useBoolean } from 'ahooks'import copy from 'copy-to-clipboard'@@ -7,17 +17,7 @@ import { useEffect, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import { CopyCheck } from '@/app/components/base/icons/src/vender/line/files'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { toast } from '@/app/components/base/ui/toast'import Indicator from '@/app/components/header/indicator'import { addDefaultValue, toolCredentialToFormSchemas } from '@/app/components/tools/utils/to-form-schema'import {diff --git a/web/app/components/plugins/plugin-detail-panel/endpoint-list.tsx b/web/app/components/plugins/plugin-detail-panel/endpoint-list.tsxindex c3c09db7861..2d11305f6ef 100644--- a/web/app/components/plugins/plugin-detail-panel/endpoint-list.tsx+++ b/web/app/components/plugins/plugin-detail-panel/endpoint-list.tsx@@ -1,5 +1,6 @@import type { PluginDetail } from '@/app/components/plugins/types'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {RiAddLine,RiApps2AddLine,@@ -11,7 +12,6 @@ import { useMemo } from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Tooltip from '@/app/components/base/tooltip'-import { toast } from '@/app/components/base/ui/toast'import { toolCredentialToFormSchemas } from '@/app/components/tools/utils/to-form-schema'import { useDocLink } from '@/context/i18n'import {diff --git a/web/app/components/plugins/plugin-detail-panel/endpoint-modal.tsx b/web/app/components/plugins/plugin-detail-panel/endpoint-modal.tsxindex 4c694d42938..0fe0fff6dff 100644--- a/web/app/components/plugins/plugin-detail-panel/endpoint-modal.tsx+++ b/web/app/components/plugins/plugin-detail-panel/endpoint-modal.tsx@@ -2,14 +2,14 @@import type { FC } from 'react'import type { FormSchema } from '../../base/form/types'import type { PluginDetail } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowRightUpLine, RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Drawer from '@/app/components/base/drawer'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Form from '@/app/components/header/account-setting/model-provider-page/model-modal/Form'import { useRenderI18nObject } from '@/hooks/use-i18n'import { ReadmeEntrance } from '../readme-panel/entrance'diff --git a/web/app/components/plugins/plugin-detail-panel/model-selector/__tests__/index.spec.tsx b/web/app/components/plugins/plugin-detail-panel/model-selector/__tests__/index.spec.tsxindex 107d42ada25..00ed9eb4f1f 100644--- a/web/app/components/plugins/plugin-detail-panel/model-selector/__tests__/index.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/model-selector/__tests__/index.spec.tsx@@ -9,7 +9,7 @@ import ModelParameterModal from '../index'// ==================== Mock Setup ====================const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }),{diff --git a/web/app/components/plugins/plugin-detail-panel/model-selector/__tests__/tts-params-panel.spec.tsx b/web/app/components/plugins/plugin-detail-panel/model-selector/__tests__/tts-params-panel.spec.tsxindex e4233598721..1d000f7c356 100644--- a/web/app/components/plugins/plugin-detail-panel/model-selector/__tests__/tts-params-panel.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/model-selector/__tests__/tts-params-panel.spec.tsx@@ -26,8 +26,8 @@ const MockSelectContext = React.createContext<{onValueChange: () => {},})-vi.mock('@/app/components/base/ui/select', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/select')>()+vi.mock('@langgenius/dify-ui/select', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/select')>()return {...actual,diff --git a/web/app/components/plugins/plugin-detail-panel/model-selector/index.tsx b/web/app/components/plugins/plugin-detail-panel/model-selector/index.tsxindex 5f5c0494a92..d0dcab18ea7 100644--- a/web/app/components/plugins/plugin-detail-panel/model-selector/index.tsx+++ b/web/app/components/plugins/plugin-detail-panel/model-selector/index.tsx@@ -9,14 +9,14 @@ import type {} from '@/app/components/header/account-setting/model-provider-page/declarations'import type { TriggerProps } from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal/trigger'import { cn } from '@langgenius/dify-ui/cn'-import { useMemo, useState } from 'react'-import { useTranslation } from 'react-i18next'import {Popover,PopoverContent,PopoverTrigger,-} from '@/app/components/base/ui/popover'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/popover'+import { toast } from '@langgenius/dify-ui/toast'+import { useMemo, useState } from 'react'+import { useTranslation } from 'react-i18next'import { ModelStatusEnum, ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import {useModelList,diff --git a/web/app/components/plugins/plugin-detail-panel/model-selector/tts-params-panel.tsx b/web/app/components/plugins/plugin-detail-panel/model-selector/tts-params-panel.tsxindex 1ab7ea2f113..7edf2f5d18c 100644--- a/web/app/components/plugins/plugin-detail-panel/model-selector/tts-params-panel.tsx+++ b/web/app/components/plugins/plugin-detail-panel/model-selector/tts-params-panel.tsx@@ -1,7 +1,7 @@+import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger, SelectValue } from '@langgenius/dify-ui/select'import * as React from 'react'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'-import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger, SelectValue } from '@/app/components/base/ui/select'import { languages } from '@/i18n-config/language'type Props = {diff --git a/web/app/components/plugins/plugin-detail-panel/operation-dropdown.tsx b/web/app/components/plugins/plugin-detail-panel/operation-dropdown.tsxindex 4b36e4612c1..c7a1529a3e4 100644--- a/web/app/components/plugins/plugin-detail-panel/operation-dropdown.tsx+++ b/web/app/components/plugins/plugin-detail-panel/operation-dropdown.tsx@@ -1,16 +1,16 @@'use client'+import type { Placement } from '@langgenius/dify-ui/dropdown-menu'import type { FC } from 'react'-import type { Placement } from '@/app/components/base/ui/placement'import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import { useTranslation } from 'react-i18next'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import * as React from 'react'+import { useTranslation } from 'react-i18next'import { useGlobalPublicStore } from '@/context/global-public-context'import { PluginSource } from '../types'diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/delete-confirm.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/delete-confirm.spec.tsxindex f083c24f42b..c2cc608b453 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/delete-confirm.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/delete-confirm.spec.tsx@@ -15,8 +15,8 @@ vi.mock('@/service/use-triggers', () => ({useDeleteTriggerSubscription: () => ({ mutate: mockDelete, isPending: false }),}))-vi.mock('@/app/components/base/ui/toast', async (importOriginal) => {- const actual = await importOriginal<typeof import('@/app/components/base/ui/toast')>()+vi.mock('@langgenius/dify-ui/toast', async (importOriginal) => {+ const actual = await importOriginal<typeof import('@langgenius/dify-ui/toast')>()return {...actual,toast: {diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/log-viewer.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/log-viewer.spec.tsxindex 351c1f9d2df..3594c10ce28 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/log-viewer.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/log-viewer.spec.tsx@@ -6,7 +6,7 @@ import LogViewer from '../log-viewer'const mockToastNotify = vi.fn()const mockWriteText = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }),{diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/selector-entry.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/selector-entry.spec.tsxindex 3c4ff83fc8d..37d828591ff 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/selector-entry.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/selector-entry.spec.tsx@@ -26,7 +26,7 @@ vi.mock('@/service/use-triggers', () => ({useDeleteTriggerSubscription: () => ({ mutate: vi.fn(), isPending: false }),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(vi.fn(), {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/selector-view.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/selector-view.spec.tsxindex 44cec53e283..2256e90e9db 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/selector-view.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/selector-view.spec.tsx@@ -25,7 +25,7 @@ vi.mock('@/service/use-triggers', () => ({useDeleteTriggerSubscription: () => ({ mutate: mockDelete, isPending: false }),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(vi.fn(), {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/subscription-card.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/subscription-card.spec.tsxindex 19edb65dfbc..9a89aab7cf4 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/subscription-card.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/__tests__/subscription-card.spec.tsx@@ -29,7 +29,7 @@ vi.mock('@/service/use-triggers', () => ({useDeleteTriggerSubscription: () => ({ mutate: vi.fn(), isPending: false }),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(vi.fn(), {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/common-modal.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/common-modal.spec.tsxindex 72532ea38d8..459b657f3f1 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/common-modal.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/common-modal.spec.tsx@@ -122,7 +122,7 @@ vi.mock('@/utils/urlValidation', () => ({}))const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((params: unknown) => mockToastNotify(params), {success: (message: unknown) => mockToastNotify({ type: 'success', message }),error: (message: unknown) => mockToastNotify({ type: 'error', message }),diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/index.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/index.spec.tsxindex 0714fbf5543..e1615e7b0a5 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/index.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/index.spec.tsx@@ -1,8 +1,8 @@import type { SimpleDetail } from '../../../store'import type { TriggerOAuthConfig, TriggerProviderApiEntity, TriggerSubscription, TriggerSubscriptionBuilder } from '@/app/components/workflow/block-selector/types'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import { toast } from '@/app/components/base/ui/toast'import { SupportedCreationMethods } from '@/app/components/plugins/types'import { TriggerCredentialTypeEnum } from '@/app/components/workflow/block-selector/types'import { CreateButtonType, CreateSubscriptionButton, DEFAULT_METHOD } from '../index'@@ -34,7 +34,7 @@ vi.mock('@/app/components/base/portal-to-follow-elem', () => ({},}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(vi.fn(), {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/oauth-client.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/oauth-client.spec.tsxindex 5c4407b3c54..46b94990274 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/oauth-client.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/oauth-client.spec.tsx@@ -86,7 +86,7 @@ vi.mock('@/hooks/use-oauth', () => ({}))const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }),{diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-common-modal-state.helpers.spec.ts b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-common-modal-state.helpers.spec.tsindex 61482e2912e..87db85b56e0 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-common-modal-state.helpers.spec.ts+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-common-modal-state.helpers.spec.ts@@ -27,7 +27,7 @@ const {mockIsPrivateOrLocalAddress: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,},diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-common-modal-state.spec.ts b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-common-modal-state.spec.tsindex 399d3ba60cd..26e4a69baa7 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-common-modal-state.spec.ts+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-common-modal-state.spec.ts@@ -87,7 +87,7 @@ vi.mock('@/service/use-triggers', () => ({}))const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockToastNotify({ type: 'success', message }),error: (message: string) => mockToastNotify({ type: 'error', message }),diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-oauth-client-state.spec.ts b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-oauth-client-state.spec.tsindex cebfc947e7c..82eddf501d9 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-oauth-client-state.spec.ts+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/__tests__/use-oauth-client-state.spec.ts@@ -77,7 +77,7 @@ vi.mock('@/hooks/use-oauth', () => ({}))const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }),{diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-common-modal-state.helpers.ts b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-common-modal-state.helpers.tsindex 8df864c4fa2..2754bbf39dd 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-common-modal-state.helpers.ts+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-common-modal-state.helpers.ts@@ -3,8 +3,8 @@ import type { Dispatch, SetStateAction } from 'react'import type { FormRefObject } from '@/app/components/base/form/types'import type { TriggerSubscriptionBuilder } from '@/app/components/workflow/block-selector/types'import type { BuildTriggerSubscriptionPayload } from '@/service/use-triggers'+import { toast } from '@langgenius/dify-ui/toast'import { useEffect, useRef } from 'react'-import { toast } from '@/app/components/base/ui/toast'import { SupportedCreationMethods } from '@/app/components/plugins/types'import { isPrivateOrLocalAddress } from '@/utils/urlValidation'diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-common-modal-state.ts b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-common-modal-state.tsindex 29613c6f4fe..0f40da2d581 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-common-modal-state.ts+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-common-modal-state.ts@@ -3,10 +3,10 @@ import type { SimpleDetail } from '../../../store'import type { SchemaItem } from '../components/modal-steps'import type { FormRefObject } from '@/app/components/base/form/types'import type { TriggerLogEntity, TriggerSubscriptionBuilder } from '@/app/components/workflow/block-selector/types'+import { toast } from '@langgenius/dify-ui/toast'import { debounce } from 'es-toolkit/compat'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { SupportedCreationMethods } from '@/app/components/plugins/types'import { TriggerCredentialTypeEnum } from '@/app/components/workflow/block-selector/types'import {diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-oauth-client-state.ts b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-oauth-client-state.tsindex e5a5ded9df3..25058e529c8 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-oauth-client-state.ts+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/hooks/use-oauth-client-state.ts@@ -2,9 +2,9 @@import type { FormRefObject } from '@/app/components/base/form/types'import type { TriggerOAuthClientParams, TriggerOAuthConfig, TriggerSubscriptionBuilder } from '@/app/components/workflow/block-selector/types'import type { ConfigureTriggerOAuthPayload } from '@/service/use-triggers'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { openOAuthPopup } from '@/hooks/use-oauth'import {useConfigureTriggerOAuth,diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsxindex 4861f309348..b007c89cb94 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx@@ -1,6 +1,8 @@import type { Option } from '@/app/components/base/select/custom'import type { TriggerSubscriptionBuilder } from '@/app/components/workflow/block-selector/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiAddLine, RiEqualizer2Line } from '@remixicon/react'import { useBoolean } from 'ahooks'import { useCallback, useMemo, useState } from 'react'@@ -9,8 +11,6 @@ import { ActionButton, ActionButtonState } from '@/app/components/base/action-buimport Badge from '@/app/components/base/badge'import CustomSelect from '@/app/components/base/select/custom'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { openOAuthPopup } from '@/hooks/use-oauth'import { useInitiateTriggerOAuth, useTriggerOAuthConfig, useTriggerProviderInfo } from '@/service/use-triggers'import { SupportedCreationMethods } from '../../../types'diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsxindex c4ae63ab661..450324ae40f 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx@@ -1,5 +1,7 @@'use client'import type { TriggerOAuthConfig, TriggerSubscriptionBuilder } from '@/app/components/workflow/block-selector/types'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import {RiClipboardLine,RiInformation2Fill,@@ -7,8 +9,6 @@ import {import { useTranslation } from 'react-i18next'import { BaseForm } from '@/app/components/base/form/components/base'import Modal from '@/app/components/base/modal/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import OptionCard from '@/app/components/workflow/nodes/_base/components/option-card'import { usePluginStore } from '../../store'import { ClientTypeEnum, useOAuthClientState } from './hooks/use-oauth-client-state'diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/delete-confirm.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/delete-confirm.tsxindex a360a477e30..3599dc6260c 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/delete-confirm.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/delete-confirm.tsx@@ -1,6 +1,3 @@-import { useState } from 'react'-import { useTranslation } from 'react-i18next'-import Input from '@/app/components/base/input'import {AlertDialog,AlertDialogActions,@@ -9,8 +6,11 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/alert-dialog'+import { toast } from '@langgenius/dify-ui/toast'+import { useState } from 'react'+import { useTranslation } from 'react-i18next'+import Input from '@/app/components/base/input'import { useDeleteTriggerSubscription } from '@/service/use-triggers'import { useSubscriptionList } from './use-subscription-list'diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/apikey-edit-modal.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/apikey-edit-modal.spec.tsxindex b33f0af8e9e..6e192e025cd 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/apikey-edit-modal.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/apikey-edit-modal.spec.tsx@@ -47,7 +47,7 @@ vi.mock('@/service/use-triggers', () => ({useTriggerPluginDynamicOptions: () => ({ data: [], isLoading: false }),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((args: { type: string, message: string }) => mockToast(args), {success: (message: string) => mockToast({ type: 'success', message }),error: (message: string) => mockToast({ type: 'error', message }),diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/index.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/index.spec.tsxindex 126d8e366d4..6cf58b89726 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/index.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/index.spec.tsx@@ -13,7 +13,7 @@ import { OAuthEditModal } from '../oauth-edit-modal'// ==================== Mock Setup ====================const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }), {success: (message: string) => mockToastNotify({ type: 'success', message }),error: (message: string) => mockToastNotify({ type: 'error', message }),diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/manual-edit-modal.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/manual-edit-modal.spec.tsxindex 4fa236783b6..e5fa43268af 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/manual-edit-modal.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/manual-edit-modal.spec.tsx@@ -30,7 +30,7 @@ vi.mock('@/service/use-triggers', () => ({useTriggerPluginDynamicOptions: () => ({ data: [], isLoading: false }),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((args: { type: string, message: string }) => mockToast(args), {success: (message: string) => mockToast({ type: 'success', message }),error: (message: string) => mockToast({ type: 'error', message }),diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/oauth-edit-modal.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/oauth-edit-modal.spec.tsxindex 1927ae5a43c..c860cd28188 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/oauth-edit-modal.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/__tests__/oauth-edit-modal.spec.tsx@@ -30,7 +30,7 @@ vi.mock('@/service/use-triggers', () => ({useTriggerPluginDynamicOptions: () => ({ data: [], isLoading: false }),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((args: { type: string, message: string }) => mockToast(args), {success: (message: string) => mockToast({ type: 'success', message }),error: (message: string) => mockToast({ type: 'error', message }),diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/apikey-edit-modal.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/apikey-edit-modal.tsxindex eea9cb7ff06..f191ad41a8b 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/apikey-edit-modal.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/apikey-edit-modal.tsx@@ -2,6 +2,7 @@import type { FormRefObject, FormSchema } from '@/app/components/base/form/types'import type { ParametersSchema, PluginDetail } from '@/app/components/plugins/types'import type { TriggerSubscription } from '@/app/components/workflow/block-selector/types'+import { toast } from '@langgenius/dify-ui/toast'import { isEqual } from 'es-toolkit/predicate'import { useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'@@ -9,7 +10,6 @@ import { EncryptedBottom } from '@/app/components/base/encrypted-bottom'import { BaseForm } from '@/app/components/base/form/components/base'import { FormTypeEnum } from '@/app/components/base/form/types'import Modal from '@/app/components/base/modal/modal'-import { toast } from '@/app/components/base/ui/toast'import { ReadmeEntrance } from '@/app/components/plugins/readme-panel/entrance'import { useUpdateTriggerSubscription, useVerifyTriggerSubscription } from '@/service/use-triggers'import { parsePluginErrorMessage } from '@/utils/error-parser'diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/manual-edit-modal.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/manual-edit-modal.tsxindex 333a800ffd0..3b3fa1082fb 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/manual-edit-modal.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/manual-edit-modal.tsx@@ -2,13 +2,13 @@import type { FormRefObject, FormSchema } from '@/app/components/base/form/types'import type { ParametersSchema, PluginDetail } from '@/app/components/plugins/types'import type { TriggerSubscription } from '@/app/components/workflow/block-selector/types'+import { toast } from '@langgenius/dify-ui/toast'import { isEqual } from 'es-toolkit/predicate'import { useMemo, useRef } from 'react'import { useTranslation } from 'react-i18next'import { BaseForm } from '@/app/components/base/form/components/base'import { FormTypeEnum } from '@/app/components/base/form/types'import Modal from '@/app/components/base/modal/modal'-import { toast } from '@/app/components/base/ui/toast'import { ReadmeEntrance } from '@/app/components/plugins/readme-panel/entrance'import { useUpdateTriggerSubscription } from '@/service/use-triggers'import { ReadmeShowType } from '../../../readme-panel/store'diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/oauth-edit-modal.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/oauth-edit-modal.tsxindex 3937d82a0e4..355a132bd23 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/oauth-edit-modal.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/oauth-edit-modal.tsx@@ -2,13 +2,13 @@import type { FormRefObject, FormSchema } from '@/app/components/base/form/types'import type { ParametersSchema, PluginDetail } from '@/app/components/plugins/types'import type { TriggerSubscription } from '@/app/components/workflow/block-selector/types'+import { toast } from '@langgenius/dify-ui/toast'import { isEqual } from 'es-toolkit/predicate'import { useMemo, useRef } from 'react'import { useTranslation } from 'react-i18next'import { BaseForm } from '@/app/components/base/form/components/base'import { FormTypeEnum } from '@/app/components/base/form/types'import Modal from '@/app/components/base/modal/modal'-import { toast } from '@/app/components/base/ui/toast'import { ReadmeEntrance } from '@/app/components/plugins/readme-panel/entrance'import { useUpdateTriggerSubscription } from '@/service/use-triggers'import { ReadmeShowType } from '../../../readme-panel/store'diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/log-viewer.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/log-viewer.tsxindex 1960103822f..b0b3efe8537 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/log-viewer.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/log-viewer.tsx@@ -1,6 +1,7 @@'use client'import type { TriggerLogEntity } from '@/app/components/workflow/block-selector/types'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {RiArrowDownSLine,RiArrowRightSLine,@@ -12,7 +13,6 @@ import dayjs from 'dayjs'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'import { CodeLanguage } from '@/app/components/workflow/nodes/code/types'diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/__tests__/index.spec.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/__tests__/index.spec.tsxindex 537e99d7332..168e4f1eba3 100644--- a/web/app/components/plugins/plugin-detail-panel/tool-selector/__tests__/index.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/__tests__/index.spec.tsx@@ -298,7 +298,7 @@ vi.mock('@/app/components/header/account-setting/model-provider-page/model-modal// Mock Toast - need to track notify calls for assertionsconst mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }), {success: (message: string) => mockToastNotify({ type: 'success', message }),error: (message: string) => mockToastNotify({ type: 'error', message }),diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/__tests__/reasoning-config-form.spec.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/__tests__/reasoning-config-form.spec.tsxindex b4bfd224059..beab35595c8 100644--- a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/__tests__/reasoning-config-form.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/__tests__/reasoning-config-form.spec.tsx@@ -30,8 +30,8 @@ vi.mock('@/app/components/base/select', () => ({),}))-vi.mock('@/app/components/base/switch', () => ({- default: ({ checked, onCheckedChange }: { checked: boolean, onCheckedChange: (checked: boolean) => void }) => (+vi.mock('@langgenius/dify-ui/switch', () => ({+ Switch: ({ checked, onCheckedChange }: { checked: boolean, onCheckedChange: (checked: boolean) => void }) => (<button data-testid="auto-switch" onClick={() => onCheckedChange(!checked)}>{checked ? 'on' : 'off'}</button>diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/__tests__/tool-credentials-form.spec.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/__tests__/tool-credentials-form.spec.tsxindex bd2bc0dd5c1..2d50a2d2bf6 100644--- a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/__tests__/tool-credentials-form.spec.tsx+++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/__tests__/tool-credentials-form.spec.tsx@@ -10,7 +10,7 @@ vi.mock('@langgenius/dify-ui/cn', () => ({cn: (...args: unknown[]) => args.filter(Boolean).join(' '),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(vi.fn(), {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/reasoning-config-form.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/reasoning-config-form.tsxindex 4e6be7d81ca..1c731d5eca0 100644--- a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/reasoning-config-form.tsx+++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/reasoning-config-form.tsx@@ -7,6 +7,7 @@ import type {ValueSelector,} from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import {RiArrowRightUpLine,RiBracesLine,@@ -16,7 +17,6 @@ import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import { SimpleSelect } from '@/app/components/base/select'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import { FormTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/tool-credentials-form.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/tool-credentials-form.tsxindex 90893c88ec6..64068166d09 100644--- a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/tool-credentials-form.tsx+++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/tool-credentials-form.tsx@@ -2,7 +2,9 @@import type { FC } from 'react'import type { Collection } from '@/app/components/tools/types'import type { ToolCredentialFormSchema } from '@/app/components/tools/utils/to-form-schema'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {RiArrowRightUpLine,} from '@remixicon/react'@@ -10,8 +12,6 @@ import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Form from '@/app/components/header/account-setting/model-provider-page/model-modal/Form'import { addDefaultValue, toolCredentialToFormSchemas } from '@/app/components/tools/utils/to-form-schema'import { useRenderI18nObject } from '@/hooks/use-i18n'diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/tool-item.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/tool-item.tsxindex 3ba30790af3..889243d5079 100644--- a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/tool-item.tsx+++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/tool-item.tsx@@ -1,5 +1,7 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import {RiDeleteBinLine,RiEqualizer2Line,@@ -11,10 +13,8 @@ import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import AppIcon from '@/app/components/base/app-icon'import { Group } from '@/app/components/base/icons/src/vender/other'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import { ToolTipContent } from '@/app/components/base/tooltip/content'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'import { InstallPluginButton } from '@/app/components/workflow/nodes/_base/components/install-plugin-button'import { useMCPToolAvailability } from '@/app/components/workflow/nodes/_base/components/mcp-tool-availability'diff --git a/web/app/components/plugins/plugin-item/__tests__/action.spec.tsx b/web/app/components/plugins/plugin-item/__tests__/action.spec.tsxindex 0b0d9c7fc81..b0ecc839b3c 100644--- a/web/app/components/plugins/plugin-item/__tests__/action.spec.tsx+++ b/web/app/components/plugins/plugin-item/__tests__/action.spec.tsx@@ -26,7 +26,7 @@ const {mockToastNotify: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign((message: string, options?: { type?: string }) => mockToastNotify({ type: options?.type, message }),{diff --git a/web/app/components/plugins/plugin-item/action.tsx b/web/app/components/plugins/plugin-item/action.tsxindex ed401b534f1..fe0ba932fcb 100644--- a/web/app/components/plugins/plugin-item/action.tsx+++ b/web/app/components/plugins/plugin-item/action.tsx@@ -2,11 +2,6 @@import type { FC } from 'react'import type { MetaData } from '../types'import type { PluginCategoryEnum } from '@/app/components/plugins/types'-import { RiDeleteBinLine, RiInformation2Line, RiLoopLeftLine } from '@remixicon/react'-import { useBoolean } from 'ahooks'-import * as React from 'react'-import { useCallback } from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -14,8 +9,13 @@ import {AlertDialogConfirmButton,AlertDialogContent,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/alert-dialog'+import { toast } from '@langgenius/dify-ui/toast'+import { RiDeleteBinLine, RiInformation2Line, RiLoopLeftLine } from '@remixicon/react'+import { useBoolean } from 'ahooks'+import * as React from 'react'+import { useCallback } from 'react'+import { useTranslation } from 'react-i18next'import { useModalContext } from '@/context/modal-context'import { uninstallPlugin } from '@/service/plugins'import { useInvalidateInstalledPluginList } from '@/service/use-plugins'diff --git a/web/app/components/plugins/plugin-mutation-model/index.tsx b/web/app/components/plugins/plugin-mutation-model/index.tsxindex 4e8478f8adc..96a60fd938f 100644--- a/web/app/components/plugins/plugin-mutation-model/index.tsx+++ b/web/app/components/plugins/plugin-mutation-model/index.tsx@@ -1,10 +1,10 @@import type { UseMutationResult } from '@tanstack/react-query'import type { FC, ReactNode } from 'react'import type { Plugin } from '../types'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { memo } from 'react'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import Card from '@/app/components/plugins/card'type Props = {diff --git a/web/app/components/plugins/plugin-page/__tests__/debug-info.spec.tsx b/web/app/components/plugins/plugin-page/__tests__/debug-info.spec.tsxindex 2af44ecf97c..65a36f40091 100644--- a/web/app/components/plugins/plugin-page/__tests__/debug-info.spec.tsx+++ b/web/app/components/plugins/plugin-page/__tests__/debug-info.spec.tsx@@ -15,7 +15,7 @@ vi.mock('@/service/use-plugins', () => ({useDebugKey: () => mockDebugKey,}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children }: { children: React.ReactNode }) => <button data-testid="debug-button">{children}</button>,}))diff --git a/web/app/components/plugins/plugin-page/__tests__/install-plugin-dropdown.spec.tsx b/web/app/components/plugins/plugin-page/__tests__/install-plugin-dropdown.spec.tsxindex 1f249b16c62..2dd884e18b5 100644--- a/web/app/components/plugins/plugin-page/__tests__/install-plugin-dropdown.spec.tsx+++ b/web/app/components/plugins/plugin-page/__tests__/install-plugin-dropdown.spec.tsx@@ -35,13 +35,13 @@ vi.mock('@/app/components/base/icons/src/vender/solid/mediaAndDevices', () => ({MagicBox: () => <span data-testid="magic-box-icon">magic</span>,}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick, className, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>) => (<button type="button" data-testid="button-content" className={className} onClick={onClick} {...props}>{children}</button>),}))-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const React = await import('react')const DropdownMenuContext = React.createContext<{ isOpen: boolean, setOpen: (open: boolean) => void } | null>(null)diff --git a/web/app/components/plugins/plugin-page/__tests__/use-reference-setting.spec.ts b/web/app/components/plugins/plugin-page/__tests__/use-reference-setting.spec.tsindex c3c415bb4b9..efb31b5afb1 100644--- a/web/app/components/plugins/plugin-page/__tests__/use-reference-setting.spec.ts+++ b/web/app/components/plugins/plugin-page/__tests__/use-reference-setting.spec.ts@@ -1,7 +1,7 @@+// Import mocks for assertions+import { toast } from '@langgenius/dify-ui/toast'import { renderHook, waitFor } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'-// Import mocks for assertions-import { toast } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { useGlobalPublicStore } from '@/context/global-public-context'diff --git a/web/app/components/plugins/plugin-page/debug-info.tsx b/web/app/components/plugins/plugin-page/debug-info.tsxindex 4b3590f15c0..4e02fdc2be6 100644--- a/web/app/components/plugins/plugin-page/debug-info.tsx+++ b/web/app/components/plugins/plugin-page/debug-info.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import {RiArrowRightUpLine,RiBugLine,@@ -7,7 +8,6 @@ import {import * as React from 'react'import { useTranslation } from 'react-i18next'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import { useDocLink } from '@/context/i18n'import { useDebugKey } from '@/service/use-plugins'import KeyValueItem from '../base/key-value-item'diff --git a/web/app/components/plugins/plugin-page/empty/index.tsx b/web/app/components/plugins/plugin-page/empty/index.tsxindex 5141519e35d..e90918b4abd 100644--- a/web/app/components/plugins/plugin-page/empty/index.tsx+++ b/web/app/components/plugins/plugin-page/empty/index.tsx@@ -1,4 +1,5 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { noop } from 'es-toolkit/function'import * as React from 'react'import { useEffect, useMemo, useRef, useState } from 'react'@@ -7,7 +8,6 @@ import { Group } from '@/app/components/base/icons/src/vender/other'import { FileZip } from '@/app/components/base/icons/src/vender/solid/files'import { Github } from '@/app/components/base/icons/src/vender/solid/general'import { MagicBox } from '@/app/components/base/icons/src/vender/solid/mediaAndDevices'-import { Button } from '@/app/components/base/ui/button'import InstallFromGitHub from '@/app/components/plugins/install-plugin/install-from-github'import InstallFromLocalPackage from '@/app/components/plugins/install-plugin/install-from-local-package'import { SUPPORT_INSTALL_LOCAL_FILE_EXTENSIONS } from '@/config'diff --git a/web/app/components/plugins/plugin-page/index.tsx b/web/app/components/plugins/plugin-page/index.tsxindex 05a6dd26e3c..f80d37189a9 100644--- a/web/app/components/plugins/plugin-page/index.tsx+++ b/web/app/components/plugins/plugin-page/index.tsx@@ -2,6 +2,7 @@import type { Dependency, PluginDeclaration, PluginManifestInMarket } from '../types'import type { PluginPageTab } from './context'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiBookOpenLine,@@ -14,7 +15,6 @@ import { useEffect, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import TabSlider from '@/app/components/base/tab-slider'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import ReferenceSettingModal from '@/app/components/plugins/reference-setting-modal'import { MARKETPLACE_API_PREFIX, SUPPORT_INSTALL_LOCAL_FILE_EXTENSIONS } from '@/config'import { useGlobalPublicStore } from '@/context/global-public-context'diff --git a/web/app/components/plugins/plugin-page/install-plugin-dropdown.tsx b/web/app/components/plugins/plugin-page/install-plugin-dropdown.tsxindex 9b98d16410b..dee3dc17bb6 100644--- a/web/app/components/plugins/plugin-page/install-plugin-dropdown.tsx+++ b/web/app/components/plugins/plugin-page/install-plugin-dropdown.tsx@@ -1,6 +1,13 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import { RiAddLine, RiArrowDownSLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import { useEffect, useRef, useState } from 'react'@@ -8,13 +15,6 @@ import { useTranslation } from 'react-i18next'import { FileZip } from '@/app/components/base/icons/src/vender/solid/files'import { Github } from '@/app/components/base/icons/src/vender/solid/general'import { MagicBox } from '@/app/components/base/icons/src/vender/solid/mediaAndDevices'-import { Button } from '@/app/components/base/ui/button'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import InstallFromGitHub from '@/app/components/plugins/install-plugin/install-from-github'import InstallFromLocalPackage from '@/app/components/plugins/install-plugin/install-from-local-package'import { SUPPORT_INSTALL_LOCAL_FILE_EXTENSIONS } from '@/config'diff --git a/web/app/components/plugins/plugin-page/plugin-tasks/components/error-plugin-item.tsx b/web/app/components/plugins/plugin-page/plugin-tasks/components/error-plugin-item.tsxindex 0129c65ee2e..ab17dd202bb 100644--- a/web/app/components/plugins/plugin-page/plugin-tasks/components/error-plugin-item.tsx+++ b/web/app/components/plugins/plugin-page/plugin-tasks/components/error-plugin-item.tsx@@ -1,9 +1,9 @@import type { FC } from 'react'import type { Plugin, PluginStatus } from '@/app/components/plugins/types'import type { Locale } from '@/i18n-config'+import { Button } from '@langgenius/dify-ui/button'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import InstallFromMarketplace from '@/app/components/plugins/install-plugin/install-from-marketplace'import { PluginSource } from '@/app/components/plugins/types'import { fetchPluginInfoFromMarketPlace } from '@/service/plugins'diff --git a/web/app/components/plugins/plugin-page/plugin-tasks/components/plugin-task-list.tsx b/web/app/components/plugins/plugin-page/plugin-tasks/components/plugin-task-list.tsxindex e0dcc5b6f83..24fcf85cdea 100644--- a/web/app/components/plugins/plugin-page/plugin-tasks/components/plugin-task-list.tsx+++ b/web/app/components/plugins/plugin-page/plugin-tasks/components/plugin-task-list.tsx@@ -1,7 +1,7 @@import type { FC } from 'react'import type { PluginStatus } from '@/app/components/plugins/types'+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { useGetLanguage } from '@/context/i18n'import ErrorPluginItem from './error-plugin-item'import PluginSection from './plugin-section'diff --git a/web/app/components/plugins/plugin-page/plugin-tasks/index.tsx b/web/app/components/plugins/plugin-page/plugin-tasks/index.tsxindex 9a39b43bf65..7603cae33d0 100644--- a/web/app/components/plugins/plugin-page/plugin-tasks/index.tsx+++ b/web/app/components/plugins/plugin-page/plugin-tasks/index.tsx@@ -1,14 +1,14 @@+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import {useCallback,useMemo,useState,} from 'react'import { useTranslation } from 'react-i18next'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import useGetIcon from '@/app/components/plugins/install-plugin/base/use-get-icon'import PluginTaskList from './components/plugin-task-list'import TaskStatusIndicator from './components/task-status-indicator'diff --git a/web/app/components/plugins/plugin-page/plugins-panel.tsx b/web/app/components/plugins/plugin-page/plugins-panel.tsxindex 142c9329cc3..a824d55ddaa 100644--- a/web/app/components/plugins/plugin-page/plugins-panel.tsx+++ b/web/app/components/plugins/plugin-page/plugins-panel.tsx@@ -1,11 +1,11 @@'use client'import type { PluginDetail } from '../types'import type { FilterState } from './filter-management'+import { Button } from '@langgenius/dify-ui/button'import { useDebounceFn } from 'ahooks'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'import PluginDetailPanel from '@/app/components/plugins/plugin-detail-panel'import { useGetLanguage } from '@/context/i18n'import { renderI18nObject } from '@/i18n-config'diff --git a/web/app/components/plugins/plugin-page/use-reference-setting.ts b/web/app/components/plugins/plugin-page/use-reference-setting.tsindex 0a0e925207f..b688bdc11e6 100644--- a/web/app/components/plugins/plugin-page/use-reference-setting.ts+++ b/web/app/components/plugins/plugin-page/use-reference-setting.ts@@ -1,6 +1,6 @@+import { toast } from '@langgenius/dify-ui/toast'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { useGlobalPublicStore } from '@/context/global-public-context'import { useInvalidateReferenceSettings, useMutationReferenceSettings, useReferenceSettings } from '@/service/use-plugins'diff --git a/web/app/components/plugins/provider-card.tsx b/web/app/components/plugins/provider-card.tsxindex 7f076997714..06b611b3559 100644--- a/web/app/components/plugins/provider-card.tsx+++ b/web/app/components/plugins/provider-card.tsx@@ -1,6 +1,7 @@'use client'import type { FC } from 'react'import type { Plugin } from './types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowRightUpLine } from '@remixicon/react'import { useBoolean } from 'ahooks'@@ -8,7 +9,6 @@ import { useTheme } from 'next-themes'import * as React from 'react'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import InstallFromMarketplace from '@/app/components/plugins/install-plugin/install-from-marketplace'import { getPluginLinkInMarketplace } from '@/app/components/plugins/marketplace/utils'import { useLocale } from '@/context/i18n'diff --git a/web/app/components/plugins/reference-setting-modal/auto-update-setting/__tests__/plugins-picker.spec.tsx b/web/app/components/plugins/reference-setting-modal/auto-update-setting/__tests__/plugins-picker.spec.tsxindex 299eecce54c..99d7a5fdc58 100644--- a/web/app/components/plugins/reference-setting-modal/auto-update-setting/__tests__/plugins-picker.spec.tsx+++ b/web/app/components/plugins/reference-setting-modal/auto-update-setting/__tests__/plugins-picker.spec.tsx@@ -5,7 +5,7 @@ import { AUTO_UPDATE_MODE } from '../types'const mockToolPicker = vi.fn()-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({children,}: {diff --git a/web/app/components/plugins/reference-setting-modal/auto-update-setting/__tests__/strategy-picker.spec.tsx b/web/app/components/plugins/reference-setting-modal/auto-update-setting/__tests__/strategy-picker.spec.tsxindex e1e72fbde2d..5be10ff146b 100644--- a/web/app/components/plugins/reference-setting-modal/auto-update-setting/__tests__/strategy-picker.spec.tsx+++ b/web/app/components/plugins/reference-setting-modal/auto-update-setting/__tests__/strategy-picker.spec.tsx@@ -5,7 +5,7 @@ import { AUTO_UPDATE_STRATEGY } from '../types'let portalOpen = false-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({children,}: {diff --git a/web/app/components/plugins/reference-setting-modal/auto-update-setting/plugins-picker.tsx b/web/app/components/plugins/reference-setting-modal/auto-update-setting/plugins-picker.tsxindex c0dbbea5c68..1bb4caeb3f4 100644--- a/web/app/components/plugins/reference-setting-modal/auto-update-setting/plugins-picker.tsx+++ b/web/app/components/plugins/reference-setting-modal/auto-update-setting/plugins-picker.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { RiAddLine } from '@remixicon/react'import { useBoolean } from 'ahooks'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import NoPluginSelected from './no-plugin-selected'import PluginsSelected from './plugins-selected'import ToolPicker from './tool-picker'diff --git a/web/app/components/plugins/reference-setting-modal/auto-update-setting/strategy-picker.tsx b/web/app/components/plugins/reference-setting-modal/auto-update-setting/strategy-picker.tsxindex 0f85b95e3c4..22bfa6a30be 100644--- a/web/app/components/plugins/reference-setting-modal/auto-update-setting/strategy-picker.tsx+++ b/web/app/components/plugins/reference-setting-modal/auto-update-setting/strategy-picker.tsx@@ -1,3 +1,4 @@+import { Button } from '@langgenius/dify-ui/button'import {RiArrowDownSLine,RiCheckLine,@@ -9,7 +10,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import { AUTO_UPDATE_STRATEGY } from './types'const i18nPrefix = 'autoUpdate.strategy'diff --git a/web/app/components/plugins/reference-setting-modal/index.tsx b/web/app/components/plugins/reference-setting-modal/index.tsxindex bbf19d8c0a1..061777e38b8 100644--- a/web/app/components/plugins/reference-setting-modal/index.tsx+++ b/web/app/components/plugins/reference-setting-modal/index.tsx@@ -2,11 +2,11 @@import type { FC } from 'react'import type { AutoUpdateConfig } from './auto-update-setting/types'import type { Permissions, ReferenceSetting } from '@/app/components/plugins/types'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import { PermissionType } from '@/app/components/plugins/types'import OptionCard from '@/app/components/workflow/nodes/_base/components/option-card'import { useGlobalPublicStore } from '@/context/global-public-context'diff --git a/web/app/components/plugins/update-plugin/__tests__/from-market-place.spec.tsx b/web/app/components/plugins/update-plugin/__tests__/from-market-place.spec.tsxindex 9d9ad77106e..3cc3ef78d1d 100644--- a/web/app/components/plugins/update-plugin/__tests__/from-market-place.spec.tsx+++ b/web/app/components/plugins/update-plugin/__tests__/from-market-place.spec.tsx@@ -22,7 +22,7 @@ const {mockToastError: vi.fn(),}))-vi.mock('@/app/components/base/ui/dialog', () => ({+vi.mock('@langgenius/dify-ui/dialog', () => ({Dialog: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,DialogContent: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,DialogTitle: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,@@ -37,7 +37,7 @@ vi.mock('@/app/components/base/badge/index', () => ({default: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({children,onClick,@@ -49,7 +49,7 @@ vi.mock('@/app/components/base/ui/button', () => ({}) => <button disabled={disabled} onClick={onClick}>{children}</button>,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,},diff --git a/web/app/components/plugins/update-plugin/__tests__/index.spec.tsx b/web/app/components/plugins/update-plugin/__tests__/index.spec.tsxindex cdd74623429..d0492696ca7 100644--- a/web/app/components/plugins/update-plugin/__tests__/index.spec.tsx+++ b/web/app/components/plugins/update-plugin/__tests__/index.spec.tsx@@ -4,11 +4,11 @@ import type {UpdateFromMarketPlacePayload,UpdatePluginModalType,} from '../../types'+import { toast } from '@langgenius/dify-ui/toast'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import { toast } from '@/app/components/base/ui/toast'import { PluginCategoryEnum, PluginSource, TaskStatus } from '../../types'import DowngradeWarningModal from '../downgrade-warning'import FromGitHub from '../from-github'diff --git a/web/app/components/plugins/update-plugin/downgrade-warning.tsx b/web/app/components/plugins/update-plugin/downgrade-warning.tsxindex da53ebfb12b..801c8ede515 100644--- a/web/app/components/plugins/update-plugin/downgrade-warning.tsx+++ b/web/app/components/plugins/update-plugin/downgrade-warning.tsx@@ -1,5 +1,5 @@+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'const i18nPrefix = 'autoUpdate.pluginDowngradeWarning'diff --git a/web/app/components/plugins/update-plugin/from-market-place.tsx b/web/app/components/plugins/update-plugin/from-market-place.tsxindex bde50518081..52484e65aa7 100644--- a/web/app/components/plugins/update-plugin/from-market-place.tsx+++ b/web/app/components/plugins/update-plugin/from-market-place.tsx@@ -1,19 +1,19 @@'use client'import type { FC } from 'react'import type { UpdateFromMarketPlacePayload } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import { useCallback, useEffect, useMemo, useState } from 'react'-import { useTranslation } from 'react-i18next'-import Badge, { BadgeState } from '@/app/components/base/badge/index'-import { Button } from '@/app/components/base/ui/button'import {Dialog,DialogCloseButton,DialogContent,DialogTitle,-} from '@/app/components/base/ui/dialog'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/dialog'+import { toast } from '@langgenius/dify-ui/toast'+import * as React from 'react'+import { useCallback, useEffect, useMemo, useState } from 'react'+import { useTranslation } from 'react-i18next'+import Badge, { BadgeState } from '@/app/components/base/badge/index'import Card from '@/app/components/plugins/card'import checkTaskStatus from '@/app/components/plugins/install-plugin/base/check-task-status'import { pluginManifestToCardPluginProps } from '@/app/components/plugins/install-plugin/utils'diff --git a/web/app/components/plugins/update-plugin/plugin-version-picker.tsx b/web/app/components/plugins/update-plugin/plugin-version-picker.tsxindex d590f0c9eb8..a76fd085baf 100644--- a/web/app/components/plugins/update-plugin/plugin-version-picker.tsx+++ b/web/app/components/plugins/update-plugin/plugin-version-picker.tsx@@ -1,16 +1,16 @@'use client'+import type { Placement } from '@langgenius/dify-ui/popover'import type { FC } from 'react'-import type { Placement } from '@/app/components/base/ui/placement'import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import { useCallback } from 'react'-import { useTranslation } from 'react-i18next'-import Badge from '@/app/components/base/badge'import {Popover,PopoverContent,PopoverTrigger,-} from '@/app/components/base/ui/popover'+} from '@langgenius/dify-ui/popover'+import * as React from 'react'+import { useCallback } from 'react'+import { useTranslation } from 'react-i18next'+import Badge from '@/app/components/base/badge'import useTimestamp from '@/hooks/use-timestamp'import { useVersionListOfPlugin } from '@/service/use-plugins'import { isEarlierThanVersion } from '@/utils/semver'diff --git a/web/app/components/rag-pipeline/components/__tests__/conversion.spec.tsx b/web/app/components/rag-pipeline/components/__tests__/conversion.spec.tsxindex 967e697813c..cb11e5baf44 100644--- a/web/app/components/rag-pipeline/components/__tests__/conversion.spec.tsx+++ b/web/app/components/rag-pipeline/components/__tests__/conversion.spec.tsx@@ -37,11 +37,11 @@ const { mockToast } = vi.hoisted(() => {return { mockToast }})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: mockToast,}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick, ...props }: Record<string, unknown>) => (<button onClick={onClick as () => void} {...props}>{children as string}</button>),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.tsxindex f9eb858b30e..7a99b7ab903 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@@ -22,7 +22,7 @@ vi.mock('@/app/components/base/modal', () => ({isShow ? <div data-testid="modal">{children}</div> : null,}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick, disabled, ...props }: Record<string, unknown>) => (<button onClick={onClick as () => void} disabled={disabled as boolean} {...props}>{children as string}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.tsxindex 0fe856b8d9e..d31a06f4213 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@@ -26,7 +26,7 @@ const toastMocks = vi.hoisted(() => {}})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.api, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),@@ -100,7 +100,7 @@ vi.mock('@/app/components/app/create-from-dsl-modal/uploader', () => ({),}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick, disabled, className, variant, loading }: {children: React.ReactNodeonClick?: () => voiddiff --git a/web/app/components/rag-pipeline/components/conversion.tsx b/web/app/components/rag-pipeline/components/conversion.tsxindex 27f25f6e2fd..d90c0c65d68 100644--- a/web/app/components/rag-pipeline/components/conversion.tsx+++ b/web/app/components/rag-pipeline/components/conversion.tsx@@ -1,6 +1,3 @@-import * as React from 'react'-import { useCallback, useState } from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -9,9 +6,12 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'+import * as React from 'react'+import { useCallback, useState } from 'react'+import { useTranslation } from 'react-i18next'import { useParams } from '@/next/navigation'import { datasetDetailQueryKeyPrefix } from '@/service/knowledge/use-dataset'import { useInvalid } from '@/service/use-base'diff --git a/web/app/components/rag-pipeline/components/panel/input-field/editor/form/__tests__/index.spec.tsx b/web/app/components/rag-pipeline/components/panel/input-field/editor/form/__tests__/index.spec.tsxindex 7aa5ccbf908..3c029f43766 100644--- a/web/app/components/rag-pipeline/components/panel/input-field/editor/form/__tests__/index.spec.tsx+++ b/web/app/components/rag-pipeline/components/panel/input-field/editor/form/__tests__/index.spec.tsx@@ -1,8 +1,8 @@import type { FormData, InputFieldFormProps } from '../types'+import { toast } from '@langgenius/dify-ui/toast'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { fireEvent, render, renderHook, screen, waitFor } from '@testing-library/react'import * as React from 'react'-import { toast } from '@/app/components/base/ui/toast'import { PipelineInputVarType } from '@/models/pipeline'import { useConfigurations, useHiddenConfigurations, useHiddenFieldNames } from '../hooks'import InputFieldForm from '../index'diff --git a/web/app/components/rag-pipeline/components/panel/input-field/editor/form/index.tsx b/web/app/components/rag-pipeline/components/panel/input-field/editor/form/index.tsxindex 3854b6561af..19e5d28e63e 100644--- a/web/app/components/rag-pipeline/components/panel/input-field/editor/form/index.tsx+++ b/web/app/components/rag-pipeline/components/panel/input-field/editor/form/index.tsx@@ -1,12 +1,12 @@import type { FormData, InputFieldFormProps } from './types'import type { MoreInfo } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import { useFileSizeLimit } from '@/app/components/base/file-uploader/hooks'import { useAppForm } from '@/app/components/base/form'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { ChangeType } from '@/app/components/workflow/types'import { useFileUploadConfig } from '@/service/use-common'import HiddenFields from './hidden-fields'diff --git a/web/app/components/rag-pipeline/components/panel/input-field/field-list/__tests__/hooks.spec.ts b/web/app/components/rag-pipeline/components/panel/input-field/field-list/__tests__/hooks.spec.tsindex 376751e58f5..6dfc3422f34 100644--- a/web/app/components/rag-pipeline/components/panel/input-field/field-list/__tests__/hooks.spec.ts+++ b/web/app/components/rag-pipeline/components/panel/input-field/field-list/__tests__/hooks.spec.ts@@ -23,7 +23,7 @@ vi.mock('../../../../../hooks/use-pipeline', () => ({}))const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: (...args: unknown[]) => mockToastNotify(...args),},diff --git a/web/app/components/rag-pipeline/components/panel/input-field/field-list/__tests__/index.spec.tsx b/web/app/components/rag-pipeline/components/panel/input-field/field-list/__tests__/index.spec.tsxindex b2dbc35601a..84c700e2730 100644--- a/web/app/components/rag-pipeline/components/panel/input-field/field-list/__tests__/index.spec.tsx+++ b/web/app/components/rag-pipeline/components/panel/input-field/field-list/__tests__/index.spec.tsx@@ -1,8 +1,8 @@import type { SortableItem } from '../types'import type { InputVar } from '@/models/pipeline'+import { toast } from '@langgenius/dify-ui/toast'import { act, fireEvent, render, renderHook, screen, waitFor } from '@testing-library/react'import * as React from 'react'-import { toast } from '@/app/components/base/ui/toast'import { PipelineInputVarType } from '@/models/pipeline'import FieldItem from '../field-item'import FieldListContainer from '../field-list-container'diff --git a/web/app/components/rag-pipeline/components/panel/input-field/field-list/hooks.ts b/web/app/components/rag-pipeline/components/panel/input-field/field-list/hooks.tsindex 1301074d51e..a9eb23c0696 100644--- a/web/app/components/rag-pipeline/components/panel/input-field/field-list/hooks.ts+++ b/web/app/components/rag-pipeline/components/panel/input-field/field-list/hooks.ts@@ -1,11 +1,11 @@import type { SortableItem } from './types'import type { MoreInfo, ValueSelector } from '@/app/components/workflow/types'import type { InputVar } from '@/models/pipeline'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import { produce } from 'immer'import { useCallback, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useInputFieldPanel } from '@/app/components/rag-pipeline/hooks'import { ChangeType } from '@/app/components/workflow/types'import { usePipeline } from '../../../../hooks/use-pipeline'diff --git a/web/app/components/rag-pipeline/components/panel/input-field/index.tsx b/web/app/components/rag-pipeline/components/panel/input-field/index.tsxindex 2be80510036..12eed4ece47 100644--- a/web/app/components/rag-pipeline/components/panel/input-field/index.tsx+++ b/web/app/components/rag-pipeline/components/panel/input-field/index.tsx@@ -1,6 +1,7 @@import type { DataSourceNodeType } from '@/app/components/workflow/nodes/data-source/types'import type { Node } from '@/app/components/workflow/types'import type { InputVar, RAGPipelineVariables } from '@/models/pipeline'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiCloseLine, RiEyeLine } from '@remixicon/react'import {@@ -13,7 +14,6 @@ import { useTranslation } from 'react-i18next'import { useNodes } from 'reactflow'import Divider from '@/app/components/base/divider'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import { useInputFieldPanel } from '@/app/components/rag-pipeline/hooks'import { useNodesSyncDraft } from '@/app/components/workflow/hooks'import { useStore } from '@/app/components/workflow/store'diff --git a/web/app/components/rag-pipeline/components/panel/test-run/preparation/actions/index.tsx b/web/app/components/rag-pipeline/components/panel/test-run/preparation/actions/index.tsxindex 17218f732b1..14587424f17 100644--- a/web/app/components/rag-pipeline/components/panel/test-run/preparation/actions/index.tsx+++ b/web/app/components/rag-pipeline/components/panel/test-run/preparation/actions/index.tsx@@ -1,6 +1,6 @@+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type ActionsProps = {disabled?: booleandiff --git a/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/__tests__/index.spec.tsx b/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/__tests__/index.spec.tsxindex 66d6f84fe7b..3eae324ef47 100644--- a/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/__tests__/index.spec.tsx+++ b/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/__tests__/index.spec.tsx@@ -56,7 +56,7 @@ vi.mock('@/app/components/base/form/form-scenarios/base/utils', () => ({const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (message: string) => mockToastNotify({ type: 'error', message }),},diff --git a/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/__tests__/options.spec.tsx b/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/__tests__/options.spec.tsxindex fcfa305bb34..5ec38ba6e5d 100644--- a/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/__tests__/options.spec.tsx+++ b/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/__tests__/options.spec.tsx@@ -20,7 +20,7 @@ const {}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,},diff --git a/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/actions.tsx b/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/actions.tsxindex 40cdb7aa5c4..062b7a3944f 100644--- a/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/actions.tsx+++ b/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/actions.tsx@@ -1,7 +1,7 @@import type { CustomActionsProps } from '@/app/components/base/form/components/form/actions'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { useStore } from '@/app/components/workflow/store'import { WorkflowRunningStatus } from '@/app/components/workflow/types'diff --git a/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/options.tsx b/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/options.tsxindex 7e6baa42b1f..6a77c9b355f 100644--- a/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/options.tsx+++ b/web/app/components/rag-pipeline/components/panel/test-run/preparation/document-processing/options.tsx@@ -1,9 +1,9 @@import type { ZodSchema } from 'zod'import type { CustomActionsProps } from '@/app/components/base/form/components/form/actions'import type { BaseConfiguration } from '@/app/components/base/form/form-scenarios/base/types'+import { toast } from '@langgenius/dify-ui/toast'import { useAppForm } from '@/app/components/base/form'import BaseField from '@/app/components/base/form/form-scenarios/base/field'-import { toast } from '@/app/components/base/ui/toast'type OptionsProps = {initialData: Record<string, any>diff --git a/web/app/components/rag-pipeline/components/panel/test-run/result/result-preview/index.tsx b/web/app/components/rag-pipeline/components/panel/test-run/result/result-preview/index.tsxindex b5688befbb6..5e29c4795c7 100644--- a/web/app/components/rag-pipeline/components/panel/test-run/result/result-preview/index.tsx+++ b/web/app/components/rag-pipeline/components/panel/test-run/result/result-preview/index.tsx@@ -1,8 +1,8 @@+import { Button } from '@langgenius/dify-ui/button'import { RiLoader2Line } from '@remixicon/react'import * as React from 'react'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { RAG_PIPELINE_PREVIEW_CHUNK_NUM } from '@/config'import { ChunkCardList } from '../../../../chunk-card-list'import { formatPreviewChunks } from './utils'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.tsxindex 67f6223a219..faa71f0f4e8 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@@ -1,6 +1,7 @@'use client'import type { AppIconSelection } from '@/app/components/base/app-icon-picker'import type { IconInfo } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import { RiCloseLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import { useCallback, useState } from 'react'@@ -10,7 +11,6 @@ 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 { Button } from '@/app/components/base/ui/button'import { useWorkflowStore } from '@/app/components/workflow/store'type PublishAsKnowledgePipelineModalProps = {diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-header/__tests__/index.spec.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-header/__tests__/index.spec.tsxindex b9c0de5f50e..dda765b48f8 100644--- a/web/app/components/rag-pipeline/components/rag-pipeline-header/__tests__/index.spec.tsx+++ b/web/app/components/rag-pipeline/components/rag-pipeline-header/__tests__/index.spec.tsx@@ -161,7 +161,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-header/input-field-button.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-header/input-field-button.tsxindex 55674b02428..57f4b55cfc7 100644--- a/web/app/components/rag-pipeline/components/rag-pipeline-header/input-field-button.tsx+++ b/web/app/components/rag-pipeline/components/rag-pipeline-header/input-field-button.tsx@@ -1,7 +1,7 @@+import { Button } from '@langgenius/dify-ui/button'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { InputField } from '@/app/components/base/icons/src/vender/pipeline'-import { Button } from '@/app/components/base/ui/button'import { useStore } from '@/app/components/workflow/store'const InputFieldButton = () => {diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/__tests__/index.spec.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/__tests__/index.spec.tsxindex 64a12edfecd..abb334b393a 100644--- a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/__tests__/index.spec.tsx+++ b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/__tests__/index.spec.tsx@@ -79,7 +79,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/__tests__/popup.spec.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/__tests__/popup.spec.tsxindex 77d264ec7ac..103ee532109 100644--- a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/__tests__/popup.spec.tsx+++ b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/__tests__/popup.spec.tsx@@ -12,7 +12,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),@@ -74,7 +74,7 @@ vi.mock('@/app/components/workflow/store', () => ({}),}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, onClick, disabled, variant, className }: Record<string, unknown>) => (<buttononClick={onClick as () => void}diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/index.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/index.tsxindex 8f7e3c98e5d..3ea9aa0c1fd 100644--- a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/index.tsx+++ b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/index.tsx@@ -1,3 +1,4 @@+import { Button } from '@langgenius/dify-ui/button'import { RiArrowDownSLine } from '@remixicon/react'import {memo,@@ -10,7 +11,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import { useNodesSyncDraft } from '@/app/components/workflow/hooks'import Popup from './popup'diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsxindex d34971ddcc1..9cb026dffe9 100644--- a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx+++ b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx@@ -1,6 +1,17 @@import type { IconInfo } from '@/models/datasets'import type { PublishWorkflowParams } from '@/types/workflow'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowRightUpLine, RiHammerLine, RiPlayCircleLine, RiTerminalBoxLine } from '@remixicon/react'import { useBoolean, useKeyPress } from 'ahooks'import { memo, useCallback, useState } from 'react'@@ -9,17 +20,6 @@ import { trackEvent } from '@/app/components/base/amplitude'import Divider from '@/app/components/base/divider'import { SparklesSoft } from '@/app/components/base/icons/src/public/common'import PremiumBadge from '@/app/components/base/premium-badge'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useChecklistBeforePublish } from '@/app/components/workflow/hooks'import ShortcutsName from '@/app/components/workflow/shortcuts-name'import { useStore, useWorkflowStore } from '@/app/components/workflow/store'diff --git a/web/app/components/rag-pipeline/components/update-dsl-modal.tsx b/web/app/components/rag-pipeline/components/update-dsl-modal.tsxindex cc5d8cd7ddc..742c29a6da2 100644--- a/web/app/components/rag-pipeline/components/update-dsl-modal.tsx+++ b/web/app/components/rag-pipeline/components/update-dsl-modal.tsx@@ -1,5 +1,6 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import {RiAlertFill,RiCloseLine,@@ -9,7 +10,6 @@ import { memo } from 'react'import { useTranslation } from 'react-i18next'import Uploader from '@/app/components/app/create-from-dsl-modal/uploader'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import { useUpdateDSLModal } from '../hooks/use-update-dsl-modal'import VersionMismatchModal from './version-mismatch-modal'diff --git a/web/app/components/rag-pipeline/components/version-mismatch-modal.tsx b/web/app/components/rag-pipeline/components/version-mismatch-modal.tsxindex 5277a11ca7f..dc50e972e97 100644--- a/web/app/components/rag-pipeline/components/version-mismatch-modal.tsx+++ b/web/app/components/rag-pipeline/components/version-mismatch-modal.tsx@@ -1,7 +1,7 @@import type { MouseEventHandler } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'type VersionMismatchModalProps = {isShow: booleandiff --git a/web/app/components/rag-pipeline/hooks/__tests__/index.spec.ts b/web/app/components/rag-pipeline/hooks/__tests__/index.spec.tsindex a83c44faf4e..d8fa830927d 100644--- a/web/app/components/rag-pipeline/hooks/__tests__/index.spec.ts+++ b/web/app/components/rag-pipeline/hooks/__tests__/index.spec.ts@@ -33,7 +33,7 @@ vi.mock('@/app/components/workflow/store', () => ({useWorkflowStore: () => mockUseWorkflowStore(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: toastMocks.error,},diff --git a/web/app/components/rag-pipeline/hooks/__tests__/use-DSL.spec.ts b/web/app/components/rag-pipeline/hooks/__tests__/use-DSL.spec.tsindex 27290322be6..2d5804fcee1 100644--- a/web/app/components/rag-pipeline/hooks/__tests__/use-DSL.spec.ts+++ b/web/app/components/rag-pipeline/hooks/__tests__/use-DSL.spec.ts@@ -9,7 +9,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),diff --git a/web/app/components/rag-pipeline/hooks/__tests__/use-update-dsl-modal.spec.ts b/web/app/components/rag-pipeline/hooks/__tests__/use-update-dsl-modal.spec.tsindex 1b7f9a76369..2449bcc6056 100644--- a/web/app/components/rag-pipeline/hooks/__tests__/use-update-dsl-modal.spec.ts+++ b/web/app/components/rag-pipeline/hooks/__tests__/use-update-dsl-modal.spec.ts@@ -24,7 +24,7 @@ const toastMocks = vi.hoisted(() => {}})-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.api, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),diff --git a/web/app/components/rag-pipeline/hooks/use-DSL.ts b/web/app/components/rag-pipeline/hooks/use-DSL.tsindex 77d56984920..12bcbe041b0 100644--- a/web/app/components/rag-pipeline/hooks/use-DSL.ts+++ b/web/app/components/rag-pipeline/hooks/use-DSL.ts@@ -1,6 +1,6 @@+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { DSL_EXPORT_CHECK } from '@/app/components/workflow/constants'import { useWorkflowStore } from '@/app/components/workflow/store'import { useEventEmitterContextContext } from '@/context/event-emitter'diff --git a/web/app/components/rag-pipeline/hooks/use-update-dsl-modal.ts b/web/app/components/rag-pipeline/hooks/use-update-dsl-modal.tsindex f8fd39b5d82..7271279996b 100644--- a/web/app/components/rag-pipeline/hooks/use-update-dsl-modal.ts+++ b/web/app/components/rag-pipeline/hooks/use-update-dsl-modal.ts@@ -1,7 +1,7 @@import type { MouseEventHandler } from 'react'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { WORKFLOW_DATA_UPDATE } from '@/app/components/workflow/constants'import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks'import { useWorkflowStore } from '@/app/components/workflow/store'diff --git a/web/app/components/share/text-generation/hooks/__tests__/use-text-generation-app-state.spec.ts b/web/app/components/share/text-generation/hooks/__tests__/use-text-generation-app-state.spec.tsindex 41b1c379b90..34636472a7b 100644--- a/web/app/components/share/text-generation/hooks/__tests__/use-text-generation-app-state.spec.ts+++ b/web/app/components/share/text-generation/hooks/__tests__/use-text-generation-app-state.spec.ts@@ -20,7 +20,7 @@ const {useDocumentTitleMock: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: notifyMock,},diff --git a/web/app/components/share/text-generation/hooks/use-text-generation-app-state.ts b/web/app/components/share/text-generation/hooks/use-text-generation-app-state.tsindex a4edf405218..8cca8d1d782 100644--- a/web/app/components/share/text-generation/hooks/use-text-generation-app-state.ts+++ b/web/app/components/share/text-generation/hooks/use-text-generation-app-state.ts@@ -2,9 +2,9 @@ import type { TextGenerationCustomConfig } from '../types'import type { MoreLikeThisConfig, PromptConfig, SavedMessage, TextToSpeechConfig } from '@/models/debug'import type { SiteInfo } from '@/models/share'import type { VisionSettings } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useGlobalPublicStore } from '@/context/global-public-context'import { useWebAppStore } from '@/context/web-app-context'import { useAppFavicon } from '@/hooks/use-app-favicon'diff --git a/web/app/components/share/text-generation/index.tsx b/web/app/components/share/text-generation/index.tsxindex afdd5b0c81a..77bf35f96e7 100644--- a/web/app/components/share/text-generation/index.tsx+++ b/web/app/components/share/text-generation/index.tsx@@ -4,11 +4,11 @@ import type { InputValueTypes, TextGenerationRunControl } from './types'import type { InstalledApp } from '@/models/explore'import type { VisionFile } from '@/types/app'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { toast } from '@/app/components/base/ui/toast'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'import { useSearchParams } from '@/next/navigation'import { useTextGenerationAppState } from './hooks/use-text-generation-app-state'diff --git a/web/app/components/share/text-generation/menu-dropdown.tsx b/web/app/components/share/text-generation/menu-dropdown.tsxindex d50a0d77deb..e82681946b3 100644--- a/web/app/components/share/text-generation/menu-dropdown.tsx+++ b/web/app/components/share/text-generation/menu-dropdown.tsx@@ -1,13 +1,8 @@'use client'+import type { Placement } from '@langgenius/dify-ui/dropdown-menu'import type { FC } from 'react'-import type { Placement } from '@/app/components/base/ui/placement'import type { SiteInfo } from '@/models/share'import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-import { useCallback, useEffect, useState } from 'react'-import { useTranslation } from 'react-i18next'-import ActionButton from '@/app/components/base/action-button'-import ThemeSwitcher from '@/app/components/base/theme-switcher'import {DropdownMenu,DropdownMenuContent,@@ -15,7 +10,12 @@ import {DropdownMenuLinkItem,DropdownMenuSeparator,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import * as React from 'react'+import { useCallback, useEffect, useState } from 'react'+import { useTranslation } from 'react-i18next'+import ActionButton from '@/app/components/base/action-button'+import ThemeSwitcher from '@/app/components/base/theme-switcher'import { useWebAppStore } from '@/context/web-app-context'import { AccessMode } from '@/models/access-control'import { usePathname, useRouter } from '@/next/navigation'diff --git a/web/app/components/share/text-generation/result/__tests__/index.spec.tsx b/web/app/components/share/text-generation/result/__tests__/index.spec.tsxindex 251032d541a..ec9d8873f6e 100644--- a/web/app/components/share/text-generation/result/__tests__/index.spec.tsx+++ b/web/app/components/share/text-generation/result/__tests__/index.spec.tsx@@ -25,7 +25,7 @@ vi.mock('i18next', () => ({t: (key: string) => key,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: {notify: notifyMock,},diff --git a/web/app/components/share/text-generation/result/index.tsx b/web/app/components/share/text-generation/result/index.tsxindex cb2d7834517..8247fcd0f5e 100644--- a/web/app/components/share/text-generation/result/index.tsx+++ b/web/app/components/share/text-generation/result/index.tsx@@ -4,13 +4,13 @@ import type { PromptConfig } from '@/models/debug'import type { SiteInfo } from '@/models/share'import type { AppSourceType } from '@/service/share'import type { VisionFile, VisionSettings } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { t } from 'i18next'import { useCallback } from 'react'import * as React from 'react'import TextGenerationRes from '@/app/components/app/text-generate/item'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import NoData from '@/app/components/share/text-generation/no-data'import { useResultRunState } from './hooks/use-result-run-state'import { useResultSender } from './hooks/use-result-sender'diff --git a/web/app/components/share/text-generation/run-batch/index.tsx b/web/app/components/share/text-generation/run-batch/index.tsxindex 153cb181f1d..1264e2eb644 100644--- a/web/app/components/share/text-generation/run-batch/index.tsx+++ b/web/app/components/share/text-generation/run-batch/index.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiLoader2Line,@@ -7,7 +8,6 @@ import {} from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'import CSVDownload from './csv-download'import CSVReader from './csv-reader'diff --git a/web/app/components/share/text-generation/run-batch/res-download/index.tsx b/web/app/components/share/text-generation/run-batch/res-download/index.tsxindex 7bb3336f133..a1cd4fe9d3f 100644--- a/web/app/components/share/text-generation/run-batch/res-download/index.tsx+++ b/web/app/components/share/text-generation/run-batch/res-download/index.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiDownloadLine } from '@remixicon/react'import * as React from 'react'@@ -8,7 +9,6 @@ import {useCSVDownloader,} from 'react-papaparse'import ActionButton from '@/app/components/base/action-button'-import { Button } from '@/app/components/base/ui/button'type IResDownloadProps = {isMobile: booleandiff --git a/web/app/components/share/text-generation/run-once/index.tsx b/web/app/components/share/text-generation/run-once/index.tsxindex 4e66614825e..d8a92dedfd2 100644--- a/web/app/components/share/text-generation/run-once/index.tsx+++ b/web/app/components/share/text-generation/run-once/index.tsx@@ -4,6 +4,7 @@ import type { FileEntity } from '@/app/components/base/file-uploader/types'import type { PromptConfig } from '@/models/debug'import type { SiteInfo } from '@/models/share'import type { VisionFile, VisionSettings } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiLoader2Line,@@ -18,7 +19,6 @@ import TextGenerationImageUploader from '@/app/components/base/image-uploader/teimport Input from '@/app/components/base/input'import Select from '@/app/components/base/select'import Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'import BoolInput from '@/app/components/workflow/nodes/_base/components/before-run-form/bool-input'import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'import { CodeLanguage } from '@/app/components/workflow/nodes/code/types'diff --git a/web/app/components/tools/edit-custom-collection-modal/__tests__/get-schema.spec.tsx b/web/app/components/tools/edit-custom-collection-modal/__tests__/get-schema.spec.tsxindex 998bca155df..aee315bcf62 100644--- a/web/app/components/tools/edit-custom-collection-modal/__tests__/get-schema.spec.tsx+++ b/web/app/components/tools/edit-custom-collection-modal/__tests__/get-schema.spec.tsx@@ -7,7 +7,7 @@ vi.mock('@/service/tools', () => ({importSchemaFromURL: vi.fn(),}))const mockToastError = vi.hoisted(() => vi.fn())-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,},diff --git a/web/app/components/tools/edit-custom-collection-modal/__tests__/index.spec.tsx b/web/app/components/tools/edit-custom-collection-modal/__tests__/index.spec.tsxindex 1ab1bc428c7..58ebab69b3c 100644--- a/web/app/components/tools/edit-custom-collection-modal/__tests__/index.spec.tsx+++ b/web/app/components/tools/edit-custom-collection-modal/__tests__/index.spec.tsx@@ -1,8 +1,8 @@import type { ModalContextState } from '@/context/modal-context'import type { ProviderContextState } from '@/context/provider-context'+import { toast } from '@langgenius/dify-ui/toast'import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import { toast } from '@/app/components/base/ui/toast'import { Plan } from '@/app/components/billing/type'import { AuthHeaderPrefix, AuthType } from '@/app/components/tools/types'import { parseParamsSchema } from '@/service/tools'diff --git a/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx b/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsxindex 533466387c3..bee775e80b5 100644--- a/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx+++ b/web/app/components/tools/edit-custom-collection-modal/config-credentials.tsx@@ -1,6 +1,7 @@'use client'import type { FC } from 'react'import type { Credential } from '@/app/components/tools/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import * as React from 'react'import { useTranslation } from 'react-i18next'@@ -8,7 +9,6 @@ import Drawer from '@/app/components/base/drawer-plus'import Input from '@/app/components/base/input'import Radio from '@/app/components/base/radio/ui'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import { AuthHeaderPrefix, AuthType } from '@/app/components/tools/types'type Props = {diff --git a/web/app/components/tools/edit-custom-collection-modal/get-schema.tsx b/web/app/components/tools/edit-custom-collection-modal/get-schema.tsxindex 3711a5d0959..2bb5059870f 100644--- a/web/app/components/tools/edit-custom-collection-modal/get-schema.tsx+++ b/web/app/components/tools/edit-custom-collection-modal/get-schema.tsx@@ -1,5 +1,7 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import {RiAddLine,RiArrowDownSLine,@@ -9,8 +11,6 @@ import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { importSchemaFromURL } from '@/service/tools'import examples from './examples'diff --git a/web/app/components/tools/edit-custom-collection-modal/index.tsx b/web/app/components/tools/edit-custom-collection-modal/index.tsxindex 189e93f73b2..03899941bab 100644--- a/web/app/components/tools/edit-custom-collection-modal/index.tsx+++ b/web/app/components/tools/edit-custom-collection-modal/index.tsx@@ -1,7 +1,9 @@'use client'import type { FC } from 'react'import type { Credential, CustomCollectionBackend, CustomParamSchema, Emoji } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiSettings2Line } from '@remixicon/react'import { useDebounce, useGetState } from 'ahooks'import { produce } from 'immer'@@ -13,8 +15,6 @@ import Drawer from '@/app/components/base/drawer-plus'import EmojiPicker from '@/app/components/base/emoji-picker'import Input from '@/app/components/base/input'import Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import LabelSelector from '@/app/components/tools/labels/selector'import { parseParamsSchema } from '@/service/tools'import { LinkExternal02 } from '../../base/icons/src/vender/line/general'diff --git a/web/app/components/tools/edit-custom-collection-modal/test-api.tsx b/web/app/components/tools/edit-custom-collection-modal/test-api.tsxindex 177cd2a8ee6..0eecb8ca6bd 100644--- a/web/app/components/tools/edit-custom-collection-modal/test-api.tsx+++ b/web/app/components/tools/edit-custom-collection-modal/test-api.tsx@@ -1,13 +1,13 @@'use client'import type { FC } from 'react'import type { Credential, CustomCollectionBackend, CustomParamSchema } from '@/app/components/tools/types'+import { Button } from '@langgenius/dify-ui/button'import { RiSettings2Line } from '@remixicon/react'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Drawer from '@/app/components/base/drawer-plus'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'import { AuthType } from '@/app/components/tools/types'import { useLocale } from '@/context/i18n'import { getLanguage } from '@/i18n-config/language'diff --git a/web/app/components/tools/labels/filter.tsx b/web/app/components/tools/labels/filter.tsxindex 6405673eecd..00fa47ace44 100644--- a/web/app/components/tools/labels/filter.tsx+++ b/web/app/components/tools/labels/filter.tsx@@ -1,6 +1,11 @@import type { FC } from 'react'import type { Label } from '@/app/components/tools/labels/constant'import { cn } from '@langgenius/dify-ui/cn'+import {+ Popover,+ PopoverContent,+ PopoverTrigger,+} from '@langgenius/dify-ui/popover'import { RiArrowDownSLine } from '@remixicon/react'import { useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'@@ -8,11 +13,6 @@ import { Tag01, Tag03 } from '@/app/components/base/icons/src/vender/line/financimport { Check } from '@/app/components/base/icons/src/vender/line/general'import { XCircle } from '@/app/components/base/icons/src/vender/solid/general'import Input from '@/app/components/base/input'-import {- Popover,- PopoverContent,- PopoverTrigger,-} from '@/app/components/base/ui/popover'import { useTags } from '@/app/components/plugins/hooks'type LabelFilterProps = {diff --git a/web/app/components/tools/mcp/__tests__/modal.spec.tsx b/web/app/components/tools/mcp/__tests__/modal.spec.tsxindex 5b561e7f30c..a57f88ecadf 100644--- a/web/app/components/tools/mcp/__tests__/modal.spec.tsx+++ b/web/app/components/tools/mcp/__tests__/modal.spec.tsx@@ -49,7 +49,7 @@ vi.mock('@/service/use-plugins', () => ({}))const mockToastError = vi.hoisted(() => vi.fn())-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,},diff --git a/web/app/components/tools/mcp/detail/__tests__/operation-dropdown.spec.tsx b/web/app/components/tools/mcp/detail/__tests__/operation-dropdown.spec.tsxindex 962f39c326c..7205c6f427d 100644--- a/web/app/components/tools/mcp/detail/__tests__/operation-dropdown.spec.tsx+++ b/web/app/components/tools/mcp/detail/__tests__/operation-dropdown.spec.tsx@@ -2,7 +2,7 @@ import { fireEvent, render, screen } from '@testing-library/react'import { describe, expect, it, vi } from 'vitest'import OperationDropdown from '../operation-dropdown'-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const React = await import('react')const DropdownMenuContext = React.createContext<{ isOpen: boolean, setOpen: (open: boolean) => void } | null>(null)diff --git a/web/app/components/tools/mcp/detail/content.tsx b/web/app/components/tools/mcp/detail/content.tsxindex d9ea302cbba..48ea75723ce 100644--- a/web/app/components/tools/mcp/detail/content.tsx+++ b/web/app/components/tools/mcp/detail/content.tsx@@ -1,6 +1,16 @@'use client'import type { FC } from 'react'import type { ToolWithProvider } from '../../../workflow/types'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiCloseLine,@@ -14,16 +24,6 @@ import { useCallback, useEffect } from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Tooltip from '@/app/components/base/tooltip'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'import Icon from '@/app/components/plugins/card/base/card-icon'import { useAppContext } from '@/context/app-context'diff --git a/web/app/components/tools/mcp/detail/operation-dropdown.tsx b/web/app/components/tools/mcp/detail/operation-dropdown.tsxindex 9a7ee670514..c52e3f41901 100644--- a/web/app/components/tools/mcp/detail/operation-dropdown.tsx+++ b/web/app/components/tools/mcp/detail/operation-dropdown.tsx@@ -1,6 +1,12 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import {RiDeleteBinLine,RiEditLine,@@ -10,12 +16,6 @@ import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'type Props = {inCard?: booleandiff --git a/web/app/components/tools/mcp/headers-input.tsx b/web/app/components/tools/mcp/headers-input.tsxindex 05cc464bfbf..2726377ae96 100644--- a/web/app/components/tools/mcp/headers-input.tsx+++ b/web/app/components/tools/mcp/headers-input.tsx@@ -1,4 +1,5 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiAddLine, RiDeleteBinLine } from '@remixicon/react'import * as React from 'react'@@ -6,7 +7,6 @@ import { useTranslation } from 'react-i18next'import { v4 as uuid } from 'uuid'import ActionButton from '@/app/components/base/action-button'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'export type HeaderItem = {id: stringdiff --git a/web/app/components/tools/mcp/hooks/use-mcp-modal-form.ts b/web/app/components/tools/mcp/hooks/use-mcp-modal-form.tsindex 6d88d52c4c9..a1e156fef46 100644--- a/web/app/components/tools/mcp/hooks/use-mcp-modal-form.ts+++ b/web/app/components/tools/mcp/hooks/use-mcp-modal-form.ts@@ -2,10 +2,10 @@import type { HeaderItem } from '../headers-input'import type { AppIconSelection } from '@/app/components/base/app-icon-picker'import type { ToolWithProvider } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useMemo, useRef, useState } from 'react'import { getDomain } from 'tldts'import { v4 as uuid } from 'uuid'-import { toast } from '@/app/components/base/ui/toast'import { MCPAuthMethod } from '@/app/components/tools/types'import { uploadRemoteFileInfo } from '@/service/common'diff --git a/web/app/components/tools/mcp/mcp-server-modal.tsx b/web/app/components/tools/mcp/mcp-server-modal.tsxindex e9eb1d80438..ab4a5c36f4d 100644--- a/web/app/components/tools/mcp/mcp-server-modal.tsx+++ b/web/app/components/tools/mcp/mcp-server-modal.tsx@@ -2,6 +2,7 @@import type {MCPServerDetail,} from '@/app/components/tools/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiCloseLine } from '@remixicon/react'import * as React from 'react'@@ -9,7 +10,6 @@ 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 { Button } from '@/app/components/base/ui/button'import MCPServerParamItem from '@/app/components/tools/mcp/mcp-server-param-item'import { webSocketClient } from '@/app/components/workflow/collaboration/core/websocket-manager'import {diff --git a/web/app/components/tools/mcp/mcp-service-card.tsx b/web/app/components/tools/mcp/mcp-service-card.tsxindex 33036969d83..67beb9b3ee3 100644--- a/web/app/components/tools/mcp/mcp-service-card.tsx+++ b/web/app/components/tools/mcp/mcp-service-card.tsx@@ -4,15 +4,6 @@ import type { FC, ReactNode } from 'react'import type { CollaborationUpdate } from '@/app/components/workflow/collaboration/types/collaboration'import type { AppDetailResponse } from '@/models/app'import type { AppSSO } from '@/types/app'-import { cn } from '@langgenius/dify-ui/cn'-import { RiEditLine, RiLoopLeftLine } from '@remixicon/react'-import { useEffect, useRef, useState } from 'react'-import { useTranslation } from 'react-i18next'-import CopyFeedback from '@/app/components/base/copy-feedback'-import Divider from '@/app/components/base/divider'-import { Mcp } from '@/app/components/base/icons/src/vender/other'-import Switch from '@/app/components/base/switch'-import Tooltip from '@/app/components/base/tooltip'import {AlertDialog,AlertDialogActions,@@ -21,8 +12,17 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'+import { RiEditLine, RiLoopLeftLine } from '@remixicon/react'+import { useEffect, useRef, useState } from 'react'+import { useTranslation } from 'react-i18next'+import CopyFeedback from '@/app/components/base/copy-feedback'+import Divider from '@/app/components/base/divider'+import { Mcp } from '@/app/components/base/icons/src/vender/other'+import Tooltip from '@/app/components/base/tooltip'import Indicator from '@/app/components/header/indicator'import MCPServerModal from '@/app/components/tools/mcp/mcp-server-modal'import { collaborationManager } from '@/app/components/workflow/collaboration/core/collaboration-manager'diff --git a/web/app/components/tools/mcp/modal.tsx b/web/app/components/tools/mcp/modal.tsxindex 8d8d8755d3a..165535127da 100644--- a/web/app/components/tools/mcp/modal.tsx+++ b/web/app/components/tools/mcp/modal.tsx@@ -3,7 +3,9 @@ import type { FC } from 'react'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 { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine, RiEditLine } from '@remixicon/react'import { useHover } from 'ahooks'import { noop } from 'es-toolkit/function'@@ -14,8 +16,6 @@ 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 { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { MCPAuthMethod } from '@/app/components/tools/types'import { shouldUseMcpIconForAppIcon } from '@/utils/mcp'import { isValidServerID, isValidUrl, useMCPModalForm } from './hooks/use-mcp-modal-form'diff --git a/web/app/components/tools/mcp/provider-card.tsx b/web/app/components/tools/mcp/provider-card.tsxindex ea0a7f81720..9d68e6f02bb 100644--- a/web/app/components/tools/mcp/provider-card.tsx+++ b/web/app/components/tools/mcp/provider-card.tsx@@ -1,10 +1,5 @@'use client'import type { ToolWithProvider } from '../../workflow/types'-import { cn } from '@langgenius/dify-ui/cn'-import { RiHammerFill } from '@remixicon/react'-import { useBoolean } from 'ahooks'-import { useCallback, useState } from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -12,7 +7,12 @@ import {AlertDialogConfirmButton,AlertDialogContent,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import { cn } from '@langgenius/dify-ui/cn'+import { RiHammerFill } from '@remixicon/react'+import { useBoolean } from 'ahooks'+import { useCallback, useState } from 'react'+import { useTranslation } from 'react-i18next'import Indicator from '@/app/components/header/indicator'import Icon from '@/app/components/plugins/card/base/card-icon'import { useAppContext } from '@/context/app-context'diff --git a/web/app/components/tools/mcp/sections/authentication-section.tsx b/web/app/components/tools/mcp/sections/authentication-section.tsxindex 157ed66b79b..167ab44683c 100644--- a/web/app/components/tools/mcp/sections/authentication-section.tsx+++ b/web/app/components/tools/mcp/sections/authentication-section.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { useTranslation } from 'react-i18next'import AlertTriangle from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback/AlertTriangle'import Input from '@/app/components/base/input'-import Switch from '@/app/components/base/switch'import { API_PREFIX } from '@/config'type AuthenticationSectionProps = {diff --git a/web/app/components/tools/provider/__tests__/custom-create-card.spec.tsx b/web/app/components/tools/provider/__tests__/custom-create-card.spec.tsxindex 90ab7861b69..1c2573918fe 100644--- a/web/app/components/tools/provider/__tests__/custom-create-card.spec.tsx+++ b/web/app/components/tools/provider/__tests__/custom-create-card.spec.tsx@@ -72,7 +72,7 @@ vi.mock('@/app/components/tools/edit-custom-collection-modal', () => ({// Mock toastconst mockToastSuccess = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (title: string) => mockToastSuccess(title),},diff --git a/web/app/components/tools/provider/__tests__/detail.spec.tsx b/web/app/components/tools/provider/__tests__/detail.spec.tsxindex 870e8adab14..d510eb2a348 100644--- a/web/app/components/tools/provider/__tests__/detail.spec.tsx+++ b/web/app/components/tools/provider/__tests__/detail.spec.tsx@@ -81,7 +81,7 @@ vi.mock('@/app/components/base/drawer', () => ({const mockToastSuccess = vi.hoisted(() => vi.fn())const mockToastError = vi.hoisted(() => vi.fn())-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: mockToastSuccess,error: mockToastError,diff --git a/web/app/components/tools/provider/custom-create-card.tsx b/web/app/components/tools/provider/custom-create-card.tsxindex f2154de18c3..2d9d58209a9 100644--- a/web/app/components/tools/provider/custom-create-card.tsx+++ b/web/app/components/tools/provider/custom-create-card.tsx@@ -1,11 +1,11 @@'use client'import type { CustomCollectionBackend } from '../types'+import { toast } from '@langgenius/dify-ui/toast'import {RiAddCircleFill,} from '@remixicon/react'import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import EditCustomToolModal from '@/app/components/tools/edit-custom-collection-modal'import { useAppContext } from '@/context/app-context'import { createCustomCollection } from '@/service/tools'diff --git a/web/app/components/tools/provider/detail.tsx b/web/app/components/tools/provider/detail.tsxindex 7480d114852..eee3f423bbe 100644--- a/web/app/components/tools/provider/detail.tsx+++ b/web/app/components/tools/provider/detail.tsx@@ -1,7 +1,18 @@'use client'import type { Collection, CustomCollectionBackend, Tool, WorkflowToolProviderRequest, WorkflowToolProviderResponse } from '../types'import type { WorkflowToolModalPayload } from '@/app/components/tools/workflow-tool'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {RiCloseLine,} from '@remixicon/react'@@ -12,17 +23,6 @@ import ActionButton from '@/app/components/base/action-button'import Drawer from '@/app/components/base/drawer'import { LinkExternal02, Settings01 } from '@/app/components/base/icons/src/vender/line/general'import Loading from '@/app/components/base/loading'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { ConfigurationMethodEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import Indicator from '@/app/components/header/indicator'import Icon from '@/app/components/plugins/card/base/card-icon'diff --git a/web/app/components/tools/setting/build-in/__tests__/config-credentials.spec.tsx b/web/app/components/tools/setting/build-in/__tests__/config-credentials.spec.tsxindex edce5c0bbb0..996a4077afa 100644--- a/web/app/components/tools/setting/build-in/__tests__/config-credentials.spec.tsx+++ b/web/app/components/tools/setting/build-in/__tests__/config-credentials.spec.tsx@@ -33,7 +33,7 @@ vi.mock('@/app/components/base/drawer-plus', () => ({),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({default: { notify: vi.fn() },}))diff --git a/web/app/components/tools/setting/build-in/config-credentials.tsx b/web/app/components/tools/setting/build-in/config-credentials.tsxindex 258de72492d..d6c62f5d88d 100644--- a/web/app/components/tools/setting/build-in/config-credentials.tsx+++ b/web/app/components/tools/setting/build-in/config-credentials.tsx@@ -1,7 +1,9 @@'use client'import type { FC } from 'react'import type { Collection } from '../../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import * as React from 'react'import { useEffect, useState } from 'react'@@ -9,8 +11,6 @@ import { useTranslation } from 'react-i18next'import Drawer from '@/app/components/base/drawer-plus'import { LinkExternal02 } from '@/app/components/base/icons/src/vender/line/general'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'import Form from '@/app/components/header/account-setting/model-provider-page/model-modal/Form'import { fetchBuiltInToolCredential, fetchBuiltInToolCredentialSchema } from '@/service/tools'diff --git a/web/app/components/tools/workflow-tool/__tests__/configure-button.spec.tsx b/web/app/components/tools/workflow-tool/__tests__/configure-button.spec.tsxindex 8240def4859..646a0956227 100644--- a/web/app/components/tools/workflow-tool/__tests__/configure-button.spec.tsx+++ b/web/app/components/tools/workflow-tool/__tests__/configure-button.spec.tsx@@ -49,7 +49,7 @@ vi.mock('@/service/use-tools', () => ({// Mock Toast - need to verify notification callsconst mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockToastNotify({ type: 'success', message }),error: (message: string) => mockToastNotify({ type: 'error', message }),diff --git a/web/app/components/tools/workflow-tool/__tests__/index.spec.tsx b/web/app/components/tools/workflow-tool/__tests__/index.spec.tsxindex f3f229abea3..2ec289fcf69 100644--- a/web/app/components/tools/workflow-tool/__tests__/index.spec.tsx+++ b/web/app/components/tools/workflow-tool/__tests__/index.spec.tsx@@ -71,7 +71,7 @@ vi.mock('../confirm-modal', () => ({}))const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockToastNotify({ type: 'success', message }),error: (message: string) => mockToastNotify({ type: 'error', message }),diff --git a/web/app/components/tools/workflow-tool/configure-button.tsx b/web/app/components/tools/workflow-tool/configure-button.tsxindex f1a48cc75b8..1e7053f7442 100644--- a/web/app/components/tools/workflow-tool/configure-button.tsx+++ b/web/app/components/tools/workflow-tool/configure-button.tsx@@ -2,11 +2,11 @@import type { Emoji } from '@/app/components/tools/types'import type { InputVar, Variable } from '@/app/components/workflow/types'import type { PublishWorkflowParams } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowRightUpLine, RiHammerLine } from '@remixicon/react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'import WorkflowToolModal from '@/app/components/tools/workflow-tool'import Divider from '../../base/divider'diff --git a/web/app/components/tools/workflow-tool/confirm-modal/index.tsx b/web/app/components/tools/workflow-tool/confirm-modal/index.tsxindex 6eeaa86dff6..ba453877314 100644--- a/web/app/components/tools/workflow-tool/confirm-modal/index.tsx+++ b/web/app/components/tools/workflow-tool/confirm-modal/index.tsx@@ -1,12 +1,12 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiCloseLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import { useTranslation } from 'react-i18next'import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'type ConfirmModalProps = {show: booleandiff --git a/web/app/components/tools/workflow-tool/hooks/__tests__/use-configure-button.spec.ts b/web/app/components/tools/workflow-tool/hooks/__tests__/use-configure-button.spec.tsindex 6f9017bbea9..efbf16d590b 100644--- a/web/app/components/tools/workflow-tool/hooks/__tests__/use-configure-button.spec.ts+++ b/web/app/components/tools/workflow-tool/hooks/__tests__/use-configure-button.spec.ts@@ -33,7 +33,7 @@ vi.mock('@/service/use-tools', () => ({}))const mockToastNotify = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockToastNotify({ type: 'success', message }),error: (message: string) => mockToastNotify({ type: 'error', message }),diff --git a/web/app/components/tools/workflow-tool/hooks/use-configure-button.ts b/web/app/components/tools/workflow-tool/hooks/use-configure-button.tsindex 142b0c23978..9f0a43635c8 100644--- a/web/app/components/tools/workflow-tool/hooks/use-configure-button.ts+++ b/web/app/components/tools/workflow-tool/hooks/use-configure-button.ts@@ -1,9 +1,9 @@import type { Emoji, WorkflowToolProviderOutputParameter, WorkflowToolProviderParameter, WorkflowToolProviderRequest, WorkflowToolProviderResponse } from '@/app/components/tools/types'import type { InputVar, Variable } from '@/app/components/workflow/types'import type { PublishWorkflowParams } from '@/types/workflow'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useAppContext } from '@/context/app-context'import { useRouter } from '@/next/navigation'import { createWorkflowToolProvider, saveWorkflowToolProvider } from '@/service/tools'diff --git a/web/app/components/tools/workflow-tool/index.tsx b/web/app/components/tools/workflow-tool/index.tsxindex fd18bf5fa73..353e85beba6 100644--- a/web/app/components/tools/workflow-tool/index.tsx+++ b/web/app/components/tools/workflow-tool/index.tsx@@ -1,7 +1,9 @@'use client'import type { FC } from 'react'import type { Emoji, WorkflowToolProviderOutputParameter, WorkflowToolProviderOutputSchema, WorkflowToolProviderParameter, WorkflowToolProviderRequest } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiErrorWarningLine } from '@remixicon/react'import { produce } from 'immer'import * as React from 'react'@@ -13,8 +15,6 @@ import EmojiPicker from '@/app/components/base/emoji-picker'import Input from '@/app/components/base/input'import Textarea from '@/app/components/base/textarea'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import LabelSelector from '@/app/components/tools/labels/selector'import ConfirmModal from '@/app/components/tools/workflow-tool/confirm-modal'import MethodSelector from '@/app/components/tools/workflow-tool/method-selector'diff --git a/web/app/components/workflow-app/components/workflow-header/__tests__/features-trigger.spec.tsx b/web/app/components/workflow-app/components/workflow-header/__tests__/features-trigger.spec.tsxindex 49e7bb26d7d..41e47967b22 100644--- a/web/app/components/workflow-app/components/workflow-header/__tests__/features-trigger.spec.tsx+++ b/web/app/components/workflow-app/components/workflow-header/__tests__/features-trigger.spec.tsx@@ -26,7 +26,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),diff --git a/web/app/components/workflow-app/components/workflow-header/features-trigger.tsx b/web/app/components/workflow-app/components/workflow-header/features-trigger.tsxindex 94e487ba575..d1aafa5c43e 100644--- a/web/app/components/workflow-app/components/workflow-header/features-trigger.tsx+++ b/web/app/components/workflow-app/components/workflow-header/features-trigger.tsx@@ -6,7 +6,9 @@ import type {Node,} from '@/app/components/workflow/types'import type { PublishWorkflowParams } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiApps2AddLine } from '@remixicon/react'import {memo,@@ -18,8 +20,6 @@ import { useEdges } from 'reactflow'import AppPublisher from '@/app/components/app/app-publisher'import { useStore as useAppStore } from '@/app/components/app/store'import { useFeatures } from '@/app/components/base/features/hooks'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { Plan } from '@/app/components/billing/type'import {useChecklist,diff --git a/web/app/components/workflow-app/components/workflow-onboarding-modal/index.tsx b/web/app/components/workflow-app/components/workflow-onboarding-modal/index.tsxindex 36a8e6f7fce..cbb875a758c 100644--- a/web/app/components/workflow-app/components/workflow-onboarding-modal/index.tsx+++ b/web/app/components/workflow-app/components/workflow-onboarding-modal/index.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'import type { PluginDefaultValue } from '@/app/components/workflow/block-selector/types'+import { Dialog, DialogCloseButton, DialogContent, DialogDescription, DialogPortal, DialogTitle } from '@langgenius/dify-ui/dialog'import { useTranslation } from 'react-i18next'-import { Dialog, DialogCloseButton, DialogContent, DialogDescription, DialogPortal, DialogTitle } from '@/app/components/base/ui/dialog'import ShortcutsName from '@/app/components/workflow/shortcuts-name'import { BlockEnum } from '@/app/components/workflow/types'import StartNodeSelectionPanel from './start-node-selection-panel'diff --git a/web/app/components/workflow-app/hooks/__tests__/use-DSL.spec.ts b/web/app/components/workflow-app/hooks/__tests__/use-DSL.spec.tsindex e6eb41c141f..b417704f35a 100644--- a/web/app/components/workflow-app/hooks/__tests__/use-DSL.spec.ts+++ b/web/app/components/workflow-app/hooks/__tests__/use-DSL.spec.ts@@ -9,7 +9,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'success', message, ...options })),error: vi.fn((message: string, options?: Record<string, unknown>) => toastMocks.call({ type: 'error', message, ...options })),diff --git a/web/app/components/workflow-app/hooks/__tests__/use-workflow-run-utils.spec.ts b/web/app/components/workflow-app/hooks/__tests__/use-workflow-run-utils.spec.tsindex a83d2f55eee..40b36721865 100644--- a/web/app/components/workflow-app/hooks/__tests__/use-workflow-run-utils.spec.ts+++ b/web/app/components/workflow-app/hooks/__tests__/use-workflow-run-utils.spec.ts@@ -35,7 +35,7 @@ vi.mock('@/service/base', () => ({handleStream: mockHandleStream,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,},diff --git a/web/app/components/workflow-app/hooks/use-DSL.ts b/web/app/components/workflow-app/hooks/use-DSL.tsindex 6b3dd9ddacc..2fb2df8a3b0 100644--- a/web/app/components/workflow-app/hooks/use-DSL.ts+++ b/web/app/components/workflow-app/hooks/use-DSL.ts@@ -1,10 +1,10 @@+import { toast } from '@langgenius/dify-ui/toast'import {useCallback,useState,} from 'react'import { useTranslation } from 'react-i18next'import { useStore as useAppStore } from '@/app/components/app/store'-import { toast } from '@/app/components/base/ui/toast'import {DSL_EXPORT_CHECK,} from '@/app/components/workflow/constants'diff --git a/web/app/components/workflow-app/hooks/use-workflow-run-utils.ts b/web/app/components/workflow-app/hooks/use-workflow-run-utils.tsindex 62b09cfe740..fd5669f80a3 100644--- a/web/app/components/workflow-app/hooks/use-workflow-run-utils.ts+++ b/web/app/components/workflow-app/hooks/use-workflow-run-utils.ts@@ -2,8 +2,8 @@ import type { Features as FeaturesData } from '@/app/components/base/features/tyimport type { TriggerNodeType } from '@/app/components/workflow/types'import type { IOtherOptions } from '@/service/base'import type { VersionHistory } from '@/types/workflow'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'-import { toast } from '@/app/components/base/ui/toast'import { TriggerType } from '@/app/components/workflow/header/test-run-menu'import { WorkflowRunningStatus } from '@/app/components/workflow/types'import { handleStream, post } from '@/service/base'diff --git a/web/app/components/workflow/__tests__/update-dsl-modal.spec.tsx b/web/app/components/workflow/__tests__/update-dsl-modal.spec.tsxindex b435091647e..241cd7d762b 100644--- a/web/app/components/workflow/__tests__/update-dsl-modal.spec.tsx+++ b/web/app/components/workflow/__tests__/update-dsl-modal.spec.tsx@@ -1,7 +1,7 @@import type { EventEmitter } from 'ahooks/lib/useEventEmitter'import type { EventEmitterValue } from '@/context/event-emitter'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import { toast } from '@/app/components/base/ui/toast'import { EventEmitterContext } from '@/context/event-emitter'import { DSLImportStatus } from '@/models/app'import UpdateDSLModal from '../update-dsl-modal'@@ -19,7 +19,7 @@ vi.stubGlobal('FileReader', MockFileReader as unknown as typeof FileReader)const mockEmit = vi.fn()const mockEmitWorkflowUpdate = vi.hoisted(() => vi.fn())-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: vi.fn(),info: vi.fn(),diff --git a/web/app/components/workflow/__tests__/workflow-edge-events.spec.tsx b/web/app/components/workflow/__tests__/workflow-edge-events.spec.tsxindex 586a3c930e9..47545baca82 100644--- a/web/app/components/workflow/__tests__/workflow-edge-events.spec.tsx+++ b/web/app/components/workflow/__tests__/workflow-edge-events.spec.tsx@@ -164,7 +164,7 @@ vi.mock('@/service/workflow', () => ({fetchAllInspectVars: vi.fn().mockResolvedValue([]),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {info: toastInfoMock,},diff --git a/web/app/components/workflow/block-selector/__tests__/tool-picker.spec.tsx b/web/app/components/workflow/block-selector/__tests__/tool-picker.spec.tsxindex 737481601ce..1a2f7a4c936 100644--- a/web/app/components/workflow/block-selector/__tests__/tool-picker.spec.tsx+++ b/web/app/components/workflow/block-selector/__tests__/tool-picker.spec.tsx@@ -114,7 +114,7 @@ vi.mock('@/service/use-tools', () => ({useInvalidateAllMCPTools: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockNotify({ type: 'success', message }),error: (message: string) => mockNotify({ type: 'error', message }),diff --git a/web/app/components/workflow/block-selector/all-start-blocks.tsx b/web/app/components/workflow/block-selector/all-start-blocks.tsxindex 12f37122d94..72a98bed008 100644--- a/web/app/components/workflow/block-selector/all-start-blocks.tsx+++ b/web/app/components/workflow/block-selector/all-start-blocks.tsx@@ -5,6 +5,7 @@ import type {import type { BlockEnum, OnSelectBlock } from '../types'import type { ListRef } from './market-place-plugin/list'import type { TriggerDefaultValue, TriggerWithProvider } from './types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowRightUpLine } from '@remixicon/react'import {@@ -17,7 +18,6 @@ import {import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import { SearchMenu } from '@/app/components/base/icons/src/vender/line/general'-import { Button } from '@/app/components/base/ui/button'import { useGlobalPublicStore } from '@/context/global-public-context'import Link from '@/next/link'import { useFeaturedTriggersRecommendations } from '@/service/use-plugins'diff --git a/web/app/components/workflow/block-selector/all-tools.tsx b/web/app/components/workflow/block-selector/all-tools.tsxindex 303e98071f1..2483b92f90b 100644--- a/web/app/components/workflow/block-selector/all-tools.tsx+++ b/web/app/components/workflow/block-selector/all-tools.tsx@@ -11,13 +11,13 @@ import type {import type { ToolDefaultValue, ToolValue } from './types'import type { ListProps, ListRef } from '@/app/components/workflow/block-selector/market-place-plugin/list'import type { OnSelectBlock } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowRightUpLine } from '@remixicon/react'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import { SearchMenu } from '@/app/components/base/icons/src/vender/line/general'-import { Button } from '@/app/components/base/ui/button'import PluginList from '@/app/components/workflow/block-selector/market-place-plugin/list'import { useGlobalPublicStore } from '@/context/global-public-context'import { useGetLanguage } from '@/context/i18n'diff --git a/web/app/components/workflow/block-selector/market-place-plugin/action.tsx b/web/app/components/workflow/block-selector/market-place-plugin/action.tsxindex a058e8c051e..34bdf547152 100644--- a/web/app/components/workflow/block-selector/market-place-plugin/action.tsx+++ b/web/app/components/workflow/block-selector/market-place-plugin/action.tsx@@ -1,19 +1,19 @@'use client'import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'-import { useQueryClient } from '@tanstack/react-query'-import { useTheme } from 'next-themes'-import * as React from 'react'-import { useCallback, useEffect, useMemo, useState } from 'react'-import { useTranslation } from 'react-i18next'-import ActionButton from '@/app/components/base/action-button'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuLinkItem,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { useQueryClient } from '@tanstack/react-query'+import { useTheme } from 'next-themes'+import * as React from 'react'+import { useCallback, useEffect, useMemo, useState } from 'react'+import { useTranslation } from 'react-i18next'+import ActionButton from '@/app/components/base/action-button'import { useDownloadPlugin } from '@/service/use-plugins'import { downloadBlob } from '@/utils/download'import { getMarketplaceUrl } from '@/utils/var'diff --git a/web/app/components/workflow/block-selector/tool-picker.tsx b/web/app/components/workflow/block-selector/tool-picker.tsxindex a509dd9723a..7ba93798e26 100644--- a/web/app/components/workflow/block-selector/tool-picker.tsx+++ b/web/app/components/workflow/block-selector/tool-picker.tsx@@ -8,6 +8,7 @@ import type { ToolDefaultValue, ToolValue } from './types'import type { CustomCollectionBackend } from '@/app/components/tools/types'import type { BlockEnum, OnSelectBlock } from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import * as React from 'react'import { useMemo, useState } from 'react'@@ -17,7 +18,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { toast } from '@/app/components/base/ui/toast'import SearchBox from '@/app/components/plugins/marketplace/search-box'import EditCustomToolModal from '@/app/components/tools/edit-custom-collection-modal'import AllTools from '@/app/components/workflow/block-selector/all-tools'diff --git a/web/app/components/workflow/comment/comment-input.spec.tsx b/web/app/components/workflow/comment/comment-input.spec.tsxindex 41e583aeed0..8796b4ec364 100644--- a/web/app/components/workflow/comment/comment-input.spec.tsx+++ b/web/app/components/workflow/comment/comment-input.spec.tsx@@ -35,7 +35,7 @@ vi.mock('@/context/app-context', () => ({}),}))-vi.mock('@/app/components/base/ui/avatar', () => ({+vi.mock('@langgenius/dify-ui/avatar', () => ({Avatar: ({ name }: { name: string }) => <div data-testid="avatar">{name}</div>,default: ({ name }: { name: string }) => <div data-testid="avatar">{name}</div>,}))diff --git a/web/app/components/workflow/comment/comment-input.tsx b/web/app/components/workflow/comment/comment-input.tsxindex 51cef610c46..e6cbc95a82f 100644--- a/web/app/components/workflow/comment/comment-input.tsx+++ b/web/app/components/workflow/comment/comment-input.tsx@@ -1,8 +1,8 @@import type { FC, PointerEvent as ReactPointerEvent } from 'react'+import { Avatar } from '@langgenius/dify-ui/avatar'import { cn } from '@langgenius/dify-ui/cn'import { memo, useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Avatar } from '@/app/components/base/ui/avatar'import { useAppContext } from '@/context/app-context'import { MentionInput } from './mention-input'diff --git a/web/app/components/workflow/comment/mention-input.spec.tsx b/web/app/components/workflow/comment/mention-input.spec.tsxindex 5ff211d1f2e..49fc7b6e87e 100644--- a/web/app/components/workflow/comment/mention-input.spec.tsx+++ b/web/app/components/workflow/comment/mention-input.spec.tsx@@ -41,7 +41,7 @@ vi.mock('../store', () => ({}),}))-vi.mock('@/app/components/base/ui/avatar', () => ({+vi.mock('@langgenius/dify-ui/avatar', () => ({Avatar: ({ name }: { name: string }) => <div data-testid="mention-avatar">{name}</div>,}))diff --git a/web/app/components/workflow/comment/mention-input.tsx b/web/app/components/workflow/comment/mention-input.tsxindex 287a1c2e551..b6a7caa055f 100644--- a/web/app/components/workflow/comment/mention-input.tsx+++ b/web/app/components/workflow/comment/mention-input.tsx@@ -2,6 +2,8 @@import type { ReactNode } from 'react'import type { UserProfile } from '@/service/workflow-comment'+import { Avatar } from '@langgenius/dify-ui/avatar'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowUpLine, RiAtLine, RiLoader2Line } from '@remixicon/react'import {@@ -19,8 +21,6 @@ import { createPortal } from 'react-dom'import { useTranslation } from 'react-i18next'import Textarea from 'react-textarea-autosize'import EnterKey from '@/app/components/base/icons/src/public/common/EnterKey'-import { Avatar } from '@/app/components/base/ui/avatar'-import { Button } from '@/app/components/base/ui/button'import { useParams } from '@/next/navigation'import { fetchMentionableUsers } from '@/service/workflow-comment'import { useStore, useWorkflowStore } from '../store'diff --git a/web/app/components/workflow/comment/thread.spec.tsx b/web/app/components/workflow/comment/thread.spec.tsxindex 40e522d4b72..58bb99cff05 100644--- a/web/app/components/workflow/comment/thread.spec.tsx+++ b/web/app/components/workflow/comment/thread.spec.tsx@@ -68,14 +68,14 @@ vi.mock('@/app/components/base/inline-delete-confirm', () => ({),}))-vi.mock('@/app/components/base/ui/avatar', () => ({+vi.mock('@langgenius/dify-ui/avatar', () => ({Avatar: ({ name }: { name: string }) => <div data-testid="avatar">{name}</div>,AvatarRoot: ({ children }: { children: React.ReactNode }) => <div data-testid="avatar-root">{children}</div>,AvatarImage: ({ alt }: { alt: string }) => <div data-testid="avatar-image">{alt}</div>,AvatarFallback: ({ children }: { children: React.ReactNode }) => <div data-testid="avatar-fallback">{children}</div>,}))-vi.mock('@/app/components/base/ui/dropdown-menu', () => ({+vi.mock('@langgenius/dify-ui/dropdown-menu', () => ({DropdownMenu: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,DropdownMenuTrigger: ({ children, ...props }: React.ComponentProps<'button'>) => (<button type="button" {...props}>{children}</button>@@ -83,7 +83,7 @@ vi.mock('@/app/components/base/ui/dropdown-menu', () => ({DropdownMenuContent: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,}))-vi.mock('@/app/components/base/ui/tooltip', () => ({+vi.mock('@langgenius/dify-ui/tooltip', () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,TooltipTrigger: ({children,diff --git a/web/app/components/workflow/comment/thread.tsx b/web/app/components/workflow/comment/thread.tsxindex d0ab65db158..34e00923724 100644--- a/web/app/components/workflow/comment/thread.tsx+++ b/web/app/components/workflow/comment/thread.tsx@@ -2,20 +2,20 @@import type { FC, ReactNode } from 'react'import type { WorkflowCommentDetail, WorkflowCommentDetailReply } from '@/service/workflow-comment'+import { Avatar, AvatarFallback, AvatarImage, AvatarRoot } from '@langgenius/dify-ui/avatar'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { RiArrowDownSLine, RiArrowUpSLine, RiCheckboxCircleFill, RiCheckboxCircleLine, RiCloseLine, RiDeleteBinLine, RiMoreFill } from '@remixicon/react'import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { useReactFlow, useViewport } from 'reactflow'import Divider from '@/app/components/base/divider'import InlineDeleteConfirm from '@/app/components/base/inline-delete-confirm'-import { Avatar, AvatarFallback, AvatarImage, AvatarRoot } from '@/app/components/base/ui/avatar'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { getUserColor } from '@/app/components/workflow/collaboration/utils/user-color'import { useAppContext } from '@/context/app-context'import { useFormatTimeFromNow } from '@/hooks/use-format-time-from-now'diff --git a/web/app/components/workflow/dsl-export-confirm-modal.tsx b/web/app/components/workflow/dsl-export-confirm-modal.tsxindex b256f8bd9f7..6f60e19854d 100644--- a/web/app/components/workflow/dsl-export-confirm-modal.tsx+++ b/web/app/components/workflow/dsl-export-confirm-modal.tsx@@ -1,5 +1,6 @@'use client'import type { EnvironmentVariable } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiCloseLine, RiLock2Line } from '@remixicon/react'import { noop } from 'es-toolkit/function'@@ -9,7 +10,6 @@ import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'import { Env } from '@/app/components/base/icons/src/vender/line/others'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'export type DSLExportConfirmModalProps = {envList: EnvironmentVariable[]diff --git a/web/app/components/workflow/edge-contextmenu.tsx b/web/app/components/workflow/edge-contextmenu.tsxindex 61b208fcbdd..2b7f13190a5 100644--- a/web/app/components/workflow/edge-contextmenu.tsx+++ b/web/app/components/workflow/edge-contextmenu.tsx@@ -1,14 +1,14 @@+import {+ ContextMenu,+ ContextMenuContent,+ ContextMenuItem,+} from '@langgenius/dify-ui/context-menu'import {memo,useMemo,} from 'react'import { useTranslation } from 'react-i18next'import { useEdges } from 'reactflow'-import {- ContextMenu,- ContextMenuContent,- ContextMenuItem,-} from '@/app/components/base/ui/context-menu'import { useEdgesInteractions, usePanelInteractions } from './hooks'import ShortcutsName from './shortcuts-name'import { useStore } from './store'diff --git a/web/app/components/workflow/header/__tests__/header-layouts.spec.tsx b/web/app/components/workflow/header/__tests__/header-layouts.spec.tsxindex f04a1609674..1ddf013f8d2 100644--- a/web/app/components/workflow/header/__tests__/header-layouts.spec.tsx+++ b/web/app/components/workflow/header/__tests__/header-layouts.spec.tsx@@ -60,7 +60,7 @@ vi.mock('@/service/use-workflow', () => ({useInvalidAllLastRun: () => mockInvalidAllLastRun,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockNotify({ type: 'success', message }),error: (message: string) => mockNotify({ type: 'error', message }),diff --git a/web/app/components/workflow/header/__tests__/run-mode.spec.tsx b/web/app/components/workflow/header/__tests__/run-mode.spec.tsxindex 7bc5ef1b0c7..02b645e079b 100644--- a/web/app/components/workflow/header/__tests__/run-mode.spec.tsx+++ b/web/app/components/workflow/header/__tests__/run-mode.spec.tsx@@ -46,7 +46,7 @@ vi.mock('../../hooks/use-dynamic-test-run-options', () => ({useDynamicTestRunOptions: () => mockDynamicOptions,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockNotify({ type: 'success', message }),error: (message: string) => mockNotify({ type: 'error', message }),diff --git a/web/app/components/workflow/header/__tests__/test-run-menu-helpers.spec.tsx b/web/app/components/workflow/header/__tests__/test-run-menu-helpers.spec.tsxindex 7df9cd091f7..09452055dbd 100644--- a/web/app/components/workflow/header/__tests__/test-run-menu-helpers.spec.tsx+++ b/web/app/components/workflow/header/__tests__/test-run-menu-helpers.spec.tsx@@ -10,7 +10,7 @@ import {useShortcutMenu,} from '../test-run-menu-helpers'-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const React = await import('react')const DropdownMenuContext = React.createContext<{ open: boolean, setOpen: (open: boolean) => void } | null>(null)diff --git a/web/app/components/workflow/header/__tests__/test-run-menu.spec.tsx b/web/app/components/workflow/header/__tests__/test-run-menu.spec.tsxindex 1d462bfc9cb..8e93612dc01 100644--- a/web/app/components/workflow/header/__tests__/test-run-menu.spec.tsx+++ b/web/app/components/workflow/header/__tests__/test-run-menu.spec.tsx@@ -5,7 +5,7 @@ import { act } from 'react'import * as React from 'react'import TestRunMenu, { TriggerType } from '../test-run-menu'-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const React = await import('react')const DropdownMenuContext = React.createContext<{ open: boolean, setOpen: (open: boolean) => void } | null>(null)diff --git a/web/app/components/workflow/header/chat-variable-button.tsx b/web/app/components/workflow/header/chat-variable-button.tsxindex 63ac90aad6f..efac64bd1bf 100644--- a/web/app/components/workflow/header/chat-variable-button.tsx+++ b/web/app/components/workflow/header/chat-variable-button.tsx@@ -1,7 +1,7 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { memo } from 'react'import { BubbleX } from '@/app/components/base/icons/src/vender/line/others'-import { Button } from '@/app/components/base/ui/button'import { useStore } from '@/app/components/workflow/store'import useTheme from '@/hooks/use-theme'diff --git a/web/app/components/workflow/header/checklist/__tests__/index.spec.tsx b/web/app/components/workflow/header/checklist/__tests__/index.spec.tsxindex 2c83747dc05..25150e2d04e 100644--- a/web/app/components/workflow/header/checklist/__tests__/index.spec.tsx+++ b/web/app/components/workflow/header/checklist/__tests__/index.spec.tsx@@ -47,7 +47,7 @@ vi.mock('../../../hooks', () => ({}),}))-vi.mock('@/app/components/base/ui/popover', () => ({+vi.mock('@langgenius/dify-ui/popover', () => ({Popover: ({ children, onOpenChange }: PopoverProps) => {latestOnOpenChange = onOpenChangereturn <div data-testid="popover">{children}</div>diff --git a/web/app/components/workflow/header/checklist/__tests__/plugin-group.spec.tsx b/web/app/components/workflow/header/checklist/__tests__/plugin-group.spec.tsxindex 275c8727d1b..78341c21746 100644--- a/web/app/components/workflow/header/checklist/__tests__/plugin-group.spec.tsx+++ b/web/app/components/workflow/header/checklist/__tests__/plugin-group.spec.tsx@@ -1,7 +1,7 @@import type { ChecklistItem } from '../../../hooks/use-checklist'+import { Popover, PopoverContent } from '@langgenius/dify-ui/popover'import { fireEvent, render, screen } from '@testing-library/react'import { beforeEach, describe, expect, it } from 'vitest'-import { Popover, PopoverContent } from '@/app/components/base/ui/popover'import { useStore as usePluginDependencyStore } from '../../../plugin-dependency/store'import { BlockEnum } from '../../../types'import { ChecklistPluginGroup } from '../plugin-group'diff --git a/web/app/components/workflow/header/checklist/index.tsx b/web/app/components/workflow/header/checklist/index.tsxindex 83384c55832..9a54175c8c4 100644--- a/web/app/components/workflow/header/checklist/index.tsx+++ b/web/app/components/workflow/header/checklist/index.tsx@@ -3,6 +3,12 @@ import type {CommonEdgeType,} from '../../types'import { cn } from '@langgenius/dify-ui/cn'+import {+ Popover,+ PopoverClose,+ PopoverContent,+ PopoverTrigger,+} from '@langgenius/dify-ui/popover'import {memo,useMemo,@@ -12,12 +18,6 @@ import { useTranslation } from 'react-i18next'import {useEdges,} from 'reactflow'-import {- Popover,- PopoverClose,- PopoverContent,- PopoverTrigger,-} from '@/app/components/base/ui/popover'import useNodes from '@/app/components/workflow/store/workflow/use-nodes'import {useChecklist,diff --git a/web/app/components/workflow/header/checklist/plugin-group.tsx b/web/app/components/workflow/header/checklist/plugin-group.tsxindex f74b314a10d..91bc385595f 100644--- a/web/app/components/workflow/header/checklist/plugin-group.tsx+++ b/web/app/components/workflow/header/checklist/plugin-group.tsx@@ -1,10 +1,10 @@import type { ChecklistItem } from '../../hooks/use-checklist'import type { BlockEnum } from '../../types'import type { Dependency } from '@/app/components/plugins/types'+import { Button } from '@langgenius/dify-ui/button'+import { PopoverClose } from '@langgenius/dify-ui/popover'import { memo, useMemo } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { PopoverClose } from '@/app/components/base/ui/popover'import BlockIcon from '../../block-icon'import { useStore as usePluginDependencyStore } from '../../plugin-dependency/store'import { ItemIndicator } from './item-indicator'diff --git a/web/app/components/workflow/header/env-button.tsx b/web/app/components/workflow/header/env-button.tsxindex 98ab6ba5379..eec4af84c8e 100644--- a/web/app/components/workflow/header/env-button.tsx+++ b/web/app/components/workflow/header/env-button.tsx@@ -1,7 +1,7 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { memo } from 'react'import { Env } from '@/app/components/base/icons/src/vender/line/others'-import { Button } from '@/app/components/base/ui/button'import { useInputFieldPanel } from '@/app/components/rag-pipeline/hooks'import { useStore } from '@/app/components/workflow/store'import useTheme from '@/hooks/use-theme'diff --git a/web/app/components/workflow/header/global-variable-button.tsx b/web/app/components/workflow/header/global-variable-button.tsxindex 63a4a427b60..f42677a3dfd 100644--- a/web/app/components/workflow/header/global-variable-button.tsx+++ b/web/app/components/workflow/header/global-variable-button.tsx@@ -1,7 +1,7 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { memo } from 'react'import { GlobalVariable } from '@/app/components/base/icons/src/vender/line/others'-import { Button } from '@/app/components/base/ui/button'import { useInputFieldPanel } from '@/app/components/rag-pipeline/hooks'import { useStore } from '@/app/components/workflow/store'import useTheme from '@/hooks/use-theme'diff --git a/web/app/components/workflow/header/header-in-restoring.tsx b/web/app/components/workflow/header/header-in-restoring.tsxindex e6ad4123ed9..f07d28ff133 100644--- a/web/app/components/workflow/header/header-in-restoring.tsx+++ b/web/app/components/workflow/header/header-in-restoring.tsx@@ -1,12 +1,12 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiHistoryLine } from '@remixicon/react'import {useCallback,} from 'react'import { useTranslation } from 'react-i18next'import { useFeaturesStore } from '@/app/components/base/features/hooks'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useSelector as useAppContextSelector } from '@/context/app-context'import useTheme from '@/hooks/use-theme'import { useInvalidAllLastRun } from '@/service/use-workflow'diff --git a/web/app/components/workflow/header/header-in-view-history.tsx b/web/app/components/workflow/header/header-in-view-history.tsxindex cd39ce605a5..88077002c79 100644--- a/web/app/components/workflow/header/header-in-view-history.tsx+++ b/web/app/components/workflow/header/header-in-view-history.tsx@@ -1,10 +1,10 @@import type { ViewHistoryProps } from './view-history'+import { Button } from '@langgenius/dify-ui/button'import {useCallback,} from 'react'import { useTranslation } from 'react-i18next'import { ArrowNarrowLeft } from '@/app/components/base/icons/src/vender/line/arrows'-import { Button } from '@/app/components/base/ui/button'import Divider from '../../base/divider'import {useWorkflowRun,diff --git a/web/app/components/workflow/header/online-users.tsx b/web/app/components/workflow/header/online-users.tsxindex cce2af0cdc9..0f057f0787e 100644--- a/web/app/components/workflow/header/online-users.tsx+++ b/web/app/components/workflow/header/online-users.tsx@@ -1,17 +1,17 @@'use client'import type { OnlineUser } from '../collaboration/types/collaboration'import { ChevronDownIcon } from '@heroicons/react/20/solid'+import { AvatarFallback, AvatarImage, AvatarRoot } from '@langgenius/dify-ui/avatar'import { cn } from '@langgenius/dify-ui/cn'-import { useEffect, useState } from 'react'-import { useTranslation } from 'react-i18next'-import { useReactFlow } from 'reactflow'-import { AvatarFallback, AvatarImage, AvatarRoot } from '@/app/components/base/ui/avatar'import {Popover,PopoverContent,PopoverTrigger,-} from '@/app/components/base/ui/popover'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'+} from '@langgenius/dify-ui/popover'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'+import { useEffect, useState } from 'react'+import { useTranslation } from 'react-i18next'+import { useReactFlow } from 'reactflow'import { useAppContext } from '@/context/app-context'import { getAvatar } from '@/service/common'import { useCollaboration } from '../collaboration/hooks/use-collaboration'diff --git a/web/app/components/workflow/header/run-mode.tsx b/web/app/components/workflow/header/run-mode.tsxindex d98b4d6b185..923f6f0330c 100644--- a/web/app/components/workflow/header/run-mode.tsx+++ b/web/app/components/workflow/header/run-mode.tsx@@ -1,12 +1,12 @@import type { TestRunMenuRef, TriggerOption } from './test-run-menu'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiLoader2Line, RiPlayLargeLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useEffect, useRef } from 'react'import { useTranslation } from 'react-i18next'import { trackEvent } from '@/app/components/base/amplitude'import { StopCircle } from '@/app/components/base/icons/src/vender/line/mediaAndDevices'-import { toast } from '@/app/components/base/ui/toast'import { useWorkflowRun, useWorkflowRunValidation, useWorkflowStartRun } from '@/app/components/workflow/hooks'import ShortcutsName from '@/app/components/workflow/shortcuts-name'import { useStore } from '@/app/components/workflow/store'diff --git a/web/app/components/workflow/header/test-run-menu-helpers.tsx b/web/app/components/workflow/header/test-run-menu-helpers.tsxindex 4a25cd87a64..9f14190c540 100644--- a/web/app/components/workflow/header/test-run-menu-helpers.tsx+++ b/web/app/components/workflow/header/test-run-menu-helpers.tsx@@ -1,12 +1,12 @@/* eslint-disable react-refresh/only-export-components */import type { MouseEvent, MouseEventHandler, ReactElement } from 'react'import type { TriggerOption } from './test-run-menu'+import { DropdownMenuItem } from '@langgenius/dify-ui/dropdown-menu'import {cloneElement,isValidElement,useEffect,} from 'react'-import { DropdownMenuItem } from '@/app/components/base/ui/dropdown-menu'import ShortcutsName from '../shortcuts-name'export type ShortcutMapping = {diff --git a/web/app/components/workflow/header/test-run-menu.tsx b/web/app/components/workflow/header/test-run-menu.tsxindex 6540875e6b2..ceaf38592fb 100644--- a/web/app/components/workflow/header/test-run-menu.tsx+++ b/web/app/components/workflow/header/test-run-menu.tsx@@ -1,7 +1,7 @@import type { ShortcutMapping } from './test-run-menu-helpers'+import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '@langgenius/dify-ui/dropdown-menu'import { forwardRef, useCallback, useImperativeHandle, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'-import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '@/app/components/base/ui/dropdown-menu'import { OptionRow, SingleOptionTrigger, useShortcutMenu } from './test-run-menu-helpers'export enum TriggerType {diff --git a/web/app/components/workflow/header/version-history-button.tsx b/web/app/components/workflow/header/version-history-button.tsxindex ef79c4e4113..69dc2b4c4cd 100644--- a/web/app/components/workflow/header/version-history-button.tsx+++ b/web/app/components/workflow/header/version-history-button.tsx@@ -1,11 +1,11 @@import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiHistoryLine } from '@remixicon/react'import { useKeyPress } from 'ahooks'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import useTheme from '@/hooks/use-theme'import Tooltip from '../../base/tooltip'import ShortcutsName from '../shortcuts-name'diff --git a/web/app/components/workflow/hooks/__tests__/use-checklist.spec.ts b/web/app/components/workflow/hooks/__tests__/use-checklist.spec.tsindex 891007ff0e4..f6d2774611e 100644--- a/web/app/components/workflow/hooks/__tests__/use-checklist.spec.ts+++ b/web/app/components/workflow/hooks/__tests__/use-checklist.spec.ts@@ -89,7 +89,7 @@ vi.mock('../index', () => ({useNodesMetaData: () => ({ nodes: [], nodesMap: mockNodesMap }),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/hooks/__tests__/use-leader-restore.spec.ts b/web/app/components/workflow/hooks/__tests__/use-leader-restore.spec.tsindex 5837f1484d0..a050994f4c4 100644--- a/web/app/components/workflow/hooks/__tests__/use-leader-restore.spec.ts+++ b/web/app/components/workflow/hooks/__tests__/use-leader-restore.spec.ts@@ -66,7 +66,7 @@ vi.mock('@/app/components/base/features/hooks', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {info: (...args: unknown[]) => mockToastInfo(...args),},diff --git a/web/app/components/workflow/hooks/use-checklist.ts b/web/app/components/workflow/hooks/use-checklist.tsindex abafcfd8ebf..ae9cc0a4a27 100644--- a/web/app/components/workflow/hooks/use-checklist.ts+++ b/web/app/components/workflow/hooks/use-checklist.ts@@ -16,6 +16,7 @@ import type { ModelItem } from '@/app/components/header/account-setting/model-primport type { Emoji } from '@/app/components/tools/types'import type { DataSet } from '@/models/datasets'import type { I18nKeysWithPrefix } from '@/types/i18n'+import { toast } from '@langgenius/dify-ui/toast'import { useQueries, useQueryClient } from '@tanstack/react-query'import isDeepEqual from 'fast-deep-equal'import {@@ -27,7 +28,6 @@ import {import { useTranslation } from 'react-i18next'import { useEdges, useStoreApi } from 'reactflow'import { useStore as useAppStore } from '@/app/components/app/store'-import { toast } from '@/app/components/base/ui/toast'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useModelList } from '@/app/components/header/account-setting/model-provider-page/hooks'import useNodes from '@/app/components/workflow/store/workflow/use-nodes'diff --git a/web/app/components/workflow/hooks/use-leader-restore.ts b/web/app/components/workflow/hooks/use-leader-restore.tsindex 048bb932e05..da0036a4ea3 100644--- a/web/app/components/workflow/hooks/use-leader-restore.ts+++ b/web/app/components/workflow/hooks/use-leader-restore.ts@@ -1,11 +1,11 @@import type { RestoreCompleteData, RestoreIntentData, RestoreRequestData } from '../collaboration/types/collaboration'import type { SyncCallback } from './use-nodes-sync-draft'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useRef } from 'react'import { useTranslation } from 'react-i18next'import { useReactFlow } from 'reactflow'import { useStore as useAppStore } from '@/app/components/app/store'import { useFeaturesStore } from '@/app/components/base/features/hooks'-import { toast } from '@/app/components/base/ui/toast'import { useGlobalPublicStore } from '@/context/global-public-context'import { collaborationManager } from '../collaboration/core/collaboration-manager'import { useWorkflowStore } from '../store'diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsxindex 12122c5b72f..c535196691f 100644--- a/web/app/components/workflow/index.tsx+++ b/web/app/components/workflow/index.tsx@@ -14,7 +14,17 @@ import type {Node,} from './types'import type { VarInInspect } from '@/types/workflow'+import {+ AlertDialog,+ AlertDialogActions,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogTitle,+} from '@langgenius/dify-ui/alert-dialog'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {useEventListener,} from 'ahooks'@@ -41,16 +51,6 @@ import ReactFlow, {useReactFlow,useStoreApi,} from 'reactflow'-import {- AlertDialog,- AlertDialogActions,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'-import { toast } from '@/app/components/base/ui/toast'import { IS_DEV } from '@/config'import { useEventEmitterContextContext } from '@/context/event-emitter'import {diff --git a/web/app/components/workflow/nodes/_base/components/__tests__/file-support.spec.tsx b/web/app/components/workflow/nodes/_base/components/__tests__/file-support.spec.tsxindex b58b045f920..1a3e004c7e9 100644--- a/web/app/components/workflow/nodes/_base/components/__tests__/file-support.spec.tsx+++ b/web/app/components/workflow/nodes/_base/components/__tests__/file-support.spec.tsx@@ -19,7 +19,7 @@ vi.mock('@/app/components/base/file-uploader/hooks', () => ({useFileSizeLimit: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/nodes/_base/components/add-button.tsx b/web/app/components/workflow/nodes/_base/components/add-button.tsxindex cd32ee0dc6f..d64ab5d0982 100644--- a/web/app/components/workflow/nodes/_base/components/add-button.tsx+++ b/web/app/components/workflow/nodes/_base/components/add-button.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiAddLine,} from '@remixicon/react'import * as React from 'react'-import { Button } from '@/app/components/base/ui/button'type Props = {className?: stringdiff --git a/web/app/components/workflow/nodes/_base/components/agent-strategy.tsx b/web/app/components/workflow/nodes/_base/components/agent-strategy.tsxindex d13488a0b9d..d20acd7f197 100644--- a/web/app/components/workflow/nodes/_base/components/agent-strategy.tsx+++ b/web/app/components/workflow/nodes/_base/components/agent-strategy.tsx@@ -4,11 +4,6 @@ import type { NodeOutPutVar } from '../../../types'import type { ToolVarInputs } from '../../tool/types'import type { CredentialFormSchema, CredentialFormSchemaNumberInput, CredentialFormSchemaTextInput } from '@/app/components/header/account-setting/model-provider-page/declarations'import type { PluginMeta } from '@/app/components/plugins/types'-import { noop } from 'es-toolkit/function'-import { memo } from 'react'-import { useTranslation } from 'react-i18next'-import { Agent } from '@/app/components/base/icons/src/vender/workflow'-import ListEmpty from '@/app/components/base/list-empty'import {NumberField,NumberFieldControls,@@ -16,8 +11,13 @@ import {NumberFieldGroup,NumberFieldIncrement,NumberFieldInput,-} from '@/app/components/base/ui/number-field'-import { Slider } from '@/app/components/base/ui/slider'+} from '@langgenius/dify-ui/number-field'+import { Slider } from '@langgenius/dify-ui/slider'+import { noop } from 'es-toolkit/function'+import { memo } from 'react'+import { useTranslation } from 'react-i18next'+import { Agent } from '@/app/components/base/icons/src/vender/workflow'+import ListEmpty from '@/app/components/base/list-empty'import { FormTypeEnum, ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useDefaultModel } from '@/app/components/header/account-setting/model-provider-page/hooks'import Form from '@/app/components/header/account-setting/model-provider-page/model-modal/Form'diff --git a/web/app/components/workflow/nodes/_base/components/before-run-form/__tests__/index.spec.tsx b/web/app/components/workflow/nodes/_base/components/before-run-form/__tests__/index.spec.tsxindex a8837f6392a..39b9fd88882 100644--- a/web/app/components/workflow/nodes/_base/components/before-run-form/__tests__/index.spec.tsx+++ b/web/app/components/workflow/nodes/_base/components/before-run-form/__tests__/index.spec.tsx@@ -1,11 +1,11 @@import type { Props as FormProps } from '../form'import type { BeforeRunFormProps } from '../index'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'-import { toast } from '@/app/components/base/ui/toast'import { BlockEnum, InputVarType } from '@/app/components/workflow/types'import BeforeRunForm from '../index'-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: vi.fn(),},diff --git a/web/app/components/workflow/nodes/_base/components/before-run-form/index.tsx b/web/app/components/workflow/nodes/_base/components/before-run-form/index.tsxindex f42046a2ad8..f15c60e1179 100644--- a/web/app/components/workflow/nodes/_base/components/before-run-form/index.tsx+++ b/web/app/components/workflow/nodes/_base/components/before-run-form/index.tsx@@ -5,12 +5,12 @@ import type { Emoji } from '@/app/components/tools/types'import type { SpecialResultPanelProps } from '@/app/components/workflow/run/special-result-panel'import type { NodeRunningStatus } from '@/app/components/workflow/types'import type { HumanInputFormData } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useEffect, useRef } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Split from '@/app/components/workflow/nodes/_base/components/split'import SingleRunForm from '@/app/components/workflow/nodes/human-input/components/single-run-form'import { BlockEnum } from '@/app/components/workflow/types'diff --git a/web/app/components/workflow/nodes/_base/components/config-vision.tsx b/web/app/components/workflow/nodes/_base/components/config-vision.tsxindex 109650cf515..d21e53368dd 100644--- a/web/app/components/workflow/nodes/_base/components/config-vision.tsx+++ b/web/app/components/workflow/nodes/_base/components/config-vision.tsx@@ -1,11 +1,11 @@'use client'import type { FC } from 'react'import type { ValueSelector, Var, VisionSetting } from '@/app/components/workflow/types'+import { Switch } from '@langgenius/dify-ui/switch'import { produce } from 'immer'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import Field from '@/app/components/workflow/nodes/_base/components/field'import ResolutionPicker from '@/app/components/workflow/nodes/llm/components/resolution-picker'diff --git a/web/app/components/workflow/nodes/_base/components/error-handle/error-handle-type-selector.tsx b/web/app/components/workflow/nodes/_base/components/error-handle/error-handle-type-selector.tsxindex 92ca3ed3357..07b6519e41a 100644--- a/web/app/components/workflow/nodes/_base/components/error-handle/error-handle-type-selector.tsx+++ b/web/app/components/workflow/nodes/_base/components/error-handle/error-handle-type-selector.tsx@@ -1,3 +1,4 @@+import { Button } from '@langgenius/dify-ui/button'import {RiArrowDownSLine,RiCheckLine,@@ -9,7 +10,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import { ErrorHandleTypeEnum } from './types'type ErrorHandleTypeSelectorProps = {diff --git a/web/app/components/workflow/nodes/_base/components/input-number-with-slider.tsx b/web/app/components/workflow/nodes/_base/components/input-number-with-slider.tsxindex 4e253060d64..08afb50b807 100644--- a/web/app/components/workflow/nodes/_base/components/input-number-with-slider.tsx+++ b/web/app/components/workflow/nodes/_base/components/input-number-with-slider.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'+import { Slider } from '@langgenius/dify-ui/slider'import * as React from 'react'import { useCallback } from 'react'-import { Slider } from '@/app/components/base/ui/slider'export type InputNumberWithSliderProps = {value: numberdiff --git a/web/app/components/workflow/nodes/_base/components/install-plugin-button.tsx b/web/app/components/workflow/nodes/_base/components/install-plugin-button.tsxindex f6e5434a2d5..dd2611b395b 100644--- a/web/app/components/workflow/nodes/_base/components/install-plugin-button.tsx+++ b/web/app/components/workflow/nodes/_base/components/install-plugin-button.tsx@@ -1,9 +1,9 @@import type { ComponentProps, MouseEventHandler } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiInstallLine, RiLoader2Line } from '@remixicon/react'import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import checkTaskStatus from '@/app/components/plugins/install-plugin/base/check-task-status'import { TaskStatus } from '@/app/components/plugins/types'import { useCheckInstalled, useInstallPackageFromMarketPlace } from '@/service/use-plugins'diff --git a/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx b/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsxindex abd630cccb9..c11b5ecfc8e 100644--- a/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx+++ b/web/app/components/workflow/nodes/_base/components/layout/__tests__/field-title.spec.tsx@@ -1,7 +1,7 @@import { fireEvent, render, screen } from '@testing-library/react'import { FieldTitle } from '../field-title'-vi.mock('@/app/components/base/ui/tooltip', () => ({+vi.mock('@langgenius/dify-ui/tooltip', () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,TooltipTrigger: ({ render }: { render: React.ReactNode }) => <>{render}</>,TooltipContent: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,diff --git a/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx b/web/app/components/workflow/nodes/_base/components/layout/field-title.tsxindex 5a478c25d3e..205e75bf671 100644--- a/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx+++ b/web/app/components/workflow/nodes/_base/components/layout/field-title.tsx@@ -1,10 +1,10 @@import type { ReactNode } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import {memo,useState,} from 'react'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'export type FieldTitleProps = {title?: stringdiff --git a/web/app/components/workflow/nodes/_base/components/memory-config.tsx b/web/app/components/workflow/nodes/_base/components/memory-config.tsxindex 15254ad4f47..ed193490a58 100644--- a/web/app/components/workflow/nodes/_base/components/memory-config.tsx+++ b/web/app/components/workflow/nodes/_base/components/memory-config.tsx@@ -2,13 +2,13 @@import type { FC } from 'react'import type { Memory } from '../../../types'import { cn } from '@langgenius/dify-ui/cn'+import { Slider } from '@langgenius/dify-ui/slider'+import { Switch } from '@langgenius/dify-ui/switch'import { produce } from 'immer'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import Switch from '@/app/components/base/switch'-import { Slider } from '@/app/components/base/ui/slider'import Field from '@/app/components/workflow/nodes/_base/components/field'import { MemoryRole } from '../../../types'diff --git a/web/app/components/workflow/nodes/_base/components/next-step/__tests__/operator.spec.tsx b/web/app/components/workflow/nodes/_base/components/next-step/__tests__/operator.spec.tsxindex 9afa29642d0..62cf571ae0a 100644--- a/web/app/components/workflow/nodes/_base/components/next-step/__tests__/operator.spec.tsx+++ b/web/app/components/workflow/nodes/_base/components/next-step/__tests__/operator.spec.tsx@@ -18,7 +18,7 @@ vi.mock('react-i18next', () => ({}),}))-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const React = await import('react')const DropdownMenuContext = React.createContext<{ open: boolean, setOpen: (open: boolean) => void } | null>(null)@@ -49,7 +49,7 @@ vi.mock('@/app/components/base/ui/dropdown-menu', async () => {}})-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, className }: { children: ReactNode, className?: string }) => (<button type="button" className={className}>{children}diff --git a/web/app/components/workflow/nodes/_base/components/next-step/item.tsx b/web/app/components/workflow/nodes/_base/components/next-step/item.tsxindex eca48d85fd8..aabb3e6ce1c 100644--- a/web/app/components/workflow/nodes/_base/components/next-step/item.tsx+++ b/web/app/components/workflow/nodes/_base/components/next-step/item.tsx@@ -1,6 +1,7 @@import type {CommonNodeType,} from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {memo,@@ -8,7 +9,6 @@ import {useState,} from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import BlockIcon from '@/app/components/workflow/block-icon'import {useNodesInteractions,diff --git a/web/app/components/workflow/nodes/_base/components/next-step/operator.tsx b/web/app/components/workflow/nodes/_base/components/next-step/operator.tsxindex c0a4f0b5374..2dd45bbe3c8 100644--- a/web/app/components/workflow/nodes/_base/components/next-step/operator.tsx+++ b/web/app/components/workflow/nodes/_base/components/next-step/operator.tsx@@ -2,17 +2,17 @@ import type {CommonNodeType,OnSelectBlock,} from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import { intersection } from 'es-toolkit/array'import {useCallback,} from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import BlockSelector from '@/app/components/workflow/block-selector'import {useAvailableBlocks,diff --git a/web/app/components/workflow/nodes/_base/components/node-control.tsx b/web/app/components/workflow/nodes/_base/components/node-control.tsxindex 547d0b1daa0..4f2980186d6 100644--- a/web/app/components/workflow/nodes/_base/components/node-control.tsx+++ b/web/app/components/workflow/nodes/_base/components/node-control.tsx@@ -1,5 +1,10 @@import type { FC } from 'react'import type { Node } from '../../../types'+import {+ Tooltip,+ TooltipContent,+ TooltipTrigger,+} from '@langgenius/dify-ui/tooltip'import {memo,useCallback,@@ -9,11 +14,6 @@ import { useTranslation } from 'react-i18next'import {Stop,} from '@/app/components/base/icons/src/vender/line/mediaAndDevices'-import {- Tooltip,- TooltipContent,- TooltipTrigger,-} from '@/app/components/base/ui/tooltip'import { useWorkflowStore } from '@/app/components/workflow/store'import {useNodesInteractions,diff --git a/web/app/components/workflow/nodes/_base/components/panel-operator/index.tsx b/web/app/components/workflow/nodes/_base/components/panel-operator/index.tsxindex 7b3469aabaf..32b91ca1eee 100644--- a/web/app/components/workflow/nodes/_base/components/panel-operator/index.tsx+++ b/web/app/components/workflow/nodes/_base/components/panel-operator/index.tsx@@ -1,17 +1,17 @@import type { OffsetOptions } from '@floating-ui/react'import type { Node } from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import {memo,useCallback,useState,} from 'react'import { useTranslation } from 'react-i18next'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import PanelOperatorPopup from './panel-operator-popup'type PanelOperatorProps = {diff --git a/web/app/components/workflow/nodes/_base/components/prompt/editor.tsx b/web/app/components/workflow/nodes/_base/components/prompt/editor.tsxindex bf153b273e3..eab359b00b5 100644--- a/web/app/components/workflow/nodes/_base/components/prompt/editor.tsx+++ b/web/app/components/workflow/nodes/_base/components/prompt/editor.tsx@@ -7,6 +7,7 @@ import type {Variable,} from '../../../../types'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import {RiDeleteBinLine,} from '@remixicon/react'@@ -14,8 +15,8 @@ import { useBoolean } from 'ahooks'import copy from 'copy-to-clipboard'import * as React from 'react'import { useCallback, useRef } from 'react'-import { useTranslation } from 'react-i18next'+import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import {Copy,@@ -25,7 +26,6 @@ import { Variable02 } from '@/app/components/base/icons/src/vender/solid/developimport { Jinja } from '@/app/components/base/icons/src/vender/workflow'import PromptEditor from '@/app/components/base/prompt-editor'import { PROMPT_EDITOR_INSERT_QUICKLY } from '@/app/components/base/prompt-editor/plugins/update-block'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import { useWorkflowVariableType } from '@/app/components/workflow/hooks'import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor/editor-support-vars'diff --git a/web/app/components/workflow/nodes/_base/components/remove-effect-var-confirm.tsx b/web/app/components/workflow/nodes/_base/components/remove-effect-var-confirm.tsxindex a3c4e5b0adf..6ae65da1ae6 100644--- a/web/app/components/workflow/nodes/_base/components/remove-effect-var-confirm.tsx+++ b/web/app/components/workflow/nodes/_base/components/remove-effect-var-confirm.tsx@@ -1,7 +1,5 @@'use client'import type { FC } from 'react'-import * as React from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -10,7 +8,9 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import * as React from 'react'+import { useTranslation } from 'react-i18next'type Props = {isShow: booleandiff --git a/web/app/components/workflow/nodes/_base/components/retry/retry-on-panel.tsx b/web/app/components/workflow/nodes/_base/components/retry/retry-on-panel.tsxindex c80c69a7574..7a32d05ae18 100644--- a/web/app/components/workflow/nodes/_base/components/retry/retry-on-panel.tsx+++ b/web/app/components/workflow/nodes/_base/components/retry/retry-on-panel.tsx@@ -1,10 +1,10 @@import type {Node,} from '@/app/components/workflow/types'+import { Slider } from '@langgenius/dify-ui/slider'+import { Switch } from '@langgenius/dify-ui/switch'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import Switch from '@/app/components/base/switch'-import { Slider } from '@/app/components/base/ui/slider'import Split from '@/app/components/workflow/nodes/_base/components/split'import { useRetryConfig } from './hooks'import s from './style.module.css'diff --git a/web/app/components/workflow/nodes/_base/components/variable/__tests__/output-var-list.spec.tsx b/web/app/components/workflow/nodes/_base/components/variable/__tests__/output-var-list.spec.tsxindex e83fee6c551..97b6e52ddca 100644--- a/web/app/components/workflow/nodes/_base/components/variable/__tests__/output-var-list.spec.tsx+++ b/web/app/components/workflow/nodes/_base/components/variable/__tests__/output-var-list.spec.tsx@@ -16,7 +16,7 @@ vi.mock('../var-type-picker', () => ({),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: { error: vi.fn() },}))diff --git a/web/app/components/workflow/nodes/_base/components/variable/output-var-list.tsx b/web/app/components/workflow/nodes/_base/components/variable/output-var-list.tsxindex a80d0b1ee21..a4bbe9a6eb2 100644--- a/web/app/components/workflow/nodes/_base/components/variable/output-var-list.tsx+++ b/web/app/components/workflow/nodes/_base/components/variable/output-var-list.tsx@@ -2,13 +2,13 @@import type { FC } from 'react'import type { OutputVar } from '../../../code/types'import type { VarType } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import { useDebounceFn } from 'ahooks'import { produce } from 'immer'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { toast } from '@/app/components/base/ui/toast'import { checkKeys, replaceSpaceWithUnderscoreInVarNameInput } from '@/utils/var'import RemoveButton from '../remove-button'import VarTypePicker from './var-type-picker'diff --git a/web/app/components/workflow/nodes/_base/components/variable/var-list.tsx b/web/app/components/workflow/nodes/_base/components/variable/var-list.tsxindex b8ec03eb935..3b1aafcdf4f 100644--- a/web/app/components/workflow/nodes/_base/components/variable/var-list.tsx+++ b/web/app/components/workflow/nodes/_base/components/variable/var-list.tsx@@ -2,6 +2,7 @@import type { FC } from 'react'import type { ValueSelector, Var, Variable } from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiDraggable } from '@remixicon/react'import { useDebounceFn } from 'ahooks'import { produce } from 'immer'@@ -11,7 +12,6 @@ import { useTranslation } from 'react-i18next'import { ReactSortable } from 'react-sortablejs'import { v4 as uuid4 } from 'uuid'import Input from '@/app/components/base/input'-import { toast } from '@/app/components/base/ui/toast'import { VarType as VarKindType } from '@/app/components/workflow/nodes/tool/types'import { checkKeys, replaceSpaceWithUnderscoreInVarNameInput } from '@/utils/var'import RemoveButton from '../remove-button'diff --git a/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.trigger.tsx b/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.trigger.tsxindex e29c5828380..8c461186157 100644--- a/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.trigger.tsx+++ b/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.trigger.tsx@@ -7,11 +7,11 @@ import type { Tool } from '@/app/components/tools/types'import type { TriggerWithProvider } from '@/app/components/workflow/block-selector/types'import type { Node, ToolWithProvider, ValueSelector, Var } from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { RiArrowDownSLine, RiCloseLine, RiErrorWarningFill, RiLoader4Line, RiMoreLine } from '@remixicon/react'import Badge from '@/app/components/base/badge'import { Line3 } from '@/app/components/base/icons/src/public/common'import { Variable02 } from '@/app/components/base/icons/src/vender/solid/development'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { VarBlockIcon } from '@/app/components/workflow/block-icon'import TypeSelector from '@/app/components/workflow/nodes/_base/components/selector'import { VariableIconWithColor } from '@/app/components/workflow/nodes/_base/components/variable/variable-label'diff --git a/web/app/components/workflow/nodes/_base/components/variable/variable-label/base/variable-label.tsx b/web/app/components/workflow/nodes/_base/components/variable/variable-label/base/variable-label.tsxindex 6ee0d63830e..3690cbf5087 100644--- a/web/app/components/workflow/nodes/_base/components/variable/variable-label/base/variable-label.tsx+++ b/web/app/components/workflow/nodes/_base/components/variable/variable-label/base/variable-label.tsx@@ -1,9 +1,9 @@import type { VariablePayload } from '../types'import { cn } from '@langgenius/dify-ui/cn'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { capitalize } from 'es-toolkit/string'import { memo } from 'react'import { Warning } from '@/app/components/base/icons/src/vender/line/alertsAndFeedback'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import { isConversationVar, isENV, isGlobalVar, isRagVariableVar } from '../../utils'import { useVarColor } from '../hooks'import VariableIcon from './variable-icon'diff --git a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/no-data.tsx b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/no-data.tsxindex 6237cb6f0f5..fd67856369a 100644--- a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/no-data.tsx+++ b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/no-data.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { RiPlayLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'import { ClockPlay } from '@/app/components/base/icons/src/vender/line/time'-import { Button } from '@/app/components/base/ui/button'type Props = {canSingleRun: booleandiff --git a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.tsindex b1efe258dfb..0a7263fafd6 100644--- a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts+++ b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts@@ -2,8 +2,8 @@ import type { Props as FormProps } from '@/app/components/workflow/nodes/_base/cimport type { Params as OneStepRunParams } from '@/app/components/workflow/nodes/_base/hooks/use-one-step-run'// importimport type { CommonNodeType, ValueSelector } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useState } from 'react'-import { toast } from '@/app/components/base/ui/toast'import {useNodesSyncDraft,} from '@/app/components/workflow/hooks'diff --git a/web/app/components/workflow/nodes/_base/hooks/use-one-step-run.ts b/web/app/components/workflow/nodes/_base/hooks/use-one-step-run.tsindex a05c765a8e8..a455ea480a5 100644--- a/web/app/components/workflow/nodes/_base/hooks/use-one-step-run.ts+++ b/web/app/components/workflow/nodes/_base/hooks/use-one-step-run.ts@@ -1,10 +1,11 @@import type { CommonNodeType, InputVar, TriggerNodeType, ValueSelector, Var, Variable } from '@/app/components/workflow/types'import type { FlowType } from '@/types/common'import type { NodeRunResult, NodeTracing } from '@/types/workflow'+import { toast } from '@langgenius/dify-ui/toast'import { unionBy } from 'es-toolkit/compat'import { noop } from 'es-toolkit/function'-import { produce } from 'immer'+import { produce } from 'immer'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import {@@ -12,7 +13,6 @@ import {} from 'reactflow'import { trackEvent } from '@/app/components/base/amplitude'import { getInputVars as doGetInputVars } from '@/app/components/base/prompt-editor/constants'-import { toast } from '@/app/components/base/ui/toast'import {useIsChatMode,useNodeDataUpdate,diff --git a/web/app/components/workflow/nodes/_base/node-sections.tsx b/web/app/components/workflow/nodes/_base/node-sections.tsxindex 891f17eb504..a3653621233 100644--- a/web/app/components/workflow/nodes/_base/node-sections.tsx+++ b/web/app/components/workflow/nodes/_base/node-sections.tsx@@ -2,7 +2,7 @@ import type { TFunction } from 'i18next'import type { ReactElement } from 'react'import type { IterationNodeType } from '@/app/components/workflow/nodes/iteration/types'import type { NodeProps } from '@/app/components/workflow/types'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { BlockEnum, NodeRunningStatus } from '@/app/components/workflow/types'type HeaderMetaProps = {diff --git a/web/app/components/workflow/nodes/assigner/components/__tests__/operation-selector.spec.tsx b/web/app/components/workflow/nodes/assigner/components/__tests__/operation-selector.spec.tsxindex e29b1e42a34..937c7aed9ca 100644--- a/web/app/components/workflow/nodes/assigner/components/__tests__/operation-selector.spec.tsx+++ b/web/app/components/workflow/nodes/assigner/components/__tests__/operation-selector.spec.tsx@@ -4,7 +4,7 @@ import { VarType } from '@/app/components/workflow/types'import { WriteMode } from '../../types'import OperationSelector from '../operation-selector'-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const React = await import('react')const DropdownMenuContext = React.createContext<{ open: boolean, setOpen: (open: boolean) => void } | null>(null)diff --git a/web/app/components/workflow/nodes/assigner/components/operation-selector.tsx b/web/app/components/workflow/nodes/assigner/components/operation-selector.tsxindex a22b8f5f3f2..69fb618d16e 100644--- a/web/app/components/workflow/nodes/assigner/components/operation-selector.tsx+++ b/web/app/components/workflow/nodes/assigner/components/operation-selector.tsx@@ -3,8 +3,6 @@ import type { WriteMode } from '../types'import type { Item } from '../utils'import type { VarType } from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'-import { useState } from 'react'-import { useTranslation } from 'react-i18next'import {DropdownMenu,DropdownMenuContent,@@ -13,7 +11,9 @@ import {DropdownMenuLabel,DropdownMenuSeparator,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { useState } from 'react'+import { useTranslation } from 'react-i18next'import { getOperationItems, isOperationItem } from '../utils'type OperationSelectorProps = {diff --git a/web/app/components/workflow/nodes/code/panel.tsx b/web/app/components/workflow/nodes/code/panel.tsxindex 9358507173d..b531dcf49c1 100644--- a/web/app/components/workflow/nodes/code/panel.tsx+++ b/web/app/components/workflow/nodes/code/panel.tsx@@ -1,9 +1,9 @@import type { FC } from 'react'import type { CodeNodeType } from './types'import type { NodePanelProps } from '@/app/components/workflow/types'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'import Field from '@/app/components/workflow/nodes/_base/components/field'import TypeSelector from '@/app/components/workflow/nodes/_base/components/selector'diff --git a/web/app/components/workflow/nodes/data-source-empty/index.tsx b/web/app/components/workflow/nodes/data-source-empty/index.tsxindex a3248b35453..d3f9d212252 100644--- a/web/app/components/workflow/nodes/data-source-empty/index.tsx+++ b/web/app/components/workflow/nodes/data-source-empty/index.tsx@@ -1,4 +1,5 @@import type { NodeProps } from 'reactflow'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiAddLine } from '@remixicon/react'import {@@ -6,7 +7,6 @@ import {useCallback,} from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import BlockSelector from '@/app/components/workflow/block-selector'import { useReplaceDataSourceNode } from './hooks'diff --git a/web/app/components/workflow/nodes/data-source/before-run-form.tsx b/web/app/components/workflow/nodes/data-source/before-run-form.tsxindex 677418048fe..fd6d805d0eb 100644--- a/web/app/components/workflow/nodes/data-source/before-run-form.tsx+++ b/web/app/components/workflow/nodes/data-source/before-run-form.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'import type { CustomRunFormProps } from './types'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import LocalFile from '@/app/components/datasets/documents/create-from-pipeline/data-source/local-file'import OnlineDocuments from '@/app/components/datasets/documents/create-from-pipeline/data-source/online-documents'import OnlineDrive from '@/app/components/datasets/documents/create-from-pipeline/data-source/online-drive'diff --git a/web/app/components/workflow/nodes/http/components/__tests__/curl-panel.spec.tsx b/web/app/components/workflow/nodes/http/components/__tests__/curl-panel.spec.tsxindex f42e98f6050..141f8fd5f9d 100644--- a/web/app/components/workflow/nodes/http/components/__tests__/curl-panel.spec.tsx+++ b/web/app/components/workflow/nodes/http/components/__tests__/curl-panel.spec.tsx@@ -1,6 +1,6 @@+import { toast } from '@langgenius/dify-ui/toast'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { toast } from '@/app/components/base/ui/toast'import { BodyPayloadValueType, BodyType } from '../../types'import CurlPanel from '../curl-panel'import * as curlParser from '../curl-parser'@@ -19,7 +19,7 @@ vi.mock('@/app/components/workflow/hooks', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,},diff --git a/web/app/components/workflow/nodes/http/components/authorization/index.tsx b/web/app/components/workflow/nodes/http/components/authorization/index.tsxindex f44cbe6025b..b72e52911d0 100644--- a/web/app/components/workflow/nodes/http/components/authorization/index.tsx+++ b/web/app/components/workflow/nodes/http/components/authorization/index.tsx@@ -2,6 +2,7 @@import type { FC } from 'react'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 { produce } from 'immer'import * as React from 'react'@@ -9,7 +10,6 @@ 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 { Button } from '@/app/components/base/ui/button'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'diff --git a/web/app/components/workflow/nodes/http/components/curl-panel.tsx b/web/app/components/workflow/nodes/http/components/curl-panel.tsxindex ef1b28095cd..8ba5fb36a90 100644--- a/web/app/components/workflow/nodes/http/components/curl-panel.tsx+++ b/web/app/components/workflow/nodes/http/components/curl-panel.tsx@@ -1,13 +1,13 @@'use client'import type { FC } from 'react'import type { HttpNodeType } from '../types'+import { Button } from '@langgenius/dify-ui/button'+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 { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useNodesInteractions } from '@/app/components/workflow/hooks'import { parseCurl } from './curl-parser'diff --git a/web/app/components/workflow/nodes/http/components/key-value/key-value-edit/item.tsx b/web/app/components/workflow/nodes/http/components/key-value/key-value-edit/item.tsxindex 36e0fccbffc..b349e8d8b22 100644--- a/web/app/components/workflow/nodes/http/components/key-value/key-value-edit/item.tsx+++ b/web/app/components/workflow/nodes/http/components/key-value/key-value-edit/item.tsx@@ -3,10 +3,6 @@ import type { FC } from 'react'import type { KeyValue } from '../../../types'import type { ValueSelector, Var } from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'-import { produce } from 'immer'-import * as React from 'react'-import { useCallback } from 'react'-import { useTranslation } from 'react-i18next'import {Select,SelectContent,@@ -15,7 +11,11 @@ import {SelectItemText,SelectTrigger,SelectValue,-} from '@/app/components/base/ui/select'+} from '@langgenius/dify-ui/select'+import { produce } from 'immer'+import * as React from 'react'+import { useCallback } from 'react'+import { useTranslation } from 'react-i18next'import { VarType } from '@/app/components/workflow/types'import VarReferencePicker from '../../../../_base/components/variable/var-reference-picker'import InputItem from './input-item'diff --git a/web/app/components/workflow/nodes/http/panel.tsx b/web/app/components/workflow/nodes/http/panel.tsxindex 7eb8ef897e3..e1d7b57bf30 100644--- a/web/app/components/workflow/nodes/http/panel.tsx+++ b/web/app/components/workflow/nodes/http/panel.tsx@@ -2,11 +2,11 @@ import type { FC } from 'react'import type { HttpNodeType } from './types'import type { NodePanelProps } from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { memo } from 'react'import { useTranslation } from 'react-i18next'import { FileArrow01 } from '@/app/components/base/icons/src/vender/line/files'import { Settings01 } from '@/app/components/base/icons/src/vender/line/general'-import Switch from '@/app/components/base/switch'import Field from '@/app/components/workflow/nodes/_base/components/field'import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars'import Split from '@/app/components/workflow/nodes/_base/components/split'diff --git a/web/app/components/workflow/nodes/human-input/__tests__/panel.spec.tsx b/web/app/components/workflow/nodes/human-input/__tests__/panel.spec.tsxindex 937a2da61a4..143b05afae8 100644--- a/web/app/components/workflow/nodes/human-input/__tests__/panel.spec.tsx+++ b/web/app/components/workflow/nodes/human-input/__tests__/panel.spec.tsx@@ -2,10 +2,10 @@ import type { ReactNode } from 'react'import type useConfig from '../hooks/use-config'import type { HumanInputNodeType } from '../types'import type { NodePanelProps } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import copy from 'copy-to-clipboard'-import { toast } from '@/app/components/base/ui/toast'import { BlockEnum, InputVarType, VarType } from '@/app/components/workflow/types'import Panel from '../panel'import { DeliveryMethodType, UserActionButtonType } from '../types'@@ -24,7 +24,7 @@ vi.mock('copy-to-clipboard', () => ({default: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),},diff --git a/web/app/components/workflow/nodes/human-input/components/__tests__/button-style-dropdown.spec.tsx b/web/app/components/workflow/nodes/human-input/components/__tests__/button-style-dropdown.spec.tsxindex 544524110a8..056ebf4795c 100644--- a/web/app/components/workflow/nodes/human-input/components/__tests__/button-style-dropdown.spec.tsx+++ b/web/app/components/workflow/nodes/human-input/components/__tests__/button-style-dropdown.spec.tsx@@ -10,7 +10,7 @@ vi.mock('react-i18next', () => ({useTranslation: () => mockUseTranslation(),}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: (props: {variant?: stringchildren?: React.ReactNodediff --git a/web/app/components/workflow/nodes/human-input/components/__tests__/form-content-preview.spec.tsx b/web/app/components/workflow/nodes/human-input/components/__tests__/form-content-preview.spec.tsxindex 4e637724fd9..89b26897616 100644--- a/web/app/components/workflow/nodes/human-input/components/__tests__/form-content-preview.spec.tsx+++ b/web/app/components/workflow/nodes/human-input/components/__tests__/form-content-preview.spec.tsx@@ -35,7 +35,7 @@ vi.mock('@/app/components/base/badge', () => ({default: ({ children }: { children?: ReactNode }) => <div data-testid="badge">{children}</div>,}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: ({ children, variant }: { children?: ReactNode, variant?: string }) => (<button type="button" data-testid={`action-${variant}`}>{children}</button>),diff --git a/web/app/components/workflow/nodes/human-input/components/__tests__/user-action.spec.tsx b/web/app/components/workflow/nodes/human-input/components/__tests__/user-action.spec.tsxindex 13f84636762..a47a012f496 100644--- a/web/app/components/workflow/nodes/human-input/components/__tests__/user-action.spec.tsx+++ b/web/app/components/workflow/nodes/human-input/components/__tests__/user-action.spec.tsx@@ -27,7 +27,7 @@ vi.mock('@/app/components/base/input', () => ({),}))-vi.mock('@/app/components/base/ui/button', () => ({+vi.mock('@langgenius/dify-ui/button', () => ({Button: (props: {children?: ReactNodeonClick?: () => void@@ -38,7 +38,7 @@ vi.mock('@/app/components/base/ui/button', () => ({),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({__esModule: true,toast: {success: (message: string) => mockNotify({ type: 'success', message }),diff --git a/web/app/components/workflow/nodes/human-input/components/button-style-dropdown.tsx b/web/app/components/workflow/nodes/human-input/components/button-style-dropdown.tsxindex 363e0070c05..44ddbbfa347 100644--- a/web/app/components/workflow/nodes/human-input/components/button-style-dropdown.tsx+++ b/web/app/components/workflow/nodes/human-input/components/button-style-dropdown.tsx@@ -1,4 +1,5 @@import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiFontSize,@@ -11,7 +12,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import { UserActionButtonType } from '../types'const i18nPrefix = 'nodes.humanInput'diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/__tests__/email-configure-modal.spec.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/__tests__/email-configure-modal.spec.tsxindex cec9ffe69a6..c5b5c680dc2 100644--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/__tests__/email-configure-modal.spec.tsx+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/__tests__/email-configure-modal.spec.tsx@@ -5,7 +5,7 @@ import EmailConfigureModal from '../email-configure-modal'const mockToastError = vi.hoisted(() => vi.fn())const mockUseAppContextSelector = vi.hoisted(() => vi.fn())-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (message: string) => mockToastError(message),},diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsxindex 1d77248037c..de38564d950 100644--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx@@ -3,6 +3,9 @@ import type {Node,NodeOutPutVar,} from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'+import { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'import { RiBugLine, RiCloseLine } from '@remixicon/react'import { noop } from 'es-toolkit/compat'import { memo, useCallback, useState } from 'react'@@ -10,9 +13,6 @@ import { Trans, useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'import Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'-import Switch from '@/app/components/base/switch'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useSelector as useAppContextWithSelector } from '@/context/app-context'import MailBodyInput from './mail-body-input'import Recipient from './recipient'diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/method-item.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/method-item.tsxindex eae2e293e1a..9cd63e96ddd 100644--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/method-item.tsx+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/method-item.tsx@@ -4,7 +4,9 @@ import type {Node,NodeOutPutVar,} from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import {RiDeleteBinLine,RiEqualizer2Line,@@ -16,9 +18,7 @@ import { useCallback, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import ActionButton, { ActionButtonState } from '@/app/components/base/action-button'import Badge from '@/app/components/base/badge/index'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import Indicator from '@/app/components/header/indicator'import { useSelector as useAppContextWithSelector } from '@/context/app-context'import { DeliveryMethodType } from '../../types'diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/__tests__/index.spec.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/__tests__/index.spec.tsxindex 7fe768781ba..cd95a8e9e39 100644--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/__tests__/index.spec.tsx+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/__tests__/index.spec.tsx@@ -17,9 +17,8 @@ vi.mock('@/service/use-common', () => ({useMembers: () => mockUseMembers(),}))-vi.mock('@/app/components/base/switch', () => ({- __esModule: true,- default: (props: {+vi.mock('@langgenius/dify-ui/switch', () => ({+ Switch: (props: {checked: booleanonCheckedChange: (value: boolean) => void}) => (diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/email-item.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/email-item.tsxindex 8d370266b0c..604736b2a99 100644--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/email-item.tsx+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/email-item.tsx@@ -1,10 +1,10 @@import type { Recipient as RecipientItem } from '../../../types'import type { Member } from '@/models/common'+import { Avatar } from '@langgenius/dify-ui/avatar'import { cn } from '@langgenius/dify-ui/cn'import { RiCloseCircleFill, RiErrorWarningFill } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Avatar } from '@/app/components/base/ui/avatar'type Props = {email: stringdiff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/index.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/index.tsxindex 36483d33d6e..42bd6df171b 100644--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/index.tsx+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/index.tsx@@ -1,10 +1,10 @@import type { RecipientData, Recipient as RecipientItem } from '../../../types'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { RiGroupLine } from '@remixicon/react'import { produce } from 'immer'import { memo } from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'import { useAppContext } from '@/context/app-context'import { useMembers } from '@/service/use-common'import EmailInput from './email-input'diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/member-list.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/member-list.tsxindex c80c22639e5..0e262e839e0 100644--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/member-list.tsx+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/member-list.tsx@@ -2,11 +2,11 @@import type { FC } from 'react'import type { Recipient } from '@/app/components/workflow/nodes/human-input/types'import type { Member } from '@/models/common'+import { Avatar } from '@langgenius/dify-ui/avatar'import { cn } from '@langgenius/dify-ui/cn'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Avatar } from '@/app/components/base/ui/avatar'const i18nPrefix = 'nodes.humanInput'diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/member-selector.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/member-selector.tsxindex 827e02c8bb4..c2df6afb153 100644--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/member-selector.tsx+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/recipient/member-selector.tsx@@ -2,6 +2,7 @@import type { FC } from 'react'import type { Recipient } from '@/app/components/workflow/nodes/human-input/types'import type { Member } from '@/models/common'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiContactsBookLine,@@ -9,7 +10,6 @@ import {import { useState } from 'react'import { useTranslation } from 'react-i18next'import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger } from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import MemberList from './member-list'const i18nPrefix = 'nodes.humanInput'diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/test-email-sender.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/test-email-sender.tsxindex cef6d1380d9..9ad52fa13ee 100644--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/test-email-sender.tsx+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/test-email-sender.tsx@@ -4,6 +4,7 @@ import type {NodeOutPutVar,ValueSelector,} from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowRightSFill, RiCloseLine } from '@remixicon/react'import { noop, unionBy } from 'es-toolkit/compat'@@ -13,7 +14,6 @@ import { useStore as useAppStore } from '@/app/components/app/store'import Divider from '@/app/components/base/divider'import Modal from '@/app/components/base/modal'import { getInputVars as doGetInputVars } from '@/app/components/base/prompt-editor/constants'-import { Button } from '@/app/components/base/ui/button'import FormItem from '@/app/components/workflow/nodes/_base/components/before-run-form/form-item'import {getNodeInfoById,diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/upgrade-modal.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/upgrade-modal.tsxindex c7b46732d0c..060ec2428c2 100644--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/upgrade-modal.tsx+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/upgrade-modal.tsx@@ -1,3 +1,4 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiMailSendFill,@@ -7,7 +8,6 @@ import { useTranslation } from 'react-i18next'import { SparklesSoft } from '@/app/components/base/icons/src/public/common'import Modal from '@/app/components/base/modal'import PremiumBadge from '@/app/components/base/premium-badge'-import { Button } from '@/app/components/base/ui/button'import { useModalContextSelector } from '@/context/modal-context'type UpgradeModalProps = {diff --git a/web/app/components/workflow/nodes/human-input/components/form-content-preview.tsx b/web/app/components/workflow/nodes/human-input/components/form-content-preview.tsxindex 1364941edf1..73e88507897 100644--- a/web/app/components/workflow/nodes/human-input/components/form-content-preview.tsx+++ b/web/app/components/workflow/nodes/human-input/components/form-content-preview.tsx@@ -1,14 +1,14 @@'use client'+import type { ButtonProps } from '@langgenius/dify-ui/button'import type { FC } from 'react'import type { FormInputItem, UserAction } from '../types'-import type { ButtonProps } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Badge from '@/app/components/base/badge'import { getButtonStyle } from '@/app/components/base/chat/chat/answer/human-input-content/utils'import { Markdown } from '@/app/components/base/markdown'-import { Button } from '@/app/components/base/ui/button'import { useStore } from '@/app/components/workflow/store'import useNodes from '@/app/components/workflow/store/workflow/use-nodes'import { Note, rehypeNotes, rehypeVariable, Variable } from './variable-in-markdown'diff --git a/web/app/components/workflow/nodes/human-input/components/single-run-form.tsx b/web/app/components/workflow/nodes/human-input/components/single-run-form.tsxindex dc735830c6a..6226b6c06fb 100644--- a/web/app/components/workflow/nodes/human-input/components/single-run-form.tsx+++ b/web/app/components/workflow/nodes/human-input/components/single-run-form.tsx@@ -1,15 +1,15 @@'use client'-import type { ButtonProps } from '@/app/components/base/ui/button'+import type { ButtonProps } from '@langgenius/dify-ui/button'import type { UserAction } from '@/app/components/workflow/nodes/human-input/types'import type { HumanInputFormData } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowLeftLine } from '@remixicon/react'-import * as React from 'react'+import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import ContentItem from '@/app/components/base/chat/chat/answer/human-input-content/content-item'import { getButtonStyle, initializeInputs, splitByOutputVar } from '@/app/components/base/chat/chat/answer/human-input-content/utils'-import { Button } from '@/app/components/base/ui/button'type Props = {nodeName: stringdiff --git a/web/app/components/workflow/nodes/human-input/components/user-action.tsx b/web/app/components/workflow/nodes/human-input/components/user-action.tsxindex 6ef5609a647..a83ea4f8f21 100644--- a/web/app/components/workflow/nodes/human-input/components/user-action.tsx+++ b/web/app/components/workflow/nodes/human-input/components/user-action.tsx@@ -1,13 +1,13 @@import type { FC } from 'react'import type { UserAction } from '../types'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import {RiDeleteBinLine,} from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import ButtonStyleDropdown from './button-style-dropdown'const i18nPrefix = 'nodes.humanInput'diff --git a/web/app/components/workflow/nodes/human-input/panel.tsx b/web/app/components/workflow/nodes/human-input/panel.tsxindex 846b135fcf2..b7b65e7de88 100644--- a/web/app/components/workflow/nodes/human-input/panel.tsx+++ b/web/app/components/workflow/nodes/human-input/panel.tsx@@ -1,7 +1,9 @@import type { FC } from 'react'import type { HumanInputNodeType } from './types'import type { NodePanelProps, Var } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {RiAddLine,RiClipboardLine,@@ -17,8 +19,6 @@ import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Divider from '@/app/components/base/divider'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars'import Split from '@/app/components/workflow/nodes/_base/components/split'import useAvailableVarList from '@/app/components/workflow/nodes/_base/hooks/use-available-var-list'diff --git a/web/app/components/workflow/nodes/if-else/components/condition-add.tsx b/web/app/components/workflow/nodes/if-else/components/condition-add.tsxindex 3b6d7290789..85a45ac5c79 100644--- a/web/app/components/workflow/nodes/if-else/components/condition-add.tsx+++ b/web/app/components/workflow/nodes/if-else/components/condition-add.tsx@@ -4,6 +4,7 @@ import type {ValueSelector,Var,} from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { RiAddLine } from '@remixicon/react'import {useCallback,@@ -15,7 +16,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import VarReferenceVars from '@/app/components/workflow/nodes/_base/components/variable/var-reference-vars'type ConditionAddProps = {diff --git a/web/app/components/workflow/nodes/if-else/components/condition-list/condition-operator.tsx b/web/app/components/workflow/nodes/if-else/components/condition-list/condition-operator.tsxindex 998cc48205f..83dc97f088a 100644--- a/web/app/components/workflow/nodes/if-else/components/condition-list/condition-operator.tsx+++ b/web/app/components/workflow/nodes/if-else/components/condition-list/condition-operator.tsx@@ -1,5 +1,6 @@import type { ComparisonOperator } from '../../types'import type { VarType } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowDownSLine } from '@remixicon/react'import {@@ -12,7 +13,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import { getOperators, isComparisonOperatorNeedTranslate } from '../../utils'const i18nPrefix = 'nodes.ifElse'diff --git a/web/app/components/workflow/nodes/if-else/components/condition-number-input.tsx b/web/app/components/workflow/nodes/if-else/components/condition-number-input.tsxindex 7bcb4137b5e..954f713a782 100644--- a/web/app/components/workflow/nodes/if-else/components/condition-number-input.tsx+++ b/web/app/components/workflow/nodes/if-else/components/condition-number-input.tsx@@ -2,6 +2,7 @@ import type {NodeOutPutVar,ValueSelector,} from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowDownSLine } from '@remixicon/react'import { useBoolean } from 'ahooks'@@ -18,7 +19,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import VarReferenceVars from '@/app/components/workflow/nodes/_base/components/variable/var-reference-vars'import { VarType } from '@/app/components/workflow/types'import { variableTransformer } from '@/app/components/workflow/utils'diff --git a/web/app/components/workflow/nodes/if-else/components/condition-wrap.tsx b/web/app/components/workflow/nodes/if-else/components/condition-wrap.tsxindex 1744ee64909..92d70b37b17 100644--- a/web/app/components/workflow/nodes/if-else/components/condition-wrap.tsx+++ b/web/app/components/workflow/nodes/if-else/components/condition-wrap.tsx@@ -2,6 +2,7 @@import type { FC } from 'react'import type { Node, NodeOutPutVar, Var } from '../../../types'import type { CaseItem, HandleAddCondition, HandleAddSubVariableCondition, HandleRemoveCondition, handleRemoveSubVariableCondition, HandleToggleConditionLogicalOperator, HandleToggleSubVariableConditionLogicalOperator, HandleUpdateCondition, HandleUpdateSubVariableCondition } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiAddLine,@@ -14,7 +15,6 @@ import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import { ReactSortable } from 'react-sortablejs'import { PortalSelect as Select } from '@/app/components/base/select'-import { Button } from '@/app/components/base/ui/button'import { VarType } from '../../../types'import { SUB_VARIABLES } from '../../constants'import { useGetAvailableVars } from '../../variable-assigner/hooks'diff --git a/web/app/components/workflow/nodes/if-else/panel.tsx b/web/app/components/workflow/nodes/if-else/panel.tsxindex e8dae6fad99..221b00d1f77 100644--- a/web/app/components/workflow/nodes/if-else/panel.tsx+++ b/web/app/components/workflow/nodes/if-else/panel.tsx@@ -1,6 +1,7 @@import type { FC } from 'react'import type { IfElseNodeType } from './types'import type { NodePanelProps } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import {RiAddLine,} from '@remixicon/react'@@ -8,7 +9,6 @@ import {memo,} from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import Field from '@/app/components/workflow/nodes/_base/components/field'import ConditionWrap from './components/condition-wrap'import useConfig from './use-config'diff --git a/web/app/components/workflow/nodes/iteration/__tests__/integration.spec.tsx b/web/app/components/workflow/nodes/iteration/__tests__/integration.spec.tsxindex dc7538144e7..26b938bf6e8 100644--- a/web/app/components/workflow/nodes/iteration/__tests__/integration.spec.tsx+++ b/web/app/components/workflow/nodes/iteration/__tests__/integration.spec.tsx@@ -1,9 +1,9 @@import type { ReactNode } from 'react'import type { IterationNodeType } from '../types'import type { PanelProps } from '@/types/workflow'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { toast } from '@/app/components/base/ui/toast'import { ErrorHandleMode } from '@/app/components/workflow/types'import { BlockEnum, VarType } from '../../../types'import AddBlock from '../add-block'@@ -15,7 +15,7 @@ const mockHandleNodeAdd = vi.fn()const mockHandleNodeIterationRerender = vi.fn()let mockNodesReadOnly = false-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/nodes/iteration/node.tsx b/web/app/components/workflow/nodes/iteration/node.tsxindex ad9cb3b0fe2..a3aee372d71 100644--- a/web/app/components/workflow/nodes/iteration/node.tsx+++ b/web/app/components/workflow/nodes/iteration/node.tsx@@ -2,6 +2,7 @@ import type { FC } from 'react'import type { IterationNodeType } from './types'import type { NodeProps } from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import {memo,useEffect,@@ -13,7 +14,6 @@ import {useNodesInitialized,useViewport,} from 'reactflow'-import { toast } from '@/app/components/base/ui/toast'import { IterationStartNodeDumb } from '../iteration-start'import AddBlock from './add-block'import { useNodeIterationInteractions } from './use-interactions'diff --git a/web/app/components/workflow/nodes/iteration/panel.tsx b/web/app/components/workflow/nodes/iteration/panel.tsxindex 7128c2d4b48..c9ed2de363a 100644--- a/web/app/components/workflow/nodes/iteration/panel.tsx+++ b/web/app/components/workflow/nodes/iteration/panel.tsx@@ -1,12 +1,12 @@import type { FC } from 'react'import type { IterationNodeType } from './types'import type { NodePanelProps } from '@/app/components/workflow/types'+import { Slider } from '@langgenius/dify-ui/slider'+import { Switch } from '@langgenius/dify-ui/switch'import * as React from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import Select from '@/app/components/base/select'-import Switch from '@/app/components/base/switch'-import { Slider } from '@/app/components/base/ui/slider'import Field from '@/app/components/workflow/nodes/_base/components/field'import { ErrorHandleMode } from '@/app/components/workflow/types'import { MAX_PARALLEL_LIMIT } from '@/config'diff --git a/web/app/components/workflow/nodes/knowledge-base/components/chunk-structure/index.tsx b/web/app/components/workflow/nodes/knowledge-base/components/chunk-structure/index.tsxindex a7bba6879e0..0920e8a8a76 100644--- a/web/app/components/workflow/nodes/knowledge-base/components/chunk-structure/index.tsx+++ b/web/app/components/workflow/nodes/knowledge-base/components/chunk-structure/index.tsx@@ -1,7 +1,7 @@import type { ChunkStructureEnum } from '../../types'+import { Button } from '@langgenius/dify-ui/button'import { memo } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { Field } from '@/app/components/workflow/nodes/_base/components/layout'import OptionCard from '../option-card'import { useChunkStructure } from './hooks'diff --git a/web/app/components/workflow/nodes/knowledge-base/components/chunk-structure/selector.tsx b/web/app/components/workflow/nodes/knowledge-base/components/chunk-structure/selector.tsxindex 5018bbc784c..7ab8de508ff 100644--- a/web/app/components/workflow/nodes/knowledge-base/components/chunk-structure/selector.tsx+++ b/web/app/components/workflow/nodes/knowledge-base/components/chunk-structure/selector.tsx@@ -1,6 +1,7 @@import type { ReactNode } from 'react'import type { ChunkStructureEnum } from '../../types'import type { Option } from './type'+import { Button } from '@langgenius/dify-ui/button'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import {@@ -8,7 +9,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import OptionCard from '../option-card'type SelectorProps = {diff --git a/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx b/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsxindex 12cc0f1eb5b..70ff0e47eba 100644--- a/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx+++ b/web/app/components/workflow/nodes/knowledge-base/components/index-method.tsx@@ -1,4 +1,5 @@import { cn } from '@langgenius/dify-ui/cn'+import { Slider } from '@langgenius/dify-ui/slider'import { RiQuestionLine } from '@remixicon/react'import {memo,@@ -11,7 +12,6 @@ import {} from '@/app/components/base/icons/src/vender/knowledge'import Input from '@/app/components/base/input'import Tooltip from '@/app/components/base/tooltip'-import { Slider } from '@/app/components/base/ui/slider'import { Field } from '@/app/components/workflow/nodes/_base/components/layout'import {ChunkStructureEnum,diff --git a/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/search-method-option.tsx b/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/search-method-option.tsxindex fe1d8639448..a1f601cce9c 100644--- a/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/search-method-option.tsx+++ b/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/search-method-option.tsx@@ -8,6 +8,7 @@ import type {Option,} from './type'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import {memo,useCallback,@@ -16,7 +17,6 @@ import {import { useTranslation } from 'react-i18next'import WeightedScoreComponent from '@/app/components/app/configuration/dataset-config/params-config/weighted-score'import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'-import Switch from '@/app/components/base/switch'import Tooltip from '@/app/components/base/tooltip'import { DEFAULT_WEIGHTED_SCORE } from '@/models/datasets'import {diff --git a/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/top-k-and-score-threshold.tsx b/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/top-k-and-score-threshold.tsxindex 5136d4897ff..814b3cea6d1 100644--- a/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/top-k-and-score-threshold.tsx+++ b/web/app/components/workflow/nodes/knowledge-base/components/retrieval-setting/top-k-and-score-threshold.tsx@@ -1,7 +1,3 @@-import { memo, useCallback } from 'react'-import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'-import Tooltip from '@/app/components/base/tooltip'import {NumberField,NumberFieldControls,@@ -9,7 +5,11 @@ import {NumberFieldGroup,NumberFieldIncrement,NumberFieldInput,-} from '@/app/components/base/ui/number-field'+} from '@langgenius/dify-ui/number-field'+import { Switch } from '@langgenius/dify-ui/switch'+import { memo, useCallback } from 'react'+import { useTranslation } from 'react-i18next'+import Tooltip from '@/app/components/base/tooltip'import { env } from '@/env'export type TopKAndScoreThresholdProps = {diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/add-condition.tsx b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/add-condition.tsxindex e94caf7b30c..ea7870431a7 100644--- a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/add-condition.tsx+++ b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/add-condition.tsx@@ -1,5 +1,6 @@import type { MetadataShape } from '@/app/components/workflow/nodes/knowledge-retrieval/types'import type { MetadataInDoc } from '@/models/datasets'+import { Button } from '@langgenius/dify-ui/button'import {RiAddLine,} from '@remixicon/react'@@ -15,7 +16,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import MetadataIcon from './metadata-icon'const AddCondition = ({diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/condition-list/condition-operator.tsx b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/condition-list/condition-operator.tsxindex d6828a5392f..f14743ce9f2 100644--- a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/condition-list/condition-operator.tsx+++ b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/condition-list/condition-operator.tsx@@ -2,6 +2,7 @@ import type {ComparisonOperator,MetadataFilteringVariableType,} from '@/app/components/workflow/nodes/knowledge-retrieval/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowDownSLine } from '@remixicon/react'import {@@ -14,7 +15,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import {getOperators,isComparisonOperatorNeedTranslate,diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/condition-list/condition-value-method.tsx b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/condition-list/condition-value-method.tsxindex b69bd05cdd7..12d7c9cc690 100644--- a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/condition-list/condition-value-method.tsx+++ b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/condition-list/condition-value-method.tsx@@ -1,3 +1,4 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowDownSLine } from '@remixicon/react'import { capitalize } from 'es-toolkit/string'@@ -7,7 +8,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'export type ConditionValueMethodProps = {valueMethod?: stringdiff --git a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/metadata-filter-selector.tsx b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/metadata-filter-selector.tsxindex 67939a6448a..396fd069e7c 100644--- a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/metadata-filter-selector.tsx+++ b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/metadata-filter-selector.tsx@@ -1,3 +1,4 @@+import { Button } from '@langgenius/dify-ui/button'import {RiArrowDownSLine,RiCheckLine,@@ -9,7 +10,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import { MetadataFilteringModeEnum } from '@/app/components/workflow/nodes/knowledge-retrieval/types'type MetadataFilterSelectorProps = {diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-trigger.tsx b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-trigger.tsxindex 1553da1e1f6..dd530ae6795 100644--- a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-trigger.tsx+++ b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-trigger.tsx@@ -1,4 +1,5 @@import type { MetadataShape } from '@/app/components/workflow/nodes/knowledge-retrieval/types'+import { Button } from '@langgenius/dify-ui/button'import { RiFilter3Line } from '@remixicon/react'import {useEffect,@@ -10,7 +11,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import MetadataPanel from './metadata-panel'const MetadataTrigger = ({diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/components/retrieval-config.tsx b/web/app/components/workflow/nodes/knowledge-retrieval/components/retrieval-config.tsxindex 3f8198a822b..da71682b358 100644--- a/web/app/components/workflow/nodes/knowledge-retrieval/components/retrieval-config.tsx+++ b/web/app/components/workflow/nodes/knowledge-retrieval/components/retrieval-config.tsx@@ -5,6 +5,7 @@ import type { MultipleRetrievalConfig, SingleRetrievalConfig } from '../types'import type { ModelParameterModalProps } from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal'import type { DataSet } from '@/models/datasets'import type { DatasetConfigs } from '@/models/debug'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiEqualizer2Line } from '@remixicon/react'import * as React from 'react'@@ -16,7 +17,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import { DATASET_DEFAULT } from '@/config'import { RETRIEVE_TYPE } from '@/types/app'diff --git a/web/app/components/workflow/nodes/list-operator/__tests__/panel.spec.tsx b/web/app/components/workflow/nodes/list-operator/__tests__/panel.spec.tsxindex 9e5147bc927..945ca701044 100644--- a/web/app/components/workflow/nodes/list-operator/__tests__/panel.spec.tsx+++ b/web/app/components/workflow/nodes/list-operator/__tests__/panel.spec.tsx@@ -22,9 +22,8 @@ vi.mock('../use-config', () => ({default: (...args: unknown[]) => mockUseConfig(...args),}))-vi.mock('@/app/components/base/switch', () => ({- __esModule: true,- default: (props: {+vi.mock('@langgenius/dify-ui/switch', () => ({+ Switch: (props: {checked?: booleandisabled?: booleanonCheckedChange: (value: boolean) => voiddiff --git a/web/app/components/workflow/nodes/list-operator/components/__tests__/limit-config.spec.tsx b/web/app/components/workflow/nodes/list-operator/components/__tests__/limit-config.spec.tsxindex fbc3356b32c..1314b4600b9 100644--- a/web/app/components/workflow/nodes/list-operator/components/__tests__/limit-config.spec.tsx+++ b/web/app/components/workflow/nodes/list-operator/components/__tests__/limit-config.spec.tsx@@ -19,8 +19,8 @@ type MockSliderProps = {const mockSwitch = vi.fn<(props: MockSwitchProps) => void>()const mockSlider = vi.fn<(props: MockSliderProps) => void>()-vi.mock('@/app/components/base/switch', () => ({- default: (props: MockSwitchProps) => {+vi.mock('@langgenius/dify-ui/switch', () => ({+ Switch: (props: MockSwitchProps) => {mockSwitch(props)return (<buttondiff --git a/web/app/components/workflow/nodes/list-operator/components/limit-config.tsx b/web/app/components/workflow/nodes/list-operator/components/limit-config.tsxindex 564f969bb43..3d49f974046 100644--- a/web/app/components/workflow/nodes/list-operator/components/limit-config.tsx+++ b/web/app/components/workflow/nodes/list-operator/components/limit-config.tsx@@ -2,10 +2,10 @@import type { FC } from 'react'import type { Limit } from '../types'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'import Field from '@/app/components/workflow/nodes/_base/components/field'import InputNumberWithSlider from '../../_base/components/input-number-with-slider'diff --git a/web/app/components/workflow/nodes/list-operator/panel.tsx b/web/app/components/workflow/nodes/list-operator/panel.tsxindex 365c3030863..c5c629137b4 100644--- a/web/app/components/workflow/nodes/list-operator/panel.tsx+++ b/web/app/components/workflow/nodes/list-operator/panel.tsx@@ -1,9 +1,9 @@import type { FC } from 'react'import type { ListFilterNodeType } from './types'import type { NodePanelProps } from '@/app/components/workflow/types'+import { Switch } from '@langgenius/dify-ui/switch'import * as React from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'import Field from '@/app/components/workflow/nodes/_base/components/field'import ExtractInput from '@/app/components/workflow/nodes/list-operator/components/extract-input'import OptionCard from '../_base/components/option-card'diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/__tests__/json-importer.spec.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/__tests__/json-importer.spec.tsxindex 9344673a352..74b800f7ccf 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/__tests__/json-importer.spec.tsx+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/__tests__/json-importer.spec.tsx@@ -52,7 +52,7 @@ vi.mock('../error-message', () => ({default: ({ message }: { message: string }) => <div data-testid="error-message">{message}</div>,}))-vi.mock('@/app/components/base/ui/popover', async () => {+vi.mock('@langgenius/dify-ui/popover', async () => {const ReactModule = await vi.importActual<typeof import('react')>('react')const PopoverContext = ReactModule.createContext<{diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-importer.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-importer.tsxindex 673fd23ef2d..da8c89f755b 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-importer.tsx+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-importer.tsx@@ -1,11 +1,11 @@import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import { RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import { JSON_SCHEMA_MAX_DEPTH } from '@/config'import { checkJsonDepth } from '../../utils'import CodeEditor from './code-editor'diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-config.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-config.tsxindex e09f6a59fc4..96c508b48f8 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-config.tsx+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-config.tsx@@ -1,11 +1,11 @@import type { FC } from 'react'import type { SchemaRoot } from '../../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { JSON_SCHEMA_MAX_DEPTH } from '@/config'import { SegmentedControl } from '../../../../../base/segmented-control'import { Type } from '../../types'diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/generated-result.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/generated-result.tsxindex 4f7b2ceb0c7..2023d093a7b 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/generated-result.tsx+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/generated-result.tsx@@ -1,11 +1,11 @@import type { FC } from 'react'import type { SchemaRoot } from '../../../types'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowLeftLine, RiCloseLine, RiSparklingLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'import { getValidationErrorMessage, validateSchemaAgainstDraft7 } from '../../../utils'import CodeEditor from '../code-editor'import ErrorMessage from '../error-message'diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/index.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/index.tsxindex 7b908bafd6a..c949b89adb6 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/index.tsx+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/index.tsx@@ -3,6 +3,7 @@ import type { SchemaRoot } from '../../../types'import type { FormValue } from '@/app/components/header/account-setting/model-provider-page/declarations'import type { CompletionParams, Model } from '@/types/app'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback, useEffect, useState } from 'react'import {@@ -10,7 +11,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { toast } from '@/app/components/base/ui/toast'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'import useTheme from '@/hooks/use-theme'diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/prompt-editor.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/prompt-editor.tsxindex 1a7bce0361f..524d7079df4 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/prompt-editor.tsx+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/json-schema-generator/prompt-editor.tsx@@ -1,13 +1,13 @@import type { FC } from 'react'import type { FormValue } from '@/app/components/header/account-setting/model-provider-page/declarations'import type { Model } from '@/types/app'+import { Button } from '@langgenius/dify-ui/button'import { RiCloseLine, RiSparklingFill } from '@remixicon/react'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import Textarea from '@/app/components/base/textarea'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import ModelParameterModal from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal'type ModelInfo = {diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/add-field.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/add-field.tsxindex d25ee83f802..8c57509f845 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/add-field.tsx+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/add-field.tsx@@ -1,8 +1,8 @@+import { Button } from '@langgenius/dify-ui/button'import { RiAddCircleFill } from '@remixicon/react'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { useMittContext } from './context'import { useVisualEditorStore } from './store'diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/advanced-actions.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/advanced-actions.tsxindex 36018959428..9a72df3d314 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/advanced-actions.tsx+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/advanced-actions.tsx@@ -1,8 +1,8 @@import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { useKeyPress } from 'ahooks'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import ShortcutsName from '@/app/components/workflow/shortcuts-name'import { getKeyboardKeyCodeBySystem } from '@/app/components/workflow/utils'diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/required-switch.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/required-switch.tsxindex 9d5a5c1fede..674ef320f2a 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/required-switch.tsx+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/edit-card/required-switch.tsx@@ -1,7 +1,7 @@import type { FC } from 'react'+import { Switch } from '@langgenius/dify-ui/switch'import * as React from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'type RequiredSwitchProps = {defaultValue: booleandiff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/hooks.ts b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/hooks.tsindex cf7ef1571d1..0c327b6e035 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/hooks.ts+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/hooks.ts@@ -1,10 +1,10 @@import type { VisualEditorProps } from '.'import type { Field } from '../../../types'import type { EditData } from './edit-card'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import { produce } from 'immer'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { ArrayType, Type } from '../../../types'import { findPropertyWithPath } from '../../../utils'import { useMittContext } from './context'diff --git a/web/app/components/workflow/nodes/llm/components/panel-memory-section.tsx b/web/app/components/workflow/nodes/llm/components/panel-memory-section.tsxindex 568575139a5..3d2697c44eb 100644--- a/web/app/components/workflow/nodes/llm/components/panel-memory-section.tsx+++ b/web/app/components/workflow/nodes/llm/components/panel-memory-section.tsx@@ -1,9 +1,9 @@import type { FC } from 'react'import type { LLMNodeType } from '../types'import type { Memory, Node, NodeOutPutVar } from '@/app/components/workflow/types'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import MemoryConfig from '@/app/components/workflow/nodes/_base/components/memory-config'import Editor from '@/app/components/workflow/nodes/_base/components/prompt/editor'diff --git a/web/app/components/workflow/nodes/llm/components/panel-output-section.tsx b/web/app/components/workflow/nodes/llm/components/panel-output-section.tsxindex a70f035728d..3a3ab7f8cb2 100644--- a/web/app/components/workflow/nodes/llm/components/panel-output-section.tsx+++ b/web/app/components/workflow/nodes/llm/components/panel-output-section.tsx@@ -1,10 +1,10 @@import type { FC } from 'react'import type { LLMNodeType, StructuredOutput } from '../types'+import { Switch } from '@langgenius/dify-ui/switch'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'import { RiAlertFill, RiQuestionLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'-import { Tooltip, TooltipContent, TooltipTrigger } from '@/app/components/base/ui/tooltip'import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars'import Split from '@/app/components/workflow/nodes/_base/components/split'import StructureOutput from './structure-output'diff --git a/web/app/components/workflow/nodes/llm/components/reasoning-format-config.tsx b/web/app/components/workflow/nodes/llm/components/reasoning-format-config.tsxindex c9177e2d649..1c390ecb83b 100644--- a/web/app/components/workflow/nodes/llm/components/reasoning-format-config.tsx+++ b/web/app/components/workflow/nodes/llm/components/reasoning-format-config.tsx@@ -1,7 +1,7 @@import type { FC } from 'react'+import { Switch } from '@langgenius/dify-ui/switch'import * as React from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'import Field from '@/app/components/workflow/nodes/_base/components/field'type ReasoningFormatConfigProps = {diff --git a/web/app/components/workflow/nodes/llm/components/structure-output.tsx b/web/app/components/workflow/nodes/llm/components/structure-output.tsxindex 884c6381106..d8b3e132bb5 100644--- a/web/app/components/workflow/nodes/llm/components/structure-output.tsx+++ b/web/app/components/workflow/nodes/llm/components/structure-output.tsx@@ -1,13 +1,13 @@'use client'import type { FC } from 'react'import type { SchemaRoot, StructuredOutput } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiEditLine } from '@remixicon/react'import { useBoolean } from 'ahooks'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import ShowPanel from '@/app/components/workflow/nodes/_base/components/variable/object-child-tree-panel/show'import { Type } from '../types'import JsonSchemaConfigModal from './json-schema-config-modal'diff --git a/web/app/components/workflow/nodes/llm/panel.tsx b/web/app/components/workflow/nodes/llm/panel.tsxindex f465366ee90..922a18e46e4 100644--- a/web/app/components/workflow/nodes/llm/panel.tsx+++ b/web/app/components/workflow/nodes/llm/panel.tsx@@ -1,10 +1,10 @@import type { FC } from 'react'import type { LLMNodeType } from './types'import type { NodePanelProps } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import ModelParameterModal from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal'import Field from '@/app/components/workflow/nodes/_base/components/field'import Split from '@/app/components/workflow/nodes/_base/components/split'diff --git a/web/app/components/workflow/nodes/loop/__tests__/integration.spec.tsx b/web/app/components/workflow/nodes/loop/__tests__/integration.spec.tsxindex 99ce377b99b..0af05e96749 100644--- a/web/app/components/workflow/nodes/loop/__tests__/integration.spec.tsx+++ b/web/app/components/workflow/nodes/loop/__tests__/integration.spec.tsx@@ -181,7 +181,7 @@ vi.mock('@/app/components/workflow/nodes/_base/components/editor/code-editor', (),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockToastNotify({ type: 'success', message }),error: (message: string) => mockToastNotify({ type: 'error', message }),diff --git a/web/app/components/workflow/nodes/loop/components/condition-add.tsx b/web/app/components/workflow/nodes/loop/components/condition-add.tsxindex 1d9be045d2c..36a09dd434d 100644--- a/web/app/components/workflow/nodes/loop/components/condition-add.tsx+++ b/web/app/components/workflow/nodes/loop/components/condition-add.tsx@@ -4,6 +4,7 @@ import type {ValueSelector,Var,} from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { RiAddLine } from '@remixicon/react'import {useCallback,@@ -15,7 +16,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import VarReferenceVars from '@/app/components/workflow/nodes/_base/components/variable/var-reference-vars'type ConditionAddProps = {diff --git a/web/app/components/workflow/nodes/loop/components/condition-list/condition-operator.tsx b/web/app/components/workflow/nodes/loop/components/condition-list/condition-operator.tsxindex 9380282b54c..916326c4169 100644--- a/web/app/components/workflow/nodes/loop/components/condition-list/condition-operator.tsx+++ b/web/app/components/workflow/nodes/loop/components/condition-list/condition-operator.tsx@@ -1,5 +1,6 @@import type { ComparisonOperator } from '../../types'import type { VarType } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowDownSLine } from '@remixicon/react'import {@@ -12,7 +13,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import { getOperators, isComparisonOperatorNeedTranslate } from '../../utils'const i18nPrefix = 'nodes.ifElse'diff --git a/web/app/components/workflow/nodes/loop/components/condition-number-input.tsx b/web/app/components/workflow/nodes/loop/components/condition-number-input.tsxindex 7bcb4137b5e..954f713a782 100644--- a/web/app/components/workflow/nodes/loop/components/condition-number-input.tsx+++ b/web/app/components/workflow/nodes/loop/components/condition-number-input.tsx@@ -2,6 +2,7 @@ import type {NodeOutPutVar,ValueSelector,} from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiArrowDownSLine } from '@remixicon/react'import { useBoolean } from 'ahooks'@@ -18,7 +19,6 @@ import {PortalToFollowElemContent,PortalToFollowElemTrigger,} from '@/app/components/base/portal-to-follow-elem'-import { Button } from '@/app/components/base/ui/button'import VarReferenceVars from '@/app/components/workflow/nodes/_base/components/variable/var-reference-vars'import { VarType } from '@/app/components/workflow/types'import { variableTransformer } from '@/app/components/workflow/utils'diff --git a/web/app/components/workflow/nodes/loop/components/condition-wrap.tsx b/web/app/components/workflow/nodes/loop/components/condition-wrap.tsxindex 50e3fd248e1..f73386bfa8d 100644--- a/web/app/components/workflow/nodes/loop/components/condition-wrap.tsx+++ b/web/app/components/workflow/nodes/loop/components/condition-wrap.tsx@@ -2,6 +2,7 @@import type { FC } from 'react'import type { Node, NodeOutPutVar, Var } from '../../../types'import type { Condition, HandleAddCondition, HandleAddSubVariableCondition, HandleRemoveCondition, handleRemoveSubVariableCondition, HandleToggleConditionLogicalOperator, HandleToggleSubVariableConditionLogicalOperator, HandleUpdateCondition, HandleUpdateSubVariableCondition, LogicalOperator } from '../types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiAddLine,@@ -10,7 +11,6 @@ import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { PortalSelect as Select } from '@/app/components/base/select'-import { Button } from '@/app/components/base/ui/button'import { VarType } from '../../../types'import { useGetAvailableVars } from '../../variable-assigner/hooks'import { SUB_VARIABLES } from './../default'diff --git a/web/app/components/workflow/nodes/loop/components/loop-variables/item.tsx b/web/app/components/workflow/nodes/loop/components/loop-variables/item.tsxindex 7bd7e09c1b6..b0668cca60d 100644--- a/web/app/components/workflow/nodes/loop/components/loop-variables/item.tsx+++ b/web/app/components/workflow/nodes/loop/components/loop-variables/item.tsx@@ -2,12 +2,12 @@ import type {LoopVariable,LoopVariablesComponentShape,} from '@/app/components/workflow/nodes/loop/types'+import { toast } from '@langgenius/dify-ui/toast'import { RiDeleteBinLine } from '@remixicon/react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import ActionButton from '@/app/components/base/action-button'import Input from '@/app/components/base/input'-import { toast } from '@/app/components/base/ui/toast'import { ValueType, VarType } from '@/app/components/workflow/types'import { checkKeys, replaceSpaceWithUnderscoreInVarNameInput } from '@/utils/var'import FormItem from './form-item'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.tsxindex 490f981268b..f63d9a0d506 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@@ -4,9 +4,9 @@ import type { Param, ParameterExtractorNodeType } from '../types'import type { ToolParameter } from '@/app/components/tools/types'import type { ToolDefaultValue } from '@/app/components/workflow/block-selector/types'import type { PanelProps } from '@/types/workflow'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { toast } from '@/app/components/base/ui/toast'import {useTextGenerationCurrentProviderAndModelAndModelList,} from '@/app/components/header/account-setting/model-provider-page/hooks'@@ -39,7 +39,7 @@ let mockWorkflowTools: MockToolCollection[] = []let mockSelectedToolInfo: ToolDefaultValue | undefinedlet mockBlockSelectorOpen = false-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/__tests__/update.spec.tsx b/web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/__tests__/update.spec.tsxindex 7e6c7f22dcf..c73b990b680 100644--- a/web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/__tests__/update.spec.tsx+++ b/web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/__tests__/update.spec.tsx@@ -1,11 +1,11 @@import type { Param } from '../../../types'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen, waitFor, within } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { toast } from '@/app/components/base/ui/toast'import { ParamType } from '../../../types'import Update from '../update'-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),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.tsxindex d3a3a39b609..9be35242c58 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@@ -2,6 +2,9 @@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 { Switch } from '@langgenius/dify-ui/switch'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import * as React from 'react'import { useCallback, useState } from 'react'@@ -11,10 +14,7 @@ import ConfigSelect from '@/app/components/app/configuration/config-var/config-simport Input from '@/app/components/base/input'import Modal from '@/app/components/base/modal'import Select from '@/app/components/base/select'-import Switch from '@/app/components/base/switch'import Textarea from '@/app/components/base/textarea'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { ChangeType } from '@/app/components/workflow/types'import { checkKeys } from '@/utils/var'import { ParamType } from '../../types'diff --git a/web/app/components/workflow/nodes/start/__tests__/use-config.spec.ts b/web/app/components/workflow/nodes/start/__tests__/use-config.spec.tsindex 16d37a6a8fa..847d58afe4d 100644--- a/web/app/components/workflow/nodes/start/__tests__/use-config.spec.ts+++ b/web/app/components/workflow/nodes/start/__tests__/use-config.spec.ts@@ -32,7 +32,7 @@ vi.mock('@/app/components/workflow/hooks/use-inspect-vars-crud', () => ({default: (...args: unknown[]) => mockUseInspectVarsCrud(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({__esModule: true,toast: {error: (message: string) => mockNotify({ type: 'error', message }),diff --git a/web/app/components/workflow/nodes/start/components/var-list.tsx b/web/app/components/workflow/nodes/start/components/var-list.tsxindex d4f6511cdbd..3cb1b82edf8 100644--- a/web/app/components/workflow/nodes/start/components/var-list.tsx+++ b/web/app/components/workflow/nodes/start/components/var-list.tsx@@ -2,13 +2,13 @@import type { FC } from 'react'import type { InputVar, MoreInfo } from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiDraggable } from '@remixicon/react'import { produce } from 'immer'import * as React from 'react'import { useCallback, useMemo } from 'react'import { useTranslation } from 'react-i18next'import { ReactSortable } from 'react-sortablejs'-import { toast } from '@/app/components/base/ui/toast'import { ChangeType } from '@/app/components/workflow/types'import { hasDuplicateStr } from '@/utils/var'import VarItem from './var-item'diff --git a/web/app/components/workflow/nodes/start/use-config.ts b/web/app/components/workflow/nodes/start/use-config.tsindex e9542535614..4ae67bb8d32 100644--- a/web/app/components/workflow/nodes/start/use-config.ts+++ b/web/app/components/workflow/nodes/start/use-config.ts@@ -1,10 +1,10 @@import type { StartNodeType } from './types'import type { InputVar, MoreInfo, ValueSelector } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import { produce } from 'immer'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import {useIsChatMode,useNodesReadOnly,diff --git a/web/app/components/workflow/nodes/tool/components/tool-form/item.tsx b/web/app/components/workflow/nodes/tool/components/tool-form/item.tsxindex 7ccf1378994..6cd13984f0e 100644--- a/web/app/components/workflow/nodes/tool/components/tool-form/item.tsx+++ b/web/app/components/workflow/nodes/tool/components/tool-form/item.tsx@@ -4,12 +4,12 @@ import type { ToolVarInputs } from '../../types'import type { CredentialFormSchema } from '@/app/components/header/account-setting/model-provider-page/declarations'import type { Tool } from '@/app/components/tools/types'import type { ToolWithProvider } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import {RiBracesLine,} from '@remixicon/react'import { useBoolean } from 'ahooks'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import { FormTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'import { SchemaModal } from '@/app/components/plugins/plugin-detail-panel/tool-selector/components'diff --git a/web/app/components/workflow/nodes/tool/hooks/use-config.ts b/web/app/components/workflow/nodes/tool/hooks/use-config.tsindex 5e3f928dcb0..dda11df74af 100644--- a/web/app/components/workflow/nodes/tool/hooks/use-config.ts+++ b/web/app/components/workflow/nodes/tool/hooks/use-config.ts@@ -1,11 +1,11 @@import type { ToolNodeType, ToolVarInputs } from '../types'import type { InputVar } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import { useBoolean } from 'ahooks'import { capitalize } from 'es-toolkit/string'import { produce } from 'immer'import { useCallback, useEffect, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'import { CollectionType } from '@/app/components/tools/types'import {diff --git a/web/app/components/workflow/nodes/trigger-plugin/components/trigger-form/item.tsx b/web/app/components/workflow/nodes/trigger-plugin/components/trigger-form/item.tsxindex 68810fb0683..44eb9d44c6e 100644--- a/web/app/components/workflow/nodes/trigger-plugin/components/trigger-form/item.tsx+++ b/web/app/components/workflow/nodes/trigger-plugin/components/trigger-form/item.tsx@@ -4,12 +4,12 @@ import type { CredentialFormSchema } from '@/app/components/header/account-settiimport type { Event } from '@/app/components/tools/types'import type { TriggerWithProvider } from '@/app/components/workflow/block-selector/types'import type { PluginTriggerVarInputs } from '@/app/components/workflow/nodes/trigger-plugin/types'+import { Button } from '@langgenius/dify-ui/button'import {RiBracesLine,} from '@remixicon/react'import { useBoolean } from 'ahooks'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import { FormTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'import { SchemaModal } from '@/app/components/plugins/plugin-detail-panel/tool-selector/components'diff --git a/web/app/components/workflow/nodes/trigger-schedule/components/on-minute-selector.tsx b/web/app/components/workflow/nodes/trigger-schedule/components/on-minute-selector.tsxindex 61c943992c8..7c0713019e3 100644--- a/web/app/components/workflow/nodes/trigger-schedule/components/on-minute-selector.tsx+++ b/web/app/components/workflow/nodes/trigger-schedule/components/on-minute-selector.tsx@@ -1,6 +1,6 @@+import { Slider } from '@langgenius/dify-ui/slider'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Slider } from '@/app/components/base/ui/slider'type OnMinuteSelectorProps = {value?: numberdiff --git a/web/app/components/workflow/nodes/trigger-webhook/__tests__/use-config.spec.tsx b/web/app/components/workflow/nodes/trigger-webhook/__tests__/use-config.spec.tsxindex 92a04575981..8f473047348 100644--- a/web/app/components/workflow/nodes/trigger-webhook/__tests__/use-config.spec.tsx+++ b/web/app/components/workflow/nodes/trigger-webhook/__tests__/use-config.spec.tsx@@ -1,7 +1,7 @@import type { WebhookTriggerNodeType } from '../types'+import { toast } from '@langgenius/dify-ui/toast'import { renderHook } from '@testing-library/react'import { useStore as useAppStore } from '@/app/components/app/store'-import { toast } from '@/app/components/base/ui/toast'import { BlockEnum, VarType } from '@/app/components/workflow/types'import { fetchWebhookUrl } from '@/service/apps'import { createNodeCrudModuleMock } from '../../__tests__/use-config-test-utils'@@ -18,7 +18,7 @@ vi.mock('react-i18next', () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({__esModule: true,toast: {error: vi.fn(),diff --git a/web/app/components/workflow/nodes/trigger-webhook/panel.tsx b/web/app/components/workflow/nodes/trigger-webhook/panel.tsxindex 4f276d35354..d7f46edfcfa 100644--- a/web/app/components/workflow/nodes/trigger-webhook/panel.tsx+++ b/web/app/components/workflow/nodes/trigger-webhook/panel.tsx@@ -1,14 +1,6 @@import type { FC } from 'react'import type { HttpMethod, WebhookTriggerNodeType } from './types'import type { NodePanelProps } from '@/app/components/workflow/types'-import copy from 'copy-to-clipboard'--import * as React from 'react'-import { useEffect, useRef, useState } from 'react'-import { useTranslation } from 'react-i18next'-import InputWithCopy from '@/app/components/base/input-with-copy'-import { SimpleSelect } from '@/app/components/base/select'-import Tooltip from '@/app/components/base/tooltip'import {NumberField,NumberFieldControls,@@ -16,8 +8,16 @@ import {NumberFieldGroup,NumberFieldIncrement,NumberFieldInput,-} from '@/app/components/base/ui/number-field'-import { toast } from '@/app/components/base/ui/toast'+} from '@langgenius/dify-ui/number-field'++import { toast } from '@langgenius/dify-ui/toast'+import copy from 'copy-to-clipboard'+import * as React from 'react'+import { useEffect, useRef, useState } from 'react'+import { useTranslation } from 'react-i18next'+import InputWithCopy from '@/app/components/base/input-with-copy'+import { SimpleSelect } from '@/app/components/base/select'+import Tooltip from '@/app/components/base/tooltip'import Field from '@/app/components/workflow/nodes/_base/components/field'import OutputVars from '@/app/components/workflow/nodes/_base/components/output-vars'import Split from '@/app/components/workflow/nodes/_base/components/split'diff --git a/web/app/components/workflow/nodes/trigger-webhook/use-config.ts b/web/app/components/workflow/nodes/trigger-webhook/use-config.tsindex 7924a35ba0e..d01a5ee4632 100644--- a/web/app/components/workflow/nodes/trigger-webhook/use-config.ts+++ b/web/app/components/workflow/nodes/trigger-webhook/use-config.ts@@ -1,8 +1,8 @@import type { HttpMethod, WebhookHeader, WebhookParameter, WebhookTriggerNodeType } from './types'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { useStore as useAppStore } from '@/app/components/app/store'-import { toast } from '@/app/components/base/ui/toast'import { useNodesReadOnly, useWorkflow } from '@/app/components/workflow/hooks'import useNodeCrud from '@/app/components/workflow/nodes/_base/hooks/use-node-crud'import { fetchWebhookUrl } from '@/service/apps'diff --git a/web/app/components/workflow/nodes/variable-assigner/__tests__/integration.spec.tsx b/web/app/components/workflow/nodes/variable-assigner/__tests__/integration.spec.tsxindex d9176480dc2..11ec8bdbcd8 100644--- a/web/app/components/workflow/nodes/variable-assigner/__tests__/integration.spec.tsx+++ b/web/app/components/workflow/nodes/variable-assigner/__tests__/integration.spec.tsx@@ -1,9 +1,9 @@/* eslint-disable ts/no-explicit-any, style/jsx-one-expression-per-line */import type { VariableAssignerNodeType } from '../types'import type { PanelProps } from '@/types/workflow'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { toast } from '@/app/components/base/ui/toast'import { renderWorkflowFlowComponent } from '@/app/components/workflow/__tests__/workflow-test-env'import { BlockEnum, VarType } from '@/app/components/workflow/types'import AddVariable from '../components/add-variable'@@ -19,7 +19,7 @@ const mockHandleGroupItemMouseEnter = vi.fn()const mockHandleGroupItemMouseLeave = vi.fn()const mockGetAvailableVars = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/nodes/variable-assigner/components/__tests__/var-group-item.spec.tsx b/web/app/components/workflow/nodes/variable-assigner/components/__tests__/var-group-item.spec.tsxindex 20650f0dddb..2a922b9c79d 100644--- a/web/app/components/workflow/nodes/variable-assigner/components/__tests__/var-group-item.spec.tsx+++ b/web/app/components/workflow/nodes/variable-assigner/components/__tests__/var-group-item.spec.tsx@@ -1,12 +1,12 @@import type { ComponentProps } from 'react'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, screen } from '@testing-library/react'-import { toast } from '@/app/components/base/ui/toast'import { createNode, resetFixtureCounters } from '@/app/components/workflow/__tests__/fixtures'import { renderWorkflowFlowComponent } from '@/app/components/workflow/__tests__/workflow-test-env'import { BlockEnum, VarType } from '@/app/components/workflow/types'import VarGroupItem from '../var-group-item'-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/nodes/variable-assigner/components/add-variable/index.tsx b/web/app/components/workflow/nodes/variable-assigner/components/add-variable/index.tsxindex 53c3c36e04b..078f0c12b59 100644--- a/web/app/components/workflow/nodes/variable-assigner/components/add-variable/index.tsx+++ b/web/app/components/workflow/nodes/variable-assigner/components/add-variable/index.tsx@@ -5,13 +5,13 @@ import type {Var,} from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import {memo,useCallback,useState,} from 'react'import { Plus02 } from '@/app/components/base/icons/src/vender/line/general'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import AddVariablePopup from '@/app/components/workflow/nodes/_base/components/add-variable-popup'import { useVariableAssigner } from '../../hooks'diff --git a/web/app/components/workflow/nodes/variable-assigner/components/var-group-item.tsx b/web/app/components/workflow/nodes/variable-assigner/components/var-group-item.tsxindex 738e986e9cc..bc1e428b6a3 100644--- a/web/app/components/workflow/nodes/variable-assigner/components/var-group-item.tsx+++ b/web/app/components/workflow/nodes/variable-assigner/components/var-group-item.tsx@@ -2,6 +2,7 @@import type { ChangeEvent, FC } from 'react'import type { VarGroupItem as VarGroupItemType } from '../types'import type { NodeOutPutVar, ValueSelector, Var } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import {RiDeleteBinLine,} from '@remixicon/react'@@ -11,7 +12,6 @@ import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { Folder } from '@/app/components/base/icons/src/vender/line/files'-import { toast } from '@/app/components/base/ui/toast'import Field from '@/app/components/workflow/nodes/_base/components/field'import { VarType as VarKindType } from '@/app/components/workflow/nodes/tool/types'import { VarType } from '@/app/components/workflow/types'diff --git a/web/app/components/workflow/nodes/variable-assigner/panel.tsx b/web/app/components/workflow/nodes/variable-assigner/panel.tsxindex 922db3dcc33..93eaa9f9f4c 100644--- a/web/app/components/workflow/nodes/variable-assigner/panel.tsx+++ b/web/app/components/workflow/nodes/variable-assigner/panel.tsx@@ -2,9 +2,9 @@ import type { FC } from 'react'import type { VariableAssignerNodeType } from './types'import type { NodePanelProps } from '@/app/components/workflow/types'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import * as React from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'import AddButton from '@/app/components/workflow/nodes/_base/components/add-button'import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars'import Split from '@/app/components/workflow/nodes/_base/components/split'diff --git a/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/__tests__/hooks.spec.tsx b/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/__tests__/hooks.spec.tsxindex c3233b49d74..4272050fac9 100644--- a/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/__tests__/hooks.spec.tsx+++ b/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/__tests__/hooks.spec.tsx@@ -58,7 +58,7 @@ vi.mock('lexical', () => ({COMMAND_PRIORITY_LOW: 1,}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: mockToastError,},diff --git a/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/component.tsx b/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/component.tsxindex c67b658de67..754905cd462 100644--- a/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/component.tsx+++ b/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/component.tsx@@ -5,6 +5,7 @@ import {shift,useFloating,} from '@floating-ui/react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiEditLine,@@ -19,7 +20,6 @@ import {useState,} from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { useStore } from '../../store'import { useLink } from './hooks'diff --git a/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/hooks.ts b/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/hooks.tsindex 75a5a36fd0e..6debfa5f8b2 100644--- a/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/hooks.ts+++ b/web/app/components/workflow/note-node/note-editor/plugins/link-editor-plugin/hooks.ts@@ -1,3 +1,4 @@+import { toast } from '@langgenius/dify-ui/toast'import { TOGGLE_LINK_COMMAND } from '@lexical/link'import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { mergeRegister } from '@lexical/utils'@@ -5,7 +6,6 @@ import { escape } from 'es-toolkit/string'import { CLICK_COMMAND, COMMAND_PRIORITY_LOW } from 'lexical'import { useCallback, useEffect } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { useNoteEditorStore } from '../../store'import { urlRegExp } from '../../utils'diff --git a/web/app/components/workflow/note-node/note-editor/toolbar/__tests__/operator.spec.tsx b/web/app/components/workflow/note-node/note-editor/toolbar/__tests__/operator.spec.tsxindex c60898b29ea..a7959d12525 100644--- a/web/app/components/workflow/note-node/note-editor/toolbar/__tests__/operator.spec.tsx+++ b/web/app/components/workflow/note-node/note-editor/toolbar/__tests__/operator.spec.tsx@@ -25,7 +25,7 @@ type DropdownTriggerProps = {'aria-label'?: string}-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const React = await import('react')const DropdownMenuContext = React.createContext<{ open: boolean, setOpen: (open: boolean) => void } | null>(null)diff --git a/web/app/components/workflow/note-node/note-editor/toolbar/operator.tsx b/web/app/components/workflow/note-node/note-editor/toolbar/operator.tsxindex b17af7fec7b..bfbfe317c7a 100644--- a/web/app/components/workflow/note-node/note-editor/toolbar/operator.tsx+++ b/web/app/components/workflow/note-node/note-editor/toolbar/operator.tsx@@ -1,17 +1,17 @@import { cn } from '@langgenius/dify-ui/cn'-import {- memo,- useState,-} from 'react'-import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { Switch } from '@langgenius/dify-ui/switch'+import {+ memo,+ useState,+} from 'react'+import { useTranslation } from 'react-i18next'import ShortcutsName from '@/app/components/workflow/shortcuts-name'export type OperatorProps = {diff --git a/web/app/components/workflow/operator/__tests__/more-actions.spec.tsx b/web/app/components/workflow/operator/__tests__/more-actions.spec.tsxindex b984ca18d6e..df5dea301d0 100644--- a/web/app/components/workflow/operator/__tests__/more-actions.spec.tsx+++ b/web/app/components/workflow/operator/__tests__/more-actions.spec.tsx@@ -29,7 +29,7 @@ vi.mock('react-i18next', () => ({}),}))-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const React = await import('react')const DropdownMenuContext = React.createContext<{ open: boolean, setOpen: (open: boolean) => void } | null>(null)diff --git a/web/app/components/workflow/operator/more-actions.tsx b/web/app/components/workflow/operator/more-actions.tsxindex 66dbed1a912..c7ea22e1ca0 100644--- a/web/app/components/workflow/operator/more-actions.tsx+++ b/web/app/components/workflow/operator/more-actions.tsx@@ -1,5 +1,12 @@import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import { RiExportLine, RiMoreFill } from '@remixicon/react'import { toJpeg, toPng, toSvg } from 'html-to-image'import {@@ -13,13 +20,6 @@ import { getNodesBounds, useReactFlow } from 'reactflow'import { useShallow } from 'zustand/react/shallow'import { useStore as useAppStore } from '@/app/components/app/store'import ImagePreview from '@/app/components/base/image-uploader/image-preview'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuSeparator,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import { useStore } from '@/app/components/workflow/store'import { downloadUrl } from '@/utils/download'import { useNodesReadOnly } from '../hooks'diff --git a/web/app/components/workflow/operator/zoom-in-out.tsx b/web/app/components/workflow/operator/zoom-in-out.tsxindex 14118b36c92..78b07af347f 100644--- a/web/app/components/workflow/operator/zoom-in-out.tsx+++ b/web/app/components/workflow/operator/zoom-in-out.tsx@@ -1,5 +1,12 @@import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import {Fragment,memo,@@ -10,13 +17,6 @@ import {useReactFlow,useViewport,} from 'reactflow'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuSeparator,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import { useGlobalPublicStore } from '@/context/global-public-context'import {useNodesSyncDraft,diff --git a/web/app/components/workflow/panel/__tests__/inputs-panel.spec.tsx b/web/app/components/workflow/panel/__tests__/inputs-panel.spec.tsxindex c8ad5f3dde7..41174d97a1e 100644--- a/web/app/components/workflow/panel/__tests__/inputs-panel.spec.tsx+++ b/web/app/components/workflow/panel/__tests__/inputs-panel.spec.tsx@@ -17,7 +17,7 @@ vi.mock('next/navigation', () => ({useParams: () => ({}),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: (message: string) => mockNotify({ type: 'success', message }),error: (message: string) => mockNotify({ type: 'error', message }),diff --git a/web/app/components/workflow/panel/__tests__/workflow-preview.spec.tsx b/web/app/components/workflow/panel/__tests__/workflow-preview.spec.tsxindex e3c85bd2adf..9b5f89ebd04 100644--- a/web/app/components/workflow/panel/__tests__/workflow-preview.spec.tsx+++ b/web/app/components/workflow/panel/__tests__/workflow-preview.spec.tsx@@ -1,9 +1,9 @@import type { Shape } from '../../store/workflow'import type { HumanInputFilledFormData, HumanInputFormData } from '@/types/workflow'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import copy from 'copy-to-clipboard'-import { toast } from '@/app/components/base/ui/toast'import { createNodeTracing, createWorkflowRunningData } from '@/app/components/workflow/__tests__/fixtures'import { renderWorkflowComponent } from '@/app/components/workflow/__tests__/workflow-test-env'import { WorkflowRunningStatus } from '@/app/components/workflow/types'@@ -16,7 +16,7 @@ vi.mock('copy-to-clipboard', () => ({default: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),},diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/__tests__/object-value-item.spec.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/__tests__/object-value-item.spec.tsxindex 9ed1bed1f4a..e2e7c2d562b 100644--- a/web/app/components/workflow/panel/chat-variable-panel/components/__tests__/object-value-item.spec.tsx+++ b/web/app/components/workflow/panel/chat-variable-panel/components/__tests__/object-value-item.spec.tsx@@ -4,7 +4,7 @@ import ObjectValueItem, { DEFAULT_OBJECT_VALUE } from '../object-value-item'const toastError = vi.fn()-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => toastError(...args),},diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/__tests__/variable-modal.spec.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/__tests__/variable-modal.spec.tsxindex 67437b574ab..cf9400636e1 100644--- a/web/app/components/workflow/panel/chat-variable-panel/components/__tests__/variable-modal.spec.tsx+++ b/web/app/components/workflow/panel/chat-variable-panel/components/__tests__/variable-modal.spec.tsx@@ -1,7 +1,7 @@+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'-import { toast } from '@/app/components/base/ui/toast'import { renderWorkflowComponent } from '@/app/components/workflow/__tests__/workflow-test-env'import { ChatVarType } from '../../type'import VariableModal from '../variable-modal'@@ -10,7 +10,7 @@ vi.mock('uuid', () => ({v4: () => 'generated-id',}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: vi.fn(),info: vi.fn(),diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/array-bool-list.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/array-bool-list.tsxindex 8a896b0913d..7a1f41028bf 100644--- a/web/app/components/workflow/panel/chat-variable-panel/components/array-bool-list.tsx+++ b/web/app/components/workflow/panel/chat-variable-panel/components/array-bool-list.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { RiAddLine } from '@remixicon/react'import { produce } from 'immer'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import RemoveButton from '@/app/components/workflow/nodes/_base/components/remove-button'import BoolValue from './bool-value'diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/array-value-list.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/array-value-list.tsxindex 8dc21edd093..f37cc4715d7 100644--- a/web/app/components/workflow/panel/chat-variable-panel/components/array-value-list.tsx+++ b/web/app/components/workflow/panel/chat-variable-panel/components/array-value-list.tsx@@ -1,12 +1,12 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { RiAddLine } from '@remixicon/react'import { produce } from 'immer'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'import RemoveButton from '@/app/components/workflow/nodes/_base/components/remove-button'type Props = {diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsxindex cd8e8468a5b..8ef7125f620 100644--- a/web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx+++ b/web/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'+import { toast } from '@langgenius/dify-ui/toast'import { produce } from 'immer'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import RemoveButton from '@/app/components/workflow/nodes/_base/components/remove-button'import VariableTypeSelector from '@/app/components/workflow/panel/chat-variable-panel/components/variable-type-select'import { ChatVarType } from '@/app/components/workflow/panel/chat-variable-panel/type'diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal-trigger.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal-trigger.tsxindex 35845cd0055..9c975834232 100644--- a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal-trigger.tsx+++ b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal-trigger.tsx@@ -1,10 +1,10 @@'use client'import type { ConversationVariable } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import { RiAddLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import VariableModal from '@/app/components/workflow/panel/chat-variable-panel/components/variable-modal'type Props = {diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.sections.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.sections.tsxindex e1ebe1306d4..894ca2f05d4 100644--- a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.sections.tsx+++ b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.sections.tsx@@ -1,8 +1,8 @@import type { ReactNode } from 'react'import type { ObjectValueItem } from './variable-modal.helpers'+import { Button } from '@langgenius/dify-ui/button'import { RiDraftLine, RiInputField } from '@remixicon/react'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'import { CodeLanguage } from '@/app/components/workflow/nodes/code/types'import { ChatVarType } from '../type'diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsxindex 70191b035d9..dac7d16efd7 100644--- a/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx+++ b/web/app/components/workflow/panel/chat-variable-panel/components/variable-modal.tsx@@ -1,11 +1,11 @@import type { ToastPayload } from './variable-modal.helpers'import type { ConversationVariable } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { ChatVarType } from '@/app/components/workflow/panel/chat-variable-panel/type'import { useWorkflowStore } from '@/app/components/workflow/store'import { replaceSpaceWithUnderscoreInVarNameInput } from '@/utils/var'diff --git a/web/app/components/workflow/panel/comments-panel/__tests__/index.spec.tsx b/web/app/components/workflow/panel/comments-panel/__tests__/index.spec.tsxindex 5abacd60356..49ae2a11a84 100644--- a/web/app/components/workflow/panel/comments-panel/__tests__/index.spec.tsx+++ b/web/app/components/workflow/panel/comments-panel/__tests__/index.spec.tsx@@ -109,8 +109,8 @@ vi.mock('@/app/components/base/user-avatar-list', () => ({UserAvatarList: () => <div data-testid="user-avatar-list" />,}))-vi.mock('@/app/components/base/switch', () => ({- default: ({ checked, onCheckedChange }: { checked: boolean, onCheckedChange: (value: boolean) => void }) => (+vi.mock('@langgenius/dify-ui/switch', () => ({+ Switch: ({ checked, onCheckedChange }: { checked: boolean, onCheckedChange: (value: boolean) => void }) => (<button type="button" data-testid="show-resolved-switch" onClick={() => onCheckedChange(!checked)}>toggle</button>diff --git a/web/app/components/workflow/panel/comments-panel/index.tsx b/web/app/components/workflow/panel/comments-panel/index.tsxindex 21b3c3c4e66..05480abb2bd 100644--- a/web/app/components/workflow/panel/comments-panel/index.tsx+++ b/web/app/components/workflow/panel/comments-panel/index.tsx@@ -1,10 +1,10 @@import type { WorkflowCommentList } from '@/service/workflow-comment'import { cn } from '@langgenius/dify-ui/cn'+import { Switch } from '@langgenius/dify-ui/switch'import { RiCheckboxCircleFill, RiCheckboxCircleLine, RiCheckLine, RiCloseLine, RiFilter3Line } from '@remixicon/react'import { memo, useCallback, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'-import Switch from '@/app/components/base/switch'import { UserAvatarList } from '@/app/components/base/user-avatar-list'import { collaborationManager } from '@/app/components/workflow/collaboration/core/collaboration-manager'import { useWorkflowComment } from '@/app/components/workflow/hooks/use-workflow-comment'diff --git a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks.spec.ts b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks.spec.tsindex 425dd90e87f..9a2b8a8df7f 100644--- a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks.spec.ts+++ b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks.spec.ts@@ -26,7 +26,7 @@ vi.mock('@/service/workflow', () => ({submitHumanInputForm: (...args: unknown[]) => mockSubmitHumanInputForm(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-resume.spec.ts b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-resume.spec.tsindex 04c19f50e92..5a608dcc5b1 100644--- a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-resume.spec.ts+++ b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-resume.spec.ts@@ -27,7 +27,7 @@ vi.mock('@/service/workflow', () => ({submitHumanInputForm: (...args: any[]) => mockSubmitHumanInputForm(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-send.spec.ts b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-send.spec.tsindex 0f6ae5d713c..fb045c47233 100644--- a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-send.spec.ts+++ b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-send.spec.ts@@ -26,7 +26,7 @@ vi.mock('@/service/workflow', () => ({submitHumanInputForm: (...args: any[]) => mockSubmitHumanInputForm(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-stop-restart.spec.ts b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-stop-restart.spec.tsindex d0b1908606e..2868471bd31 100644--- a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-stop-restart.spec.ts+++ b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/handle-stop-restart.spec.ts@@ -27,7 +27,7 @@ vi.mock('@/service/workflow', () => ({submitHumanInputForm: (...args: any[]) => mockSubmitHumanInputForm(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/misc.spec.ts b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/misc.spec.tsindex 549fe08e05b..cd2eaa0e007 100644--- a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/misc.spec.ts+++ b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/misc.spec.ts@@ -27,7 +27,7 @@ vi.mock('@/service/workflow', () => ({submitHumanInputForm: (...args: any[]) => mockSubmitHumanInputForm(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/opening-statement.spec.ts b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/opening-statement.spec.tsindex 57db5502b54..cb45029340b 100644--- a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/opening-statement.spec.ts+++ b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/opening-statement.spec.ts@@ -27,7 +27,7 @@ vi.mock('@/service/workflow', () => ({submitHumanInputForm: (...args: any[]) => mockSubmitHumanInputForm(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/sse-callbacks.spec.ts b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/sse-callbacks.spec.tsindex 03857ce3d6a..f8f3a02c5c9 100644--- a/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/sse-callbacks.spec.ts+++ b/web/app/components/workflow/panel/debug-and-preview/__tests__/hooks/sse-callbacks.spec.ts@@ -26,7 +26,7 @@ vi.mock('@/service/workflow', () => ({submitHumanInputForm: (...args: any[]) => mockSubmitHumanInputForm(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/panel/debug-and-preview/hooks.ts b/web/app/components/workflow/panel/debug-and-preview/hooks.tsindex 6eef69bfdb1..a94e4c1edd0 100644--- a/web/app/components/workflow/panel/debug-and-preview/hooks.ts+++ b/web/app/components/workflow/panel/debug-and-preview/hooks.ts@@ -6,6 +6,7 @@ import type {} from '@/app/components/base/chat/types'import type { FileEntity } from '@/app/components/base/file-uploader/types'import type { IOtherOptions } from '@/service/base'+import { toast } from '@langgenius/dify-ui/toast'import { uniqBy } from 'es-toolkit/compat'import { produce, setAutoFreeze } from 'immer'import {@@ -26,7 +27,6 @@ import {getProcessedFiles,getProcessedFilesFromResponse,} from '@/app/components/base/file-uploader/utils'-import { toast } from '@/app/components/base/ui/toast'import {CUSTOM_NODE,} from '@/app/components/workflow/constants'diff --git a/web/app/components/workflow/panel/env-panel/__tests__/variable-modal.spec.tsx b/web/app/components/workflow/panel/env-panel/__tests__/variable-modal.spec.tsxindex 7e97ef62dc0..258784b6922 100644--- a/web/app/components/workflow/panel/env-panel/__tests__/variable-modal.spec.tsx+++ b/web/app/components/workflow/panel/env-panel/__tests__/variable-modal.spec.tsx@@ -1,14 +1,14 @@import type { ReactElement } from 'react'import type { Shape } from '@/app/components/workflow/store/workflow'import type { EnvironmentVariable } from '@/app/components/workflow/types'+import { toast } from '@langgenius/dify-ui/toast'import { fireEvent, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { toast } from '@/app/components/base/ui/toast'import { WorkflowContext } from '@/app/components/workflow/context'import { createWorkflowStore } from '@/app/components/workflow/store/workflow'import VariableModal from '../variable-modal'-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/panel/env-panel/variable-modal.tsx b/web/app/components/workflow/panel/env-panel/variable-modal.tsxindex e824dd9f087..267c014e1dd 100644--- a/web/app/components/workflow/panel/env-panel/variable-modal.tsx+++ b/web/app/components/workflow/panel/env-panel/variable-modal.tsx@@ -1,5 +1,7 @@import type { EnvironmentVariable } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCloseLine } from '@remixicon/react'import * as React from 'react'import { useEffect } from 'react'@@ -7,8 +9,6 @@ import { useTranslation } from 'react-i18next'import { v4 as uuid4 } from 'uuid'import Input from '@/app/components/base/input'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useWorkflowStore } from '@/app/components/workflow/store'import { checkKeys, replaceSpaceWithUnderscoreInVarNameInput } from '@/utils/var'diff --git a/web/app/components/workflow/panel/env-panel/variable-trigger.tsx b/web/app/components/workflow/panel/env-panel/variable-trigger.tsxindex e075238e484..378fc1c1b5c 100644--- a/web/app/components/workflow/panel/env-panel/variable-trigger.tsx+++ b/web/app/components/workflow/panel/env-panel/variable-trigger.tsx@@ -1,10 +1,10 @@'use client'import type { EnvironmentVariable } from '@/app/components/workflow/types'+import { Button } from '@langgenius/dify-ui/button'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'import { RiAddLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { Popover, PopoverContent, PopoverTrigger } from '@/app/components/base/ui/popover'import VariableModal from '@/app/components/workflow/panel/env-panel/variable-modal'type Props = {diff --git a/web/app/components/workflow/panel/inputs-panel.tsx b/web/app/components/workflow/panel/inputs-panel.tsxindex 4e6255a2c0a..10004236dd8 100644--- a/web/app/components/workflow/panel/inputs-panel.tsx+++ b/web/app/components/workflow/panel/inputs-panel.tsx@@ -1,4 +1,5 @@import type { StartNodeType } from '../nodes/start/types'+import { Button } from '@langgenius/dify-ui/button'import {memo,useCallback,@@ -10,7 +11,6 @@ import { useCheckInputsForms } from '@/app/components/base/chat/chat/check-inputimport {getProcessedInputs,} from '@/app/components/base/chat/chat/utils'-import { Button } from '@/app/components/base/ui/button'import { TransferMethod } from '../../base/text-generation/types'import { useWorkflowRun } from '../hooks'import { useHooksStore } from '../hooks-store'diff --git a/web/app/components/workflow/panel/version-history-panel/context-menu/__tests__/menu-item.spec.tsx b/web/app/components/workflow/panel/version-history-panel/context-menu/__tests__/menu-item.spec.tsxindex 844e1890674..7dfc362a908 100644--- a/web/app/components/workflow/panel/version-history-panel/context-menu/__tests__/menu-item.spec.tsx+++ b/web/app/components/workflow/panel/version-history-panel/context-menu/__tests__/menu-item.spec.tsx@@ -1,6 +1,6 @@+import { DropdownMenu, DropdownMenuContent } from '@langgenius/dify-ui/dropdown-menu'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { DropdownMenu, DropdownMenuContent } from '@/app/components/base/ui/dropdown-menu'import { VersionHistoryContextMenuOptions } from '../../../../types'import MenuItem from '../menu-item'diff --git a/web/app/components/workflow/panel/version-history-panel/context-menu/index.tsx b/web/app/components/workflow/panel/version-history-panel/context-menu/index.tsxindex f0639027531..1b90166f65b 100644--- a/web/app/components/workflow/panel/version-history-panel/context-menu/index.tsx+++ b/web/app/components/workflow/panel/version-history-panel/context-menu/index.tsx@@ -1,13 +1,13 @@import type { FC } from 'react'-import { RiMoreFill } from '@remixicon/react'-import * as React from 'react'-import { Button } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import {DropdownMenu,DropdownMenuContent,DropdownMenuSeparator,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { RiMoreFill } from '@remixicon/react'+import * as React from 'react'import { VersionHistoryContextMenuOptions } from '../../../types'import MenuItem from './menu-item'import useContextMenu from './use-context-menu'diff --git a/web/app/components/workflow/panel/version-history-panel/context-menu/menu-item.tsx b/web/app/components/workflow/panel/version-history-panel/context-menu/menu-item.tsxindex b1d9ef6ec5d..0c0096ab254 100644--- a/web/app/components/workflow/panel/version-history-panel/context-menu/menu-item.tsx+++ b/web/app/components/workflow/panel/version-history-panel/context-menu/menu-item.tsx@@ -1,8 +1,8 @@import type { FC } from 'react'import type { VersionHistoryContextMenuOptions } from '../../../types'import { cn } from '@langgenius/dify-ui/cn'+import { DropdownMenuItem } from '@langgenius/dify-ui/dropdown-menu'import * as React from 'react'-import { DropdownMenuItem } from '@/app/components/base/ui/dropdown-menu'type MenuItemProps = {item: {diff --git a/web/app/components/workflow/panel/version-history-panel/delete-confirm-modal.tsx b/web/app/components/workflow/panel/version-history-panel/delete-confirm-modal.tsxindex 4779be89847..1f7948c41b7 100644--- a/web/app/components/workflow/panel/version-history-panel/delete-confirm-modal.tsx+++ b/web/app/components/workflow/panel/version-history-panel/delete-confirm-modal.tsx@@ -1,9 +1,9 @@import type { FC } from 'react'import type { VersionHistory } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'type DeleteConfirmModalProps = {isOpen: booleandiff --git a/web/app/components/workflow/panel/version-history-panel/empty.tsx b/web/app/components/workflow/panel/version-history-panel/empty.tsxindex 2c8f6655e15..21751234d71 100644--- a/web/app/components/workflow/panel/version-history-panel/empty.tsx+++ b/web/app/components/workflow/panel/version-history-panel/empty.tsx@@ -1,8 +1,8 @@import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'import { RiHistoryLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type EmptyProps = {onResetFilter: () => voiddiff --git a/web/app/components/workflow/panel/version-history-panel/filter/filter-switch.tsx b/web/app/components/workflow/panel/version-history-panel/filter/filter-switch.tsxindex 1df519d0f37..587dc43bdfb 100644--- a/web/app/components/workflow/panel/version-history-panel/filter/filter-switch.tsx+++ b/web/app/components/workflow/panel/version-history-panel/filter/filter-switch.tsx@@ -1,7 +1,7 @@import type { FC } from 'react'+import { Switch } from '@langgenius/dify-ui/switch'import * as React from 'react'import { useTranslation } from 'react-i18next'-import Switch from '@/app/components/base/switch'type FilterSwitchProps = {enabled: booleandiff --git a/web/app/components/workflow/panel/version-history-panel/index.tsx b/web/app/components/workflow/panel/version-history-panel/index.tsxindex 10dd0e794a1..eb1f5c962e2 100644--- a/web/app/components/workflow/panel/version-history-panel/index.tsx+++ b/web/app/components/workflow/panel/version-history-panel/index.tsx@@ -1,5 +1,6 @@'use client'import type { VersionHistory } from '@/types/workflow'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowDownDoubleLine, RiCloseLine, RiLoader2Line } from '@remixicon/react'import copy from 'copy-to-clipboard'import * as React from 'react'@@ -7,7 +8,6 @@ import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import VersionInfoModal from '@/app/components/app/app-publisher/version-info-modal'import Divider from '@/app/components/base/divider'-import { toast } from '@/app/components/base/ui/toast'import { useSelector as useAppContextSelector } from '@/context/app-context'import { useDeleteWorkflow, useInvalidAllLastRun, useResetWorkflowVersionHistory, useRestoreWorkflow, useUpdateWorkflow, useWorkflowVersionHistory } from '@/service/use-workflow'import { useDSL, useWorkflowRefreshDraft, useWorkflowRun } from '../../hooks'diff --git a/web/app/components/workflow/panel/version-history-panel/restore-confirm-modal.tsx b/web/app/components/workflow/panel/version-history-panel/restore-confirm-modal.tsxindex 695e6fe35c4..9fc2c25742c 100644--- a/web/app/components/workflow/panel/version-history-panel/restore-confirm-modal.tsx+++ b/web/app/components/workflow/panel/version-history-panel/restore-confirm-modal.tsx@@ -1,9 +1,9 @@import type { FC } from 'react'import type { VersionHistory } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import * as React from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'type RestoreConfirmModalProps = {isOpen: booleandiff --git a/web/app/components/workflow/panel/workflow-preview.tsx b/web/app/components/workflow/panel/workflow-preview.tsxindex e28c494b206..89ae09c3744 100644--- a/web/app/components/workflow/panel/workflow-preview.tsx+++ b/web/app/components/workflow/panel/workflow-preview.tsx@@ -1,4 +1,6 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import copy from 'copy-to-clipboard'import {memo,@@ -8,8 +10,6 @@ import {} from 'react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { submitHumanInputForm } from '@/service/workflow'import {useWorkflowInteractions,diff --git a/web/app/components/workflow/run/__tests__/index.spec.tsx b/web/app/components/workflow/run/__tests__/index.spec.tsxindex 87937dfb4f4..39f26df97ef 100644--- a/web/app/components/workflow/run/__tests__/index.spec.tsx+++ b/web/app/components/workflow/run/__tests__/index.spec.tsx@@ -22,7 +22,7 @@ vi.mock('@/service/log', () => ({fetchTracingList: (...args: unknown[]) => mockFetchTracingList(...args),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {error: (...args: unknown[]) => mockToastError(...args),},diff --git a/web/app/components/workflow/run/agent-log/__tests__/agent-log-nav-more.spec.tsx b/web/app/components/workflow/run/agent-log/__tests__/agent-log-nav-more.spec.tsxindex 35b32a5ce65..e2837406135 100644--- a/web/app/components/workflow/run/agent-log/__tests__/agent-log-nav-more.spec.tsx+++ b/web/app/components/workflow/run/agent-log/__tests__/agent-log-nav-more.spec.tsx@@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import AgentLogNavMore from '../agent-log-nav-more'-vi.mock('@/app/components/base/ui/dropdown-menu', async () => {+vi.mock('@langgenius/dify-ui/dropdown-menu', async () => {const React = await import('react')const DropdownMenuContext = React.createContext<{ open: boolean, setOpen: (open: boolean) => void } | null>(null)diff --git a/web/app/components/workflow/run/agent-log/agent-log-item.tsx b/web/app/components/workflow/run/agent-log/agent-log-item.tsxindex e1714c5f35b..67da9c7aa93 100644--- a/web/app/components/workflow/run/agent-log/agent-log-item.tsx+++ b/web/app/components/workflow/run/agent-log/agent-log-item.tsx@@ -1,4 +1,5 @@import type { AgentLogItemWithChildren } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import {RiArrowRightSLine,@@ -8,7 +9,6 @@ import {useMemo,useState,} from 'react'-import { Button } from '@/app/components/base/ui/button'import useGetIcon from '@/app/components/plugins/install-plugin/base/use-get-icon'import BlockIcon from '@/app/components/workflow/block-icon'import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'diff --git a/web/app/components/workflow/run/agent-log/agent-log-nav-more.tsx b/web/app/components/workflow/run/agent-log/agent-log-nav-more.tsxindex 77f3c778a6f..5c8d1000120 100644--- a/web/app/components/workflow/run/agent-log/agent-log-nav-more.tsx+++ b/web/app/components/workflow/run/agent-log/agent-log-nav-more.tsx@@ -1,13 +1,13 @@import type { AgentLogItemWithChildren } from '@/types/workflow'-import { RiMoreLine } from '@remixicon/react'-import { useState } from 'react'-import { Button } from '@/app/components/base/ui/button'+import { Button } from '@langgenius/dify-ui/button'import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'+} from '@langgenius/dify-ui/dropdown-menu'+import { RiMoreLine } from '@remixicon/react'+import { useState } from 'react'type AgentLogNavMoreProps = {options: AgentLogItemWithChildren[]diff --git a/web/app/components/workflow/run/agent-log/agent-log-nav.tsx b/web/app/components/workflow/run/agent-log/agent-log-nav.tsxindex 2548256cb1b..7996595186d 100644--- a/web/app/components/workflow/run/agent-log/agent-log-nav.tsx+++ b/web/app/components/workflow/run/agent-log/agent-log-nav.tsx@@ -1,7 +1,7 @@import type { AgentLogItemWithChildren } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowLeftLine } from '@remixicon/react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import AgentLogNavMore from './agent-log-nav-more'type AgentLogNavProps = {diff --git a/web/app/components/workflow/run/index.tsx b/web/app/components/workflow/run/index.tsxindex bd71b662f5d..d0666901200 100644--- a/web/app/components/workflow/run/index.tsx+++ b/web/app/components/workflow/run/index.tsx@@ -3,10 +3,10 @@ import type { FC } from 'react'import type { WorkflowRunDetailResponse } from '@/models/log'import type { NodeTracing } from '@/types/workflow'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { toast } from '@/app/components/base/ui/toast'import { WorkflowRunningStatus } from '@/app/components/workflow/types'import { fetchRunDetail, fetchTracingList } from '@/service/log'import { useStore } from '../store'diff --git a/web/app/components/workflow/run/iteration-log/iteration-log-trigger.tsx b/web/app/components/workflow/run/iteration-log/iteration-log-trigger.tsxindex 77b94255014..8fb857f344b 100644--- a/web/app/components/workflow/run/iteration-log/iteration-log-trigger.tsx+++ b/web/app/components/workflow/run/iteration-log/iteration-log-trigger.tsx@@ -2,10 +2,10 @@ import type {IterationDurationMap,NodeTracing,} from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowRightSLine } from '@remixicon/react'import { useTranslation } from 'react-i18next'import { Iteration } from '@/app/components/base/icons/src/vender/workflow'-import { Button } from '@/app/components/base/ui/button'import { NodeRunningStatus } from '@/app/components/workflow/types'type IterationLogTriggerProps = {diff --git a/web/app/components/workflow/run/loop-log/loop-log-trigger.tsx b/web/app/components/workflow/run/loop-log/loop-log-trigger.tsxindex 42593e564f5..277db8cef49 100644--- a/web/app/components/workflow/run/loop-log/loop-log-trigger.tsx+++ b/web/app/components/workflow/run/loop-log/loop-log-trigger.tsx@@ -3,10 +3,10 @@ import type {LoopVariableMap,NodeTracing,} from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import { RiArrowRightSLine } from '@remixicon/react'import { useTranslation } from 'react-i18next'import { Loop } from '@/app/components/base/icons/src/vender/workflow'-import { Button } from '@/app/components/base/ui/button'type LoopLogTriggerProps = {nodeInfo: NodeTracingdiff --git a/web/app/components/workflow/run/retry-log/retry-log-trigger.tsx b/web/app/components/workflow/run/retry-log/retry-log-trigger.tsxindex 592b7775f16..84c7808df13 100644--- a/web/app/components/workflow/run/retry-log/retry-log-trigger.tsx+++ b/web/app/components/workflow/run/retry-log/retry-log-trigger.tsx@@ -1,10 +1,10 @@import type { NodeTracing } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import {RiArrowRightSLine,RiRestartFill,} from '@remixicon/react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'type RetryLogTriggerProps = {nodeInfo: NodeTracingdiff --git a/web/app/components/workflow/selection-contextmenu.tsx b/web/app/components/workflow/selection-contextmenu.tsxindex c82f431ddf2..26b5429df4c 100644--- a/web/app/components/workflow/selection-contextmenu.tsx+++ b/web/app/components/workflow/selection-contextmenu.tsx@@ -1,4 +1,12 @@import type { Node } from './types'+import {+ ContextMenu,+ ContextMenuContent,+ ContextMenuGroup,+ ContextMenuItem,+ ContextMenuLabel,+ ContextMenuSeparator,+} from '@langgenius/dify-ui/context-menu'import { produce } from 'immer'import {memo,@@ -8,14 +16,6 @@ import {} from 'react'import { useTranslation } from 'react-i18next'import { useStore as useReactFlowStore } from 'reactflow'-import {- ContextMenu,- ContextMenuContent,- ContextMenuGroup,- ContextMenuItem,- ContextMenuLabel,- ContextMenuSeparator,-} from '@/app/components/base/ui/context-menu'import { useCollaborativeWorkflow } from '@/app/components/workflow/hooks/use-collaborative-workflow'import { useNodesInteractions, useNodesReadOnly, useNodesSyncDraft } from './hooks'import { useSelectionInteractions } from './hooks/use-selection-interactions'diff --git a/web/app/components/workflow/update-dsl-modal.tsx b/web/app/components/workflow/update-dsl-modal.tsxindex 04d687ce731..cfa9c995eb4 100644--- a/web/app/components/workflow/update-dsl-modal.tsx+++ b/web/app/components/workflow/update-dsl-modal.tsx@@ -1,6 +1,8 @@'use client'import type { MouseEventHandler } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import {RiAlertFill,RiCloseLine,@@ -16,8 +18,6 @@ import { useTranslation } from 'react-i18next'import Uploader from '@/app/components/app/create-from-dsl-modal/uploader'import { useStore as useAppStore } from '@/app/components/app/store'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks'import { useEventEmitterContextContext } from '@/context/event-emitter'import {diff --git a/web/app/components/workflow/variable-inspect/__tests__/value-content-sections.spec.tsx b/web/app/components/workflow/variable-inspect/__tests__/value-content-sections.spec.tsxindex 2ebe5271046..bba17a7c32c 100644--- a/web/app/components/workflow/variable-inspect/__tests__/value-content-sections.spec.tsx+++ b/web/app/components/workflow/variable-inspect/__tests__/value-content-sections.spec.tsx@@ -18,7 +18,7 @@ const toastMocks = vi.hoisted(() => ({promise: vi.fn(),}))-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: Object.assign(toastMocks.call, {success: vi.fn(),error: vi.fn(),diff --git a/web/app/components/workflow/variable-inspect/group.tsx b/web/app/components/workflow/variable-inspect/group.tsxindex 7d942267863..24786e4b1f1 100644--- a/web/app/components/workflow/variable-inspect/group.tsx+++ b/web/app/components/workflow/variable-inspect/group.tsx@@ -10,7 +10,7 @@ import {} from '@remixicon/react'import { useState } from 'react'import { useTranslation } from 'react-i18next'-// import { Button } from '@/app/components/base/ui/button'+// import { Button } from '@langgenius/dify-ui/button'import ActionButton from '@/app/components/base/action-button'import Tooltip from '@/app/components/base/tooltip'import BlockIcon from '@/app/components/workflow/block-icon'diff --git a/web/app/components/workflow/variable-inspect/left.tsx b/web/app/components/workflow/variable-inspect/left.tsxindex f3450cea138..6d590eb2819 100644--- a/web/app/components/workflow/variable-inspect/left.tsx+++ b/web/app/components/workflow/variable-inspect/left.tsx@@ -1,10 +1,10 @@import type { currentVarType } from './panel'import type { VarInInspect } from '@/types/workflow'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'// import { useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { VarInInspectType } from '@/types/workflow'import useCurrentVars from '../hooks/use-inspect-vars-crud'import { useNodesInteractions } from '../hooks/use-nodes-interactions'diff --git a/web/app/components/workflow/variable-inspect/listening.tsx b/web/app/components/workflow/variable-inspect/listening.tsxindex 4559665ffae..3994355d58c 100644--- a/web/app/components/workflow/variable-inspect/listening.tsx+++ b/web/app/components/workflow/variable-inspect/listening.tsx@@ -3,13 +3,13 @@ import type { FC } from 'react'import type { Node } from 'reactflow'import type { ScheduleTriggerNodeType } from '@/app/components/workflow/nodes/trigger-schedule/types'import type { WebhookTriggerNodeType } from '@/app/components/workflow/nodes/trigger-webhook/types'+import { Button } from '@langgenius/dify-ui/button'import copy from 'copy-to-clipboard'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import { useStoreApi } from 'reactflow'import { StopCircle } from '@/app/components/base/icons/src/vender/line/mediaAndDevices'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'import BlockIcon from '@/app/components/workflow/block-icon'import { useGetToolIcon } from '@/app/components/workflow/hooks/use-tool-icon'import { getNextExecutionTime } from '@/app/components/workflow/nodes/trigger-schedule/utils/execution-time-calculator'diff --git a/web/app/components/workflow/workflow-preview/components/zoom-in-out.tsx b/web/app/components/workflow/workflow-preview/components/zoom-in-out.tsxindex 3f714c5ca96..9ea32caec39 100644--- a/web/app/components/workflow/workflow-preview/components/zoom-in-out.tsx+++ b/web/app/components/workflow/workflow-preview/components/zoom-in-out.tsx@@ -1,5 +1,12 @@import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuSeparator,+ DropdownMenuTrigger,+} from '@langgenius/dify-ui/dropdown-menu'import {Fragment,memo,@@ -10,13 +17,6 @@ import {useReactFlow,useViewport,} from 'reactflow'-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuSeparator,- DropdownMenuTrigger,-} from '@/app/components/base/ui/dropdown-menu'import TipPopup from '@/app/components/workflow/operator/tip-popup'import ShortcutsName from '@/app/components/workflow/shortcuts-name'diff --git a/web/app/education-apply/education-apply-page.tsx b/web/app/education-apply/education-apply-page.tsxindex 7fda139aa9f..93259c1ccbd 100644--- a/web/app/education-apply/education-apply-page.tsx+++ b/web/app/education-apply/education-apply-page.tsx@@ -1,5 +1,7 @@'use client'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiExternalLinkLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import {@@ -7,8 +9,6 @@ import {} from 'react'import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { EDUCATION_VERIFYING_LOCALSTORAGE_ITEM } from '@/app/education-apply/constants'import { useDocLink } from '@/context/i18n'import { useProviderContext } from '@/context/provider-context'diff --git a/web/app/education-apply/expire-notice-modal.tsx b/web/app/education-apply/expire-notice-modal.tsxindex ec88bba1b53..e54afaecde3 100644--- a/web/app/education-apply/expire-notice-modal.tsx+++ b/web/app/education-apply/expire-notice-modal.tsx@@ -1,9 +1,9 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { RiExternalLinkLine } from '@remixicon/react'import * as React from 'react'import { useTranslation } from 'react-i18next'import Modal from '@/app/components/base/modal'-import { Button } from '@/app/components/base/ui/button'import { useDocLink } from '@/context/i18n'import { useModalContextSelector } from '@/context/modal-context'import useTimestamp from '@/hooks/use-timestamp'diff --git a/web/app/education-apply/user-info.tsx b/web/app/education-apply/user-info.tsxindex 32d56b27808..be9b319038d 100644--- a/web/app/education-apply/user-info.tsx+++ b/web/app/education-apply/user-info.tsx@@ -1,7 +1,7 @@+import { Avatar } from '@langgenius/dify-ui/avatar'+import { Button } from '@langgenius/dify-ui/button'import { useTranslation } from 'react-i18next'import { Triangle } from '@/app/components/base/icons/src/public/education'-import { Avatar } from '@/app/components/base/ui/avatar'-import { Button } from '@/app/components/base/ui/button'import { useAppContext } from '@/context/app-context'import { useRouter } from '@/next/navigation'import { useLogout } from '@/service/use-common'diff --git a/web/app/education-apply/verify-state-modal.tsx b/web/app/education-apply/verify-state-modal.tsxindex c4d836f178e..bb7439352e1 100644--- a/web/app/education-apply/verify-state-modal.tsx+++ b/web/app/education-apply/verify-state-modal.tsx@@ -1,3 +1,4 @@+import { Button } from '@langgenius/dify-ui/button'import {RiExternalLinkLine,} from '@remixicon/react'@@ -5,7 +6,6 @@ import * as React from 'react'import { useEffect, useRef, useState } from 'react'import { createPortal } from 'react-dom'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { useDocLink } from '@/context/i18n'type IConfirm = {diff --git a/web/app/forgot-password/ChangePasswordForm.tsx b/web/app/forgot-password/ChangePasswordForm.tsxindex bf262181a99..deb520c4364 100644--- a/web/app/forgot-password/ChangePasswordForm.tsx+++ b/web/app/forgot-password/ChangePasswordForm.tsx@@ -1,11 +1,11 @@'use client'import { CheckCircleIcon } from '@heroicons/react/24/solid'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Loading from '@/app/components/base/loading'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { validPassword } from '@/config'import { useSearchParams } from '@/next/navigation'import { changePasswordWithToken } from '@/service/common'diff --git a/web/app/forgot-password/ForgotPasswordForm.tsx b/web/app/forgot-password/ForgotPasswordForm.tsxindex 7ce5e7d8ddb..b4fba60182e 100644--- a/web/app/forgot-password/ForgotPasswordForm.tsx+++ b/web/app/forgot-password/ForgotPasswordForm.tsx@@ -1,15 +1,15 @@'use client'import type { InitValidateStatusResponse } from '@/models/common'+import { Button } from '@langgenius/dify-ui/button'+import { useStore } from '@tanstack/react-form'import * as React from 'react'-import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import * as z from 'zod'import { formContext, useAppForm } from '@/app/components/base/form'import { zodSubmitValidator } from '@/app/components/base/form/utils/zod-submit-validator'-import { Button } from '@/app/components/base/ui/button'import { useRouter } from '@/next/navigation'import {fetchInitValidateStatus,diff --git a/web/app/init/InitPasswordPopup.tsx b/web/app/init/InitPasswordPopup.tsxindex b0c74978fa4..6b25fa371a9 100644--- a/web/app/init/InitPasswordPopup.tsx+++ b/web/app/init/InitPasswordPopup.tsx@@ -1,9 +1,9 @@'use client'import type { InitValidateStatusResponse } from '@/models/common'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import useDocumentTitle from '@/hooks/use-document-title'import { useRouter } from '@/next/navigation'import { fetchInitValidateStatus, initValidate } from '@/service/common'diff --git a/web/app/install/installForm.tsx b/web/app/install/installForm.tsxindex c0685485613..d9b6e0c7ad0 100644--- a/web/app/install/installForm.tsx+++ b/web/app/install/installForm.tsx@@ -1,8 +1,9 @@'use client'import type { InitValidateStatusResponse, SetupStatusResponse } from '@/models/common'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'-import { useStore } from '@tanstack/react-form'+import { useStore } from '@tanstack/react-form'import * as React from 'react'import { useEffect } from 'react'import { useTranslation } from 'react-i18next'@@ -10,7 +11,6 @@ import * as z from 'zod'import { formContext, useAppForm } from '@/app/components/base/form'import { zodSubmitValidator } from '@/app/components/base/form/utils/zod-submit-validator'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'import { validPassword } from '@/config'import { LICENSE_LINK } from '@/constants/link'diff --git a/web/app/layout.tsx b/web/app/layout.tsxindex 63e506bd451..be0c854f02b 100644--- a/web/app/layout.tsx+++ b/web/app/layout.tsx@@ -1,4 +1,6 @@import type { Viewport } from '@/next'+import { ToastHost } from '@langgenius/dify-ui/toast'+import { TooltipProvider } from '@langgenius/dify-ui/tooltip'import { Provider as JotaiProvider } from 'jotai/react'import { ThemeProvider } from 'next-themes'import { NuqsAdapter } from 'nuqs/adapters/next/app'@@ -6,8 +8,6 @@ import GlobalPublicStoreProvider from '@/context/global-public-context'import { TanstackQueryInitializer } from '@/context/query-client'import { getDatasetMap } from '@/env'import { getLocaleOnServer } from '@/i18n-config/server'-import { ToastHost } from './components/base/ui/toast'-import { TooltipProvider } from './components/base/ui/tooltip'import PartnerStackCookieRecorder from './components/billing/partner-stack/cookie-recorder'import CreateAppAttributionBootstrap from './components/create-app-attribution-bootstrap'import { AgentationLoader } from './components/devtools/agentation-loader'diff --git a/web/app/reset-password/check-code/page.tsx b/web/app/reset-password/check-code/page.tsxindex 98ea828aae5..b11935481ea 100644--- a/web/app/reset-password/check-code/page.tsx+++ b/web/app/reset-password/check-code/page.tsx@@ -1,10 +1,10 @@'use client'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowLeftLine, RiMailSendFill } from '@remixicon/react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Countdown from '@/app/components/signin/countdown'import { useLocale } from '@/context/i18n'import { useRouter, useSearchParams } from '@/next/navigation'diff --git a/web/app/reset-password/page.tsx b/web/app/reset-password/page.tsxindex d58fd7e9ffe..63b950bd114 100644--- a/web/app/reset-password/page.tsx+++ b/web/app/reset-password/page.tsx@@ -1,11 +1,11 @@'use client'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowLeftLine, RiLockPasswordLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { emailRegex } from '@/config'import { useLocale } from '@/context/i18n'import useDocumentTitle from '@/hooks/use-document-title'diff --git a/web/app/reset-password/set-password/page.tsx b/web/app/reset-password/set-password/page.tsxindex 7277b6d30c6..4a8cb2af9bd 100644--- a/web/app/reset-password/set-password/page.tsx+++ b/web/app/reset-password/set-password/page.tsx@@ -1,12 +1,12 @@'use client'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiCheckboxCircleFill } from '@remixicon/react'import { useCountDown } from 'ahooks'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { validPassword } from '@/config'import { useRouter, useSearchParams } from '@/next/navigation'import { changePasswordWithToken } from '@/service/common'diff --git a/web/app/signin/check-code/page.tsx b/web/app/signin/check-code/page.tsxindex b86c984f31e..fb52e0b5b7b 100644--- a/web/app/signin/check-code/page.tsx+++ b/web/app/signin/check-code/page.tsx@@ -1,12 +1,12 @@'use client'import type { FormEvent } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowLeftLine, RiMailSendFill } from '@remixicon/react'import { useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { trackEvent } from '@/app/components/base/amplitude'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Countdown from '@/app/components/signin/countdown'import { useLocale } from '@/context/i18n'diff --git a/web/app/signin/components/mail-and-code-auth.tsx b/web/app/signin/components/mail-and-code-auth.tsxindex 5c5431c42a2..41cf50854e3 100644--- a/web/app/signin/components/mail-and-code-auth.tsx+++ b/web/app/signin/components/mail-and-code-auth.tsx@@ -1,9 +1,9 @@import type { FormEvent } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { COUNT_DOWN_KEY, COUNT_DOWN_TIME_MS } from '@/app/components/signin/countdown'import { emailRegex } from '@/config'import { useLocale } from '@/context/i18n'diff --git a/web/app/signin/components/mail-and-password-auth.tsx b/web/app/signin/components/mail-and-password-auth.tsxindex ca93b9b391c..6feaf114261 100644--- a/web/app/signin/components/mail-and-password-auth.tsx+++ b/web/app/signin/components/mail-and-password-auth.tsx@@ -1,11 +1,11 @@import type { ResponseError } from '@/service/fetch'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { noop } from 'es-toolkit/function'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { trackEvent } from '@/app/components/base/amplitude'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { emailRegex } from '@/config'import { useLocale } from '@/context/i18n'import Link from '@/next/link'diff --git a/web/app/signin/components/social-auth.tsx b/web/app/signin/components/social-auth.tsxindex 6eb9d62703b..09fa528d1f2 100644--- a/web/app/signin/components/social-auth.tsx+++ b/web/app/signin/components/social-auth.tsx@@ -1,6 +1,6 @@+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { useTranslation } from 'react-i18next'-import { Button } from '@/app/components/base/ui/button'import { API_PREFIX } from '@/config'import { useSearchParams } from '@/next/navigation'import { getPurifyHref } from '@/utils'diff --git a/web/app/signin/components/sso-auth.tsx b/web/app/signin/components/sso-auth.tsxindex 5ead876741b..32612e4eddd 100644--- a/web/app/signin/components/sso-auth.tsx+++ b/web/app/signin/components/sso-auth.tsx@@ -1,10 +1,10 @@'use client'import type { FC } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { Lock01 } from '@/app/components/base/icons/src/vender/solid/security'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { useRouter, useSearchParams } from '@/next/navigation'import { getUserOAuth2SSOUrl, getUserOIDCSSOUrl, getUserSAMLSSOUrl } from '@/service/sso'import { SSOProtocol } from '@/types/feature'diff --git a/web/app/signin/invite-settings/page.tsx b/web/app/signin/invite-settings/page.tsxindex 91973f07f9f..fe3dac71531 100644--- a/web/app/signin/invite-settings/page.tsx+++ b/web/app/signin/invite-settings/page.tsx@@ -1,5 +1,7 @@'use client'import type { Locale } from '@/i18n-config'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiAccountCircleLine } from '@remixicon/react'import { noop } from 'es-toolkit/function'import { useCallback, useState } from 'react'@@ -7,8 +9,6 @@ import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'import Loading from '@/app/components/base/loading'import { SimpleSelect } from '@/app/components/base/select'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { LICENSE_LINK } from '@/constants/link'import { useGlobalPublicStore } from '@/context/global-public-context'import { setLocaleOnClient } from '@/i18n-config'diff --git a/web/app/signin/normal-form.tsx b/web/app/signin/normal-form.tsxindex 4fd0eabf665..2ead90f068c 100644--- a/web/app/signin/normal-form.tsx+++ b/web/app/signin/normal-form.tsx@@ -1,9 +1,9 @@import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import { RiContractLine, RiDoorLockLine, RiErrorWarningFill } from '@remixicon/react'import * as React from 'react'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { IS_CE_EDITION } from '@/config'import { useGlobalPublicStore } from '@/context/global-public-context'import Link from '@/next/link'diff --git a/web/app/signin/one-more-step.tsx b/web/app/signin/one-more-step.tsxindex 6368533e2a0..1f615d5e5a0 100644--- a/web/app/signin/one-more-step.tsx+++ b/web/app/signin/one-more-step.tsx@@ -1,11 +1,11 @@'use client'import type { Reducer } from 'react'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { useReducer } from 'react'import { useTranslation } from 'react-i18next'import { SimpleSelect } from '@/app/components/base/select'import Tooltip from '@/app/components/base/tooltip'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { LICENSE_LINK } from '@/constants/link'import { languages, LanguagesSupported } from '@/i18n-config/language'import Link from '@/next/link'diff --git a/web/app/signup/check-code/page.tsx b/web/app/signup/check-code/page.tsxindex a71d5289fe2..a6a8cadc135 100644--- a/web/app/signup/check-code/page.tsx+++ b/web/app/signup/check-code/page.tsx@@ -1,11 +1,11 @@'use client'import type { MailSendResponse, MailValidityResponse } from '@/service/use-common'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { RiArrowLeftLine, RiMailSendFill } from '@remixicon/react'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Countdown from '@/app/components/signin/countdown'import { useLocale } from '@/context/i18n'import { useRouter, useSearchParams } from '@/next/navigation'diff --git a/web/app/signup/components/input-mail.tsx b/web/app/signup/components/input-mail.tsxindex ae7fbb986d3..f4c5214c11a 100644--- a/web/app/signup/components/input-mail.tsx+++ b/web/app/signup/components/input-mail.tsx@@ -1,10 +1,10 @@'use client'import type { MailSendResponse } from '@/service/use-common'+import { Button } from '@langgenius/dify-ui/button'+import { toast } from '@langgenius/dify-ui/toast'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import Split from '@/app/signin/split'import { emailRegex } from '@/config'import { useGlobalPublicStore } from '@/context/global-public-context'diff --git a/web/app/signup/set-password/page.tsx b/web/app/signup/set-password/page.tsxindex ffecd0bc0cb..a8eb8830784 100644--- a/web/app/signup/set-password/page.tsx+++ b/web/app/signup/set-password/page.tsx@@ -1,13 +1,13 @@'use client'import type { MailRegisterResponse } from '@/service/use-common'+import { Button } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'+import { toast } from '@langgenius/dify-ui/toast'import Cookies from 'js-cookie'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import { trackEvent } from '@/app/components/base/amplitude'import Input from '@/app/components/base/input'-import { Button } from '@/app/components/base/ui/button'-import { toast } from '@/app/components/base/ui/toast'import { validPassword } from '@/config'import { useRouter, useSearchParams } from '@/next/navigation'import { useMailRegister } from '@/service/use-common'diff --git a/web/context/provider-context-provider.tsx b/web/context/provider-context-provider.tsxindex 078a954e318..0af0f24b9a1 100644--- a/web/context/provider-context-provider.tsx+++ b/web/context/provider-context-provider.tsx@@ -1,11 +1,11 @@'use client'import type { ReactNode } from 'react'+import { toast } from '@langgenius/dify-ui/toast'import { useQueryClient } from '@tanstack/react-query'import dayjs from 'dayjs'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { setZendeskConversationFields } from '@/app/components/base/zendesk/utils'import { defaultPlan } from '@/app/components/billing/config'import { parseCurrentPlan } from '@/app/components/billing/utils'diff --git a/web/docs/overlay-migration.md b/web/docs/overlay-migration.mdindex 29ef814fcd2..0016f34e126 100644--- a/web/docs/overlay-migration.md+++ b/web/docs/overlay-migration.md@@ -11,14 +11,14 @@ This document tracks the migration away from legacy overlay APIs.- `@/app/components/base/select` (including `custom` / `pure`)- `@/app/components/base/dialog`- Replacement primitives:- - `@/app/components/base/ui/tooltip`- - `@/app/components/base/ui/dropdown-menu`- - `@/app/components/base/ui/context-menu`- - `@/app/components/base/ui/popover`- - `@/app/components/base/ui/dialog`- - `@/app/components/base/ui/alert-dialog`- - `@/app/components/base/ui/select`- - `@/app/components/base/ui/toast`+ - `@langgenius/dify-ui/tooltip`+ - `@langgenius/dify-ui/dropdown-menu`+ - `@langgenius/dify-ui/context-menu`+ - `@langgenius/dify-ui/popover`+ - `@langgenius/dify-ui/dialog`+ - `@langgenius/dify-ui/alert-dialog`+ - `@langgenius/dify-ui/select`+ - `@langgenius/dify-ui/toast`- Tracking issue: <https://github.com/langgenius/dify/issues/32767>## ESLint policydiff --git a/web/eslint.constants.mjs b/web/eslint.constants.mjsindex 57a14fc22dc..46690035fb2 100644--- a/web/eslint.constants.mjs+++ b/web/eslint.constants.mjs@@ -33,7 +33,7 @@ export const OVERLAY_RESTRICTED_IMPORT_PATTERNS = ['**/base/tooltip','**/base/tooltip/index',],- message: 'Deprecated: use @/app/components/base/ui/tooltip instead. See issue #32767.',+ message: 'Deprecated: use @langgenius/dify-ui/tooltip instead. See issue #32767.',},{group: [@@ -41,7 +41,7 @@ export const OVERLAY_RESTRICTED_IMPORT_PATTERNS = ['**/base/modal/index','**/base/modal/modal',],- message: 'Deprecated: use @/app/components/base/ui/dialog instead. See issue #32767.',+ message: 'Deprecated: use @langgenius/dify-ui/dialog instead. See issue #32767.',},{group: [@@ -50,14 +50,14 @@ export const OVERLAY_RESTRICTED_IMPORT_PATTERNS = ['**/base/select/custom','**/base/select/pure',],- message: 'Deprecated: use @/app/components/base/ui/select instead. See issue #32767.',+ message: 'Deprecated: use @langgenius/dify-ui/select instead. See issue #32767.',},{group: ['**/base/dialog','**/base/dialog/index',],- message: 'Deprecated: use @/app/components/base/ui/dialog instead. See issue #32767.',+ message: 'Deprecated: use @langgenius/dify-ui/dialog instead. See issue #32767.',},]diff --git a/web/hooks/use-import-dsl.ts b/web/hooks/use-import-dsl.tsindex 6be67c22ac7..1ece2a27f0d 100644--- a/web/hooks/use-import-dsl.ts+++ b/web/hooks/use-import-dsl.ts@@ -3,13 +3,13 @@ import type {DSLImportResponse,} from '@/models/app'import type { AppIconType } from '@/types/app'+import { toast } from '@langgenius/dify-ui/toast'import {useCallback,useRef,useState,} from 'react'import { useTranslation } from 'react-i18next'-import { toast } from '@/app/components/base/ui/toast'import { usePluginDependencies } from '@/app/components/workflow/plugin-dependency/hooks'import { NEED_REFRESH_APP_LIST_KEY } from '@/config'import { useSelector } from '@/context/app-context'diff --git a/web/hooks/use-pay.tsx b/web/hooks/use-pay.tsxindex 237913b4333..593a33a1d26 100644--- a/web/hooks/use-pay.tsx+++ b/web/hooks/use-pay.tsx@@ -1,7 +1,5 @@'use client'-import { useCallback, useEffect, useState } from 'react'-import { useTranslation } from 'react-i18next'import {AlertDialog,AlertDialogActions,@@ -9,7 +7,9 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from '@/app/components/base/ui/alert-dialog'+} from '@langgenius/dify-ui/alert-dialog'+import { useCallback, useEffect, useState } from 'react'+import { useTranslation } from 'react-i18next'import { useRouter, useSearchParams } from '@/next/navigation'import { useNotionBinding } from '@/service/use-common'diff --git a/web/service/base.ts b/web/service/base.tsindex 2063b5bc37e..64d13ef59aa 100644--- a/web/service/base.ts+++ b/web/service/base.ts@@ -27,8 +27,8 @@ import type {WorkflowPausedResponse,WorkflowStartedResponse,} from '@/types/workflow'+import { toast } from '@langgenius/dify-ui/toast'import Cookies from 'js-cookie'-import { toast } from '@/app/components/base/ui/toast'import { API_PREFIX, CSRF_COOKIE_NAME, CSRF_HEADER_NAME, IS_CE_EDITION, PASSPORT_HEADER_NAME, PUBLIC_API_PREFIX, WEB_APP_SHARE_CODE_HEADER_NAME } from '@/config'import { asyncRunSafe } from '@/utils'import { basePath } from '@/utils/var'diff --git a/web/service/fetch.spec.ts b/web/service/fetch.spec.tsindex 0c01d324385..632f898e885 100644--- a/web/service/fetch.spec.ts+++ b/web/service/fetch.spec.ts@@ -1,7 +1,7 @@import { beforeEach, describe, expect, it, vi } from 'vitest'import { base } from './fetch'-vi.mock('@/app/components/base/ui/toast', () => ({+vi.mock('@langgenius/dify-ui/toast', () => ({toast: {add: vi.fn(),},diff --git a/web/service/fetch.ts b/web/service/fetch.tsindex 82870a8d2ea..34bd07160a3 100644--- a/web/service/fetch.ts+++ b/web/service/fetch.ts@@ -1,8 +1,8 @@import type { AfterResponseHook, BeforeRequestHook, Hooks } from 'ky'import type { IOtherOptions } from './base'+import { toast } from '@langgenius/dify-ui/toast'import Cookies from 'js-cookie'import ky, { HTTPError } from 'ky'-import { toast } from '@/app/components/base/ui/toast'import { API_PREFIX, APP_VERSION, CSRF_COOKIE_NAME, CSRF_HEADER_NAME, IS_MARKETPLACE, MARKETPLACE_API_PREFIX, PASSPORT_HEADER_NAME, PUBLIC_API_PREFIX, WEB_APP_SHARE_CODE_HEADER_NAME } from '@/config'import { getWebAppAccessToken, getWebAppPassport } from './webapp-auth'diff --git a/web/tailwind.config.ts b/web/tailwind.config.tsindex 32b889e7077..21c0455177f 100644--- a/web/tailwind.config.ts+++ b/web/tailwind.config.ts@@ -6,9 +6,11 @@ const config: Config = {'./app/**/*.{js,ts,jsx,tsx}','./components/**/*.{js,ts,jsx,tsx}','./context/**/*.{js,ts,jsx,tsx}',+ '../packages/dify-ui/src/**/*.{ts,tsx}','./node_modules/streamdown/dist/*.js','./node_modules/@streamdown/math/dist/*.js','!./**/*.{spec,test}.{js,ts,jsx,tsx}',+ '!../packages/dify-ui/src/**/*.{spec,test}.{ts,tsx}',],...commonConfig,}