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
chore(web): migrate lodash-es to es-toolkit compat (#30126)
yyh3cbbb06dc418
diff --git a/web/__mocks__/provider-context.ts b/web/__mocks__/provider-context.tsindex 3ecb4e9c0e0..c69a2ad1d23 100644--- a/web/__mocks__/provider-context.ts+++ b/web/__mocks__/provider-context.ts@@ -1,6 +1,6 @@import type { Plan, UsagePlanInfo } from '@/app/components/billing/type'import type { ProviderContextState } from '@/context/provider-context'-import { merge, noop } from 'lodash-es'+import { merge, noop } from 'es-toolkit/compat'import { defaultPlan } from '@/app/components/billing/config'// Avoid being mocked in testsdiff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/time-range-picker/date-picker.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/time-range-picker/date-picker.tsxindex ab39846a363..004f83afc54 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/time-range-picker/date-picker.tsx+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/time-range-picker/date-picker.tsx@@ -4,7 +4,7 @@ import type { FC } from 'react'import type { TriggerProps } from '@/app/components/base/date-and-time-picker/types'import { RiCalendarLine } from '@remixicon/react'import dayjs from 'dayjs'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useCallback } from 'react'import Picker from '@/app/components/base/date-and-time-picker/date-picker'diff --git a/web/app/(shareLayout)/webapp-reset-password/page.tsx b/web/app/(shareLayout)/webapp-reset-password/page.tsxindex 92c39eb7292..108bd4b22e2 100644--- a/web/app/(shareLayout)/webapp-reset-password/page.tsx+++ b/web/app/(shareLayout)/webapp-reset-password/page.tsx@@ -1,6 +1,6 @@'use client'import { RiArrowLeftLine, RiLockPasswordLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import Link from 'next/link'import { useRouter, useSearchParams } from 'next/navigation'import { useState } from 'react'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 90208583473..8b611b9eead 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,4 +1,4 @@-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useRouter, useSearchParams } from 'next/navigation'import { useState } from 'react'import { useTranslation } from 'react-i18next'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 67e4bf7af2f..46645ed68cc 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,5 +1,5 @@'use client'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import Link from 'next/link'import { useRouter, useSearchParams } from 'next/navigation'import { useCallback, useState } from 'react'diff --git a/web/app/account/(commonLayout)/account-page/email-change-modal.tsx b/web/app/account/(commonLayout)/account-page/email-change-modal.tsxindex 99b4f5c6860..655452ea245 100644--- a/web/app/account/(commonLayout)/account-page/email-change-modal.tsx+++ b/web/app/account/(commonLayout)/account-page/email-change-modal.tsx@@ -1,6 +1,6 @@import type { ResponseError } from '@/service/fetch'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useRouter } from 'next/navigation'import * as React from 'react'import { useState } from 'react'diff --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 7fbb745c489..7289ed384d9 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,7 +1,7 @@'use client'import type { FC } from 'react'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/app/configuration/base/operation-btn/index.tsx b/web/app/components/app/configuration/base/operation-btn/index.tsxindex b9f55de26b8..6a22dc6d3b8 100644--- a/web/app/components/app/configuration/base/operation-btn/index.tsx+++ b/web/app/components/app/configuration/base/operation-btn/index.tsx@@ -4,7 +4,7 @@ import {RiAddLine,RiEditLine,} from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useTranslation } from 'react-i18next'import { cn } from '@/utils/classnames'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 9b558b58c11..3f39828e79b 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,8 +4,8 @@ import type { ExternalDataTool } from '@/models/common'import type { PromptVariable } from '@/models/debug'import type { GenRes } from '@/service/debug'import { useBoolean } from 'ahooks'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/app/configuration/config/agent/prompt-editor.tsx b/web/app/components/app/configuration/config/agent/prompt-editor.tsxindex 0a09609ccae..7399aaeac99 100644--- a/web/app/components/app/configuration/config/agent/prompt-editor.tsx+++ b/web/app/components/app/configuration/config/agent/prompt-editor.tsx@@ -2,7 +2,7 @@import type { FC } from 'react'import type { ExternalDataTool } from '@/models/common'import copy from 'copy-to-clipboard'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useTranslation } from 'react-i18next'import { useContext } from 'use-context-selector'diff --git a/web/app/components/app/configuration/dataset-config/index.spec.tsx b/web/app/components/app/configuration/dataset-config/index.spec.tsxindex acccdec98ea..e3791db9c0c 100644--- a/web/app/components/app/configuration/dataset-config/index.spec.tsx+++ b/web/app/components/app/configuration/dataset-config/index.spec.tsx@@ -52,7 +52,7 @@ vi.mock('../debug/hooks', () => ({useFormattingChangedDispatcher: vi.fn(() => vi.fn()),}))-vi.mock('lodash-es', () => ({+vi.mock('es-toolkit/compat', () => ({intersectionBy: vi.fn((...arrays) => {// Mock realistic intersection behavior based on metadata nameconst validArrays = arrays.filter(Array.isArray)diff --git a/web/app/components/app/configuration/dataset-config/index.tsx b/web/app/components/app/configuration/dataset-config/index.tsxindex 9ac17295909..2fc82c82b66 100644--- a/web/app/components/app/configuration/dataset-config/index.tsx+++ b/web/app/components/app/configuration/dataset-config/index.tsx@@ -8,8 +8,8 @@ import type {MetadataFilteringModeEnum,} from '@/app/components/workflow/nodes/knowledge-retrieval/types'import type { DataSet } from '@/models/datasets'+import { intersectionBy } from 'es-toolkit/compat'import { produce } from 'immer'-import { intersectionBy } from 'lodash-es'import * as React from 'react'import { useCallback, useMemo } from 'react'import { useTranslation } from 'react-i18next'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 ad5199fd55f..f7aadc0c3fb 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@@ -1,6 +1,7 @@'use client'import type { FC } from 'react'+import type { ModelParameterModalProps } from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal'import type { ModelConfig } from '@/app/components/workflow/types'import type {DataSet,@@ -8,7 +9,6 @@ import type {import type {DatasetConfigs,} from '@/models/debug'-import { noop } from 'lodash-es'import { memo, useCallback, useEffect, useMemo } from 'react'import { useTranslation } from 'react-i18next'import Divider from '@/app/components/base/divider'@@ -33,17 +33,20 @@ type Props = {selectedDatasets?: DataSet[]isInWorkflow?: booleansingleRetrievalModelConfig?: ModelConfig- onSingleRetrievalModelChange?: (config: ModelConfig) => void- onSingleRetrievalModelParamsChange?: (config: ModelConfig) => void+ onSingleRetrievalModelChange?: ModelParameterModalProps['setModel']+ onSingleRetrievalModelParamsChange?: ModelParameterModalProps['onCompletionParamsChange']}+const noopModelChange: ModelParameterModalProps['setModel'] = () => {}+const noopParamsChange: ModelParameterModalProps['onCompletionParamsChange'] = () => {}+const ConfigContent: FC<Props> = ({datasetConfigs,onChange,isInWorkflow,singleRetrievalModelConfig: singleRetrievalConfig = {} as ModelConfig,- onSingleRetrievalModelChange = noop,- onSingleRetrievalModelParamsChange = noop,+ onSingleRetrievalModelChange = noopModelChange,+ onSingleRetrievalModelParamsChange = noopParamsChange,selectedDatasets = [],}) => {const { t } = useTranslation()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 77f3ac0eb8b..3a62a665257 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,4 +1,4 @@-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { memo } from 'react'import { useTranslation } from 'react-i18next'import Slider from '@/app/components/base/slider'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 243aafdbddc..0d8a0934e5e 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@@ -3,7 +3,7 @@ import type { Member } from '@/models/common'import type { DataSet } from '@/models/datasets'import type { RetrievalConfig } from '@/types/app'import { RiCloseLine } from '@remixicon/react'-import { isEqual } from 'lodash-es'+import { isEqual } from 'es-toolkit/compat'import { useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Button from '@/app/components/base/button'diff --git a/web/app/components/app/configuration/debug/debug-with-multiple-model/context.tsx b/web/app/components/app/configuration/debug/debug-with-multiple-model/context.tsxindex 9d058186cf7..3f0381074f5 100644--- a/web/app/components/app/configuration/debug/debug-with-multiple-model/context.tsx+++ b/web/app/components/app/configuration/debug/debug-with-multiple-model/context.tsx@@ -1,7 +1,7 @@'use client'import type { ModelAndParameter } from '../types'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { createContext, useContext } from 'use-context-selector'export type DebugWithMultipleModelContextType = {diff --git a/web/app/components/app/configuration/debug/debug-with-multiple-model/text-generation-item.tsx b/web/app/components/app/configuration/debug/debug-with-multiple-model/text-generation-item.tsxindex 8dda5b38791..9113f782d92 100644--- a/web/app/components/app/configuration/debug/debug-with-multiple-model/text-generation-item.tsx+++ b/web/app/components/app/configuration/debug/debug-with-multiple-model/text-generation-item.tsx@@ -4,7 +4,7 @@ import type {OnSend,TextGenerationConfig,} from '@/app/components/base/text-generation/types'-import { cloneDeep, noop } from 'lodash-es'+import { cloneDeep, noop } from 'es-toolkit/compat'import { memo } from 'react'import TextGeneration from '@/app/components/app/text-generate/item'import { TransferMethod } from '@/app/components/base/chat/types'diff --git a/web/app/components/app/configuration/debug/hooks.tsx b/web/app/components/app/configuration/debug/hooks.tsxindex 786d43bdb9e..e66185e2841 100644--- a/web/app/components/app/configuration/debug/hooks.tsx+++ b/web/app/components/app/configuration/debug/hooks.tsx@@ -6,7 +6,7 @@ import type {ChatConfig,ChatItem,} from '@/app/components/base/chat/types'-import cloneDeep from 'lodash-es/cloneDeep'+import { cloneDeep } from 'es-toolkit/compat'import {useCallback,useRef,diff --git a/web/app/components/app/configuration/debug/index.tsx b/web/app/components/app/configuration/debug/index.tsxindex fe1c6550f57..140f9421c92 100644--- a/web/app/components/app/configuration/debug/index.tsx+++ b/web/app/components/app/configuration/debug/index.tsx@@ -11,9 +11,8 @@ import {RiSparklingFill,} from '@remixicon/react'import { useBoolean } from 'ahooks'+import { cloneDeep, noop } from 'es-toolkit/compat'import { produce, setAutoFreeze } from 'immer'-import { noop } from 'lodash-es'-import cloneDeep from 'lodash-es/cloneDeep'import * as React from 'react'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/app/configuration/hooks/use-advanced-prompt-config.ts b/web/app/components/app/configuration/hooks/use-advanced-prompt-config.tsindex 63603033d3d..3e8f7c5b3a7 100644--- a/web/app/components/app/configuration/hooks/use-advanced-prompt-config.ts+++ b/web/app/components/app/configuration/hooks/use-advanced-prompt-config.ts@@ -1,7 +1,7 @@import type { FormValue } from '@/app/components/header/account-setting/model-provider-page/declarations'import type { ChatPromptConfig, CompletionPromptConfig, ConversationHistoriesRole, PromptItem } from '@/models/debug'+import { clone } from 'es-toolkit/compat'import { produce } from 'immer'-import { clone } from 'lodash-es'import { useState } from 'react'import { checkHasContextBlock, checkHasHistoryBlock, checkHasQueryBlock, PRE_PROMPT_PLACEHOLDER_TEXT } from '@/app/components/base/prompt-editor/constants'import { DEFAULT_CHAT_PROMPT_CONFIG, DEFAULT_COMPLETION_PROMPT_CONFIG } from '@/config'diff --git a/web/app/components/app/configuration/index.tsx b/web/app/components/app/configuration/index.tsxindex eb7a9f5a321..4b5bcafc9be 100644--- a/web/app/components/app/configuration/index.tsx+++ b/web/app/components/app/configuration/index.tsx@@ -20,8 +20,8 @@ import type {import type { ModelConfig as BackendModelConfig, UserInputFormItem, VisionSettings } from '@/types/app'import { CodeBracketIcon } from '@heroicons/react/20/solid'import { useBoolean, useGetState } from 'ahooks'+import { clone, isEqual } from 'es-toolkit/compat'import { produce } from 'immer'-import { clone, isEqual } from 'lodash-es'import { usePathname } from 'next/navigation'import * as React from 'react'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'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 74f436289fe..ccd0b1288e5 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@@ -3,7 +3,7 @@ import type {CodeBasedExtensionItem,ExternalDataTool,} from '@/models/common'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { useContext } from 'use-context-selector'diff --git a/web/app/components/app/create-from-dsl-modal/index.tsx b/web/app/components/app/create-from-dsl-modal/index.tsxindex 3d6cabedf65..809859d3ad1 100644--- a/web/app/components/app/create-from-dsl-modal/index.tsx+++ b/web/app/components/app/create-from-dsl-modal/index.tsx@@ -3,7 +3,7 @@import type { MouseEventHandler } from 'react'import { RiCloseLine, RiCommandLine, RiCornerDownLeftLine } from '@remixicon/react'import { useDebounceFn, useKeyPress } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useRouter } from 'next/navigation'import { useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/app/duplicate-modal/index.tsx b/web/app/components/app/duplicate-modal/index.tsxindex 420a6b159ae..f670b370765 100644--- a/web/app/components/app/duplicate-modal/index.tsx+++ b/web/app/components/app/duplicate-modal/index.tsx@@ -1,7 +1,7 @@'use client'import type { AppIconType } from '@/types/app'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/app/log/index.tsx b/web/app/components/app/log/index.tsxindex 0e6e4bba2d6..52485f5dd2b 100644--- a/web/app/components/app/log/index.tsx+++ b/web/app/components/app/log/index.tsx@@ -3,7 +3,7 @@ import type { FC } from 'react'import type { App } from '@/types/app'import { useDebounce } from 'ahooks'import dayjs from 'dayjs'-import { omit } from 'lodash-es'+import { omit } from 'es-toolkit/compat'import { usePathname, useRouter, useSearchParams } from 'next/navigation'import * as React from 'react'import { useCallback, useEffect, useState } from 'react'diff --git a/web/app/components/app/log/list.tsx b/web/app/components/app/log/list.tsxindex 2b13a09b3a9..cf10cff3271 100644--- a/web/app/components/app/log/list.tsx+++ b/web/app/components/app/log/list.tsx@@ -12,7 +12,7 @@ import { RiCloseLine, RiEditFill } from '@remixicon/react'import dayjs from 'dayjs'import timezone from 'dayjs/plugin/timezone'import utc from 'dayjs/plugin/utc'-import { get, noop } from 'lodash-es'+import { get, noop } from 'es-toolkit/compat'import { usePathname, useRouter, useSearchParams } from 'next/navigation'import * as React from 'react'import { useCallback, useEffect, useRef, useState } from 'react'diff --git a/web/app/components/app/overview/apikey-info-panel/apikey-info-panel.test-utils.tsx b/web/app/components/app/overview/apikey-info-panel/apikey-info-panel.test-utils.tsxindex 0e8f82b00d3..5cffa1143bf 100644--- a/web/app/components/app/overview/apikey-info-panel/apikey-info-panel.test-utils.tsx+++ b/web/app/components/app/overview/apikey-info-panel/apikey-info-panel.test-utils.tsx@@ -2,7 +2,7 @@ import type { RenderOptions } from '@testing-library/react'import type { Mock, MockedFunction } from 'vitest'import type { ModalContextState } from '@/context/modal-context'import { fireEvent, render } from '@testing-library/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { defaultPlan } from '@/app/components/billing/config'import { useModalContext as actualUseModalContext } from '@/context/modal-context'diff --git a/web/app/components/app/overview/app-chart.tsx b/web/app/components/app/overview/app-chart.tsxindex d876dbda27f..114ef7d5dbd 100644--- a/web/app/components/app/overview/app-chart.tsx+++ b/web/app/components/app/overview/app-chart.tsx@@ -6,7 +6,7 @@ import type { AppDailyConversationsResponse, AppDailyEndUsersResponse, AppDailyMimport dayjs from 'dayjs'import Decimal from 'decimal.js'import ReactECharts from 'echarts-for-react'-import { get } from 'lodash-es'+import { get } from 'es-toolkit/compat'import * as React from 'react'import { useTranslation } from 'react-i18next'import Basic from '@/app/components/app-sidebar/basic'diff --git a/web/app/components/app/switch-app-modal/index.tsx b/web/app/components/app/switch-app-modal/index.tsxindex 257f7b67886..83f2efc49dc 100644--- a/web/app/components/app/switch-app-modal/index.tsx+++ b/web/app/components/app/switch-app-modal/index.tsx@@ -2,7 +2,7 @@import type { App } from '@/types/app'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useRouter } from 'next/navigation'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/app/workflow-log/index.tsx b/web/app/components/app/workflow-log/index.tsxindex 12438d6d17c..5aa467d03de 100644--- a/web/app/components/app/workflow-log/index.tsx+++ b/web/app/components/app/workflow-log/index.tsx@@ -5,7 +5,7 @@ import { useDebounce } from 'ahooks'import dayjs from 'dayjs'import timezone from 'dayjs/plugin/timezone'import utc from 'dayjs/plugin/utc'-import { omit } from 'lodash-es'+import { omit } from 'es-toolkit/compat'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/base/agent-log-modal/detail.tsx b/web/app/components/base/agent-log-modal/detail.tsxindex 5451126c9ea..0b8dc302fb5 100644--- a/web/app/components/base/agent-log-modal/detail.tsx+++ b/web/app/components/base/agent-log-modal/detail.tsx@@ -2,7 +2,7 @@import type { FC } from 'react'import type { IChatItem } from '@/app/components/base/chat/chat/type'import type { AgentIteration, AgentLogDetailResponse } from '@/models/log'-import { flatten, uniq } from 'lodash-es'+import { flatten, uniq } from 'es-toolkit/compat'import * as React from 'react'import { useCallback, useEffect, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/base/app-icon-picker/index.tsx b/web/app/components/base/app-icon-picker/index.tsxindex ce73af36a2b..99ba7eb544e 100644--- a/web/app/components/base/app-icon-picker/index.tsx+++ b/web/app/components/base/app-icon-picker/index.tsx@@ -3,7 +3,7 @@ import type { Area } from 'react-easy-crop'import type { OnImageInput } from './ImageInput'import type { AppIconType, ImageFile } from '@/types/app'import { RiImageCircleAiLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import { DISABLE_UPLOAD_IMAGE_AS_ICON } from '@/config'diff --git a/web/app/components/base/chat/__tests__/utils.spec.ts b/web/app/components/base/chat/__tests__/utils.spec.tsindex 2e86e13733b..d3e77732a5b 100644--- a/web/app/components/base/chat/__tests__/utils.spec.ts+++ b/web/app/components/base/chat/__tests__/utils.spec.ts@@ -1,5 +1,5 @@import type { ChatItemInTree } from '../types'-import { get } from 'lodash-es'+import { get } from 'es-toolkit/compat'import { buildChatItemTree, getThreadMessages } from '../utils'import branchedTestMessages from './branchedTestMessages.json'import legacyTestMessages from './legacyTestMessages.json'diff --git a/web/app/components/base/chat/chat-with-history/context.tsx b/web/app/components/base/chat/chat-with-history/context.tsxindex 120b6ed4bd4..d1496f82780 100644--- a/web/app/components/base/chat/chat-with-history/context.tsx+++ b/web/app/components/base/chat/chat-with-history/context.tsx@@ -14,7 +14,7 @@ import type {AppMeta,ConversationItem,} from '@/models/share'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { createContext, useContext } from 'use-context-selector'export type ChatWithHistoryContextValue = {diff --git a/web/app/components/base/chat/chat-with-history/hooks.tsx b/web/app/components/base/chat/chat-with-history/hooks.tsxindex 67c46b2d108..3acc4805189 100644--- a/web/app/components/base/chat/chat-with-history/hooks.tsx+++ b/web/app/components/base/chat/chat-with-history/hooks.tsx@@ -10,8 +10,8 @@ import type {ConversationItem,} from '@/models/share'import { useLocalStorageState } from 'ahooks'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import {useCallback,useEffect,diff --git a/web/app/components/base/chat/chat/hooks.ts b/web/app/components/base/chat/chat/hooks.tsindex 739fe644fe5..64ba5f0aeca 100644--- a/web/app/components/base/chat/chat/hooks.ts+++ b/web/app/components/base/chat/chat/hooks.ts@@ -8,8 +8,8 @@ import type { InputForm } from './type'import type AudioPlayer from '@/app/components/base/audio-btn/audio'import type { FileEntity } from '@/app/components/base/file-uploader/types'import type { Annotation } from '@/models/log'+import { noop, uniqBy } from 'es-toolkit/compat'import { produce, setAutoFreeze } from 'immer'-import { noop, uniqBy } from 'lodash-es'import { useParams, usePathname } from 'next/navigation'import {useCallback,diff --git a/web/app/components/base/chat/chat/index.tsx b/web/app/components/base/chat/chat/index.tsxindex 5f5faab2403..9c27b61e1fa 100644--- a/web/app/components/base/chat/chat/index.tsx+++ b/web/app/components/base/chat/chat/index.tsx@@ -13,7 +13,7 @@ import type {import type { InputForm } from './type'import type { Emoji } from '@/app/components/tools/types'import type { AppData } from '@/models/share'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'import {memo,useCallback,diff --git a/web/app/components/base/chat/embedded-chatbot/context.tsx b/web/app/components/base/chat/embedded-chatbot/context.tsxindex 2738d25c756..97d3dd53cf2 100644--- a/web/app/components/base/chat/embedded-chatbot/context.tsx+++ b/web/app/components/base/chat/embedded-chatbot/context.tsx@@ -13,7 +13,7 @@ import type {AppMeta,ConversationItem,} from '@/models/share'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { createContext, useContext } from 'use-context-selector'export type EmbeddedChatbotContextValue = {diff --git a/web/app/components/base/chat/embedded-chatbot/hooks.tsx b/web/app/components/base/chat/embedded-chatbot/hooks.tsxindex 3c7fd576a39..9e9125fc457 100644--- a/web/app/components/base/chat/embedded-chatbot/hooks.tsx+++ b/web/app/components/base/chat/embedded-chatbot/hooks.tsx@@ -9,8 +9,8 @@ import type {ConversationItem,} from '@/models/share'import { useLocalStorageState } from 'ahooks'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import {useCallback,useEffect,diff --git a/web/app/components/base/copy-feedback/index.tsx b/web/app/components/base/copy-feedback/index.tsxindex bf809a2d189..bb71d62c11d 100644--- a/web/app/components/base/copy-feedback/index.tsx+++ b/web/app/components/base/copy-feedback/index.tsx@@ -4,7 +4,7 @@ import {RiClipboardLine,} from '@remixicon/react'import copy from 'copy-to-clipboard'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/base/copy-icon/index.tsx b/web/app/components/base/copy-icon/index.tsxindex 935444a3c14..73a0d80b456 100644--- a/web/app/components/base/copy-icon/index.tsx+++ b/web/app/components/base/copy-icon/index.tsx@@ -1,6 +1,6 @@'use client'import copy from 'copy-to-clipboard'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/base/emoji-picker/index.tsx b/web/app/components/base/emoji-picker/index.tsxindex 53bef278f61..4fc146ab59a 100644--- a/web/app/components/base/emoji-picker/index.tsx+++ b/web/app/components/base/emoji-picker/index.tsx@@ -1,6 +1,6 @@'use client'import type { FC } from 'react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'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 a1b66ae0fc6..361f24465fa 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@@ -3,8 +3,8 @@ import type { InputVar } from '@/app/components/workflow/types'import type { PromptVariable } from '@/models/debug'import { RiAddLine, RiAsterisk, RiCloseLine, RiDeleteBinLine, RiDraggable } from '@remixicon/react'import { useBoolean } from 'ahooks'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import * as React from 'react'import { useCallback, useEffect, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'diff --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 d1e6aba6b76..7de0119e593 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@@ -2,7 +2,7 @@ import type { ChangeEvent, FC } from 'react'import type { CodeBasedExtensionItem } from '@/models/common'import type { ModerationConfig, ModerationContentConfig } from '@/models/debug'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { useContext } from 'use-context-selector'diff --git a/web/app/components/base/file-uploader/hooks.ts b/web/app/components/base/file-uploader/hooks.tsindex e62addee2d8..6678368462f 100644--- a/web/app/components/base/file-uploader/hooks.ts+++ b/web/app/components/base/file-uploader/hooks.ts@@ -2,8 +2,8 @@ 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 { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import { useParams } from 'next/navigation'import {useCallback,diff --git a/web/app/components/base/file-uploader/pdf-preview.tsx b/web/app/components/base/file-uploader/pdf-preview.tsxindex 04a90a414cf..b4f057e91ed 100644--- a/web/app/components/base/file-uploader/pdf-preview.tsx+++ b/web/app/components/base/file-uploader/pdf-preview.tsx@@ -1,7 +1,7 @@import type { FC } from 'react'import { RiCloseLine, RiZoomInLine, RiZoomOutLine } from '@remixicon/react'+import { noop } from 'es-toolkit/compat'import { t } from 'i18next'-import { noop } from 'lodash-es'import * as React from 'react'import { useState } from 'react'import { createPortal } from 'react-dom'diff --git a/web/app/components/base/file-uploader/store.tsx b/web/app/components/base/file-uploader/store.tsxindex db3e3622f90..2172733f20b 100644--- a/web/app/components/base/file-uploader/store.tsx+++ b/web/app/components/base/file-uploader/store.tsx@@ -1,7 +1,7 @@import type {FileEntity,} from './types'-import { isEqual } from 'lodash-es'+import { isEqual } from 'es-toolkit/compat'import {createContext,useContext,diff --git a/web/app/components/base/fullscreen-modal/index.tsx b/web/app/components/base/fullscreen-modal/index.tsxindex b822d21921b..cad91b24524 100644--- a/web/app/components/base/fullscreen-modal/index.tsx+++ b/web/app/components/base/fullscreen-modal/index.tsx@@ -1,6 +1,6 @@import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react'import { RiCloseLargeLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { cn } from '@/utils/classnames'type IModal = {diff --git a/web/app/components/base/icons/script.mjs b/web/app/components/base/icons/script.mjsindex 1cee66d1db5..81566cc4cf0 100644--- a/web/app/components/base/icons/script.mjs+++ b/web/app/components/base/icons/script.mjs@@ -2,7 +2,7 @@ import { access, appendFile, mkdir, open, readdir, rm, writeFile } from 'node:fsimport path from 'node:path'import { fileURLToPath } from 'node:url'import { parseXml } from '@rgrove/parse-xml'-import { camelCase, template } from 'lodash-es'+import { camelCase, template } from 'es-toolkit/compat'const __dirname = path.dirname(fileURLToPath(import.meta.url))diff --git a/web/app/components/base/image-uploader/image-preview.tsx b/web/app/components/base/image-uploader/image-preview.tsxindex bfabe5e2473..519bed4d250 100644--- a/web/app/components/base/image-uploader/image-preview.tsx+++ b/web/app/components/base/image-uploader/image-preview.tsx@@ -1,7 +1,7 @@import type { FC } from 'react'import { RiAddBoxLine, RiCloseLine, RiDownloadCloud2Line, RiFileCopyLine, RiZoomInLine, RiZoomOutLine } from '@remixicon/react'+import { noop } from 'es-toolkit/compat'import { t } from 'i18next'-import { noop } from 'lodash-es'import * as React from 'react'import { useCallback, useEffect, useRef, useState } from 'react'import { createPortal } from 'react-dom'diff --git a/web/app/components/base/input-with-copy/index.spec.tsx b/web/app/components/base/input-with-copy/index.spec.tsxindex 782b2bab256..a5fde4ea448 100644--- a/web/app/components/base/input-with-copy/index.spec.tsx+++ b/web/app/components/base/input-with-copy/index.spec.tsx@@ -25,8 +25,8 @@ vi.mock('react-i18next', () => ({}),}))-// Mock lodash-es debounce-vi.mock('lodash-es', () => ({+// Mock es-toolkit/compat debounce+vi.mock('es-toolkit/compat', () => ({debounce: (fn: any) => fn,}))diff --git a/web/app/components/base/input-with-copy/index.tsx b/web/app/components/base/input-with-copy/index.tsxindex 151fa435e7f..41bb8f3dec2 100644--- a/web/app/components/base/input-with-copy/index.tsx+++ b/web/app/components/base/input-with-copy/index.tsx@@ -2,7 +2,7 @@import type { InputProps } from '../input'import { RiClipboardFill, RiClipboardLine } from '@remixicon/react'import copy from 'copy-to-clipboard'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/base/input/index.tsx b/web/app/components/base/input/index.tsxindex 6c6a0c6a750..db7d1f09900 100644--- a/web/app/components/base/input/index.tsx+++ b/web/app/components/base/input/index.tsx@@ -2,7 +2,7 @@ import type { VariantProps } from 'class-variance-authority'import type { ChangeEventHandler, CSSProperties, FocusEventHandler } from 'react'import { RiCloseCircleFill, RiErrorWarningLine, RiSearchLine } from '@remixicon/react'import { cva } from 'class-variance-authority'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useTranslation } from 'react-i18next'import { cn } from '@/utils/classnames'diff --git a/web/app/components/base/markdown/index.tsx b/web/app/components/base/markdown/index.tsxindex e698f3bebec..c487b205508 100644--- a/web/app/components/base/markdown/index.tsx+++ b/web/app/components/base/markdown/index.tsx@@ -1,5 +1,5 @@import type { ReactMarkdownWrapperProps, SimplePluginInfo } from './react-markdown-wrapper'-import { flow } from 'lodash-es'+import { flow } from 'es-toolkit/compat'import dynamic from 'next/dynamic'import { cn } from '@/utils/classnames'import { preprocessLaTeX, preprocessThinkTag } from './markdown-utils'diff --git a/web/app/components/base/markdown/markdown-utils.ts b/web/app/components/base/markdown/markdown-utils.tsindex 59326a7a19b..94ad31d1ded 100644--- a/web/app/components/base/markdown/markdown-utils.ts+++ b/web/app/components/base/markdown/markdown-utils.ts@@ -3,7 +3,7 @@* These functions were extracted from the main markdown renderer for better separation of concerns.* Includes preprocessing for LaTeX and custom "think" tags.*/-import { flow } from 'lodash-es'+import { flow } from 'es-toolkit/compat'import { ALLOW_UNSAFE_DATA_SCHEME } from '@/config'export const preprocessLaTeX = (content: string) => {diff --git a/web/app/components/base/modal/index.tsx b/web/app/components/base/modal/index.tsxindex 1b0ff228731..7270af1c775 100644--- a/web/app/components/base/modal/index.tsx+++ b/web/app/components/base/modal/index.tsx@@ -1,6 +1,6 @@import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { Fragment } from 'react'import { cn } from '@/utils/classnames'// https://headlessui.com/react/dialogdiff --git a/web/app/components/base/modal/modal.tsx b/web/app/components/base/modal/modal.tsxindex 69bca1ccbbb..6fa44d42d0f 100644--- a/web/app/components/base/modal/modal.tsx+++ b/web/app/components/base/modal/modal.tsx@@ -1,6 +1,6 @@import type { ButtonProps } from '@/app/components/base/button'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { memo } from 'react'import { useTranslation } from 'react-i18next'import Button from '@/app/components/base/button'diff --git a/web/app/components/base/pagination/pagination.tsx b/web/app/components/base/pagination/pagination.tsxindex 25bdf5a31b0..dafe0e4ab95 100644--- a/web/app/components/base/pagination/pagination.tsx+++ b/web/app/components/base/pagination/pagination.tsx@@ -4,7 +4,7 @@ import type {IPaginationProps,PageButtonProps,} from './type'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { cn } from '@/utils/classnames'import usePagination from './hook'diff --git a/web/app/components/base/prompt-editor/plugins/context-block/context-block-replacement-block.tsx b/web/app/components/base/prompt-editor/plugins/context-block/context-block-replacement-block.tsxindex 2d2a0b62636..c4a246c40d3 100644--- a/web/app/components/base/prompt-editor/plugins/context-block/context-block-replacement-block.tsx+++ b/web/app/components/base/prompt-editor/plugins/context-block/context-block-replacement-block.tsx@@ -1,8 +1,8 @@import type { ContextBlockType } from '../../types'import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { mergeRegister } from '@lexical/utils'+import { noop } from 'es-toolkit/compat'import { $applyNodeReplacement } from 'lexical'-import { noop } from 'lodash-es'import {memo,useCallback,diff --git a/web/app/components/base/prompt-editor/plugins/context-block/index.tsx b/web/app/components/base/prompt-editor/plugins/context-block/index.tsxindex 9f2102bc624..ce3ed4c210d 100644--- a/web/app/components/base/prompt-editor/plugins/context-block/index.tsx+++ b/web/app/components/base/prompt-editor/plugins/context-block/index.tsx@@ -1,12 +1,12 @@import type { ContextBlockType } from '../../types'import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { mergeRegister } from '@lexical/utils'+import { noop } from 'es-toolkit/compat'import {$insertNodes,COMMAND_PRIORITY_EDITOR,createCommand,} from 'lexical'-import { noop } from 'lodash-es'import {memo,useEffect,diff --git a/web/app/components/base/prompt-editor/plugins/history-block/history-block-replacement-block.tsx b/web/app/components/base/prompt-editor/plugins/history-block/history-block-replacement-block.tsxindex ba695ec95d5..f62fb6886b9 100644--- a/web/app/components/base/prompt-editor/plugins/history-block/history-block-replacement-block.tsx+++ b/web/app/components/base/prompt-editor/plugins/history-block/history-block-replacement-block.tsx@@ -1,8 +1,8 @@import type { HistoryBlockType } from '../../types'import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { mergeRegister } from '@lexical/utils'+import { noop } from 'es-toolkit/compat'import { $applyNodeReplacement } from 'lexical'-import { noop } from 'lodash-es'import {useCallback,useEffect,diff --git a/web/app/components/base/prompt-editor/plugins/history-block/index.tsx b/web/app/components/base/prompt-editor/plugins/history-block/index.tsxindex a853de5162d..dc75fc230d2 100644--- a/web/app/components/base/prompt-editor/plugins/history-block/index.tsx+++ b/web/app/components/base/prompt-editor/plugins/history-block/index.tsx@@ -1,12 +1,12 @@import type { HistoryBlockType } from '../../types'import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { mergeRegister } from '@lexical/utils'+import { noop } from 'es-toolkit/compat'import {$insertNodes,COMMAND_PRIORITY_EDITOR,createCommand,} from 'lexical'-import { noop } from 'lodash-es'import {memo,useEffect,diff --git a/web/app/components/base/radio-card/index.tsx b/web/app/components/base/radio-card/index.tsxindex ae8bb000996..678d5b6deea 100644--- a/web/app/components/base/radio-card/index.tsx+++ b/web/app/components/base/radio-card/index.tsx@@ -1,6 +1,6 @@'use client'import type { FC } from 'react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { cn } from '@/utils/classnames'diff --git a/web/app/components/base/tag-management/panel.tsx b/web/app/components/base/tag-management/panel.tsxindex 854de012a51..0023a003c57 100644--- a/web/app/components/base/tag-management/panel.tsx+++ b/web/app/components/base/tag-management/panel.tsx@@ -3,7 +3,7 @@ import type { HtmlContentProps } from '@/app/components/base/popover'import type { Tag } from '@/app/components/base/tag-management/constant'import { RiAddLine, RiPriceTag3Line } from '@remixicon/react'import { useUnmount } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/base/tag-management/tag-remove-modal.tsx b/web/app/components/base/tag-management/tag-remove-modal.tsxindex 8e796f8e0f3..8061cde5c15 100644--- a/web/app/components/base/tag-management/tag-remove-modal.tsx+++ b/web/app/components/base/tag-management/tag-remove-modal.tsx@@ -2,7 +2,7 @@import type { Tag } from '@/app/components/base/tag-management/constant'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useTranslation } from 'react-i18next'import Button from '@/app/components/base/button'import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'diff --git a/web/app/components/base/toast/index.spec.tsx b/web/app/components/base/toast/index.spec.tsxindex d32619f59a2..59314063dd2 100644--- a/web/app/components/base/toast/index.spec.tsx+++ b/web/app/components/base/toast/index.spec.tsx@@ -1,6 +1,6 @@import type { ReactNode } from 'react'import { act, render, screen, waitFor } from '@testing-library/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import Toast, { ToastProvider, useToastContext } from '.'diff --git a/web/app/components/base/toast/index.tsx b/web/app/components/base/toast/index.tsxindex a0167789965..cf9e1cd909b 100644--- a/web/app/components/base/toast/index.tsx+++ b/web/app/components/base/toast/index.tsx@@ -7,7 +7,7 @@ import {RiErrorWarningFill,RiInformation2Fill,} from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useState } from 'react'import { createRoot } from 'react-dom/client'diff --git a/web/app/components/base/with-input-validation/index.spec.tsx b/web/app/components/base/with-input-validation/index.spec.tsxindex c1a9d55f0af..b2e67ce056b 100644--- a/web/app/components/base/with-input-validation/index.spec.tsx+++ b/web/app/components/base/with-input-validation/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { z } from 'zod'import withValidation from '.'diff --git a/web/app/components/datasets/common/document-status-with-action/index-failed.tsx b/web/app/components/datasets/common/document-status-with-action/index-failed.tsxindex 16357200375..f685eb1f2ea 100644--- a/web/app/components/datasets/common/document-status-with-action/index-failed.tsx+++ b/web/app/components/datasets/common/document-status-with-action/index-failed.tsx@@ -1,7 +1,7 @@'use client'import type { FC } from 'react'import type { IndexingStatusResponse } from '@/models/datasets'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useReducer } from 'react'import { useTranslation } from 'react-i18next'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 d5955d9bc63..b8c413ba8f7 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,6 +1,6 @@'use client'import { useDebounceFn, useKeyPress } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useRouter } from 'next/navigation'import { useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsxindex 981b6c5a8fc..e0a330507cf 100644--- a/web/app/components/datasets/create/step-two/index.tsx+++ b/web/app/components/datasets/create/step-two/index.tsx@@ -9,7 +9,7 @@ import {RiArrowLeftLine,RiSearchEyeLine,} from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import Image from 'next/image'import Link from 'next/link'import * as React from 'react'diff --git a/web/app/components/datasets/documents/detail/batch-modal/index.tsx b/web/app/components/datasets/documents/detail/batch-modal/index.tsxindex 091d5c493ed..0d7199c6c6d 100644--- a/web/app/components/datasets/documents/detail/batch-modal/index.tsx+++ b/web/app/components/datasets/documents/detail/batch-modal/index.tsx@@ -2,7 +2,7 @@import type { FC } from 'react'import type { ChunkingMode, FileItem } from '@/models/datasets'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/datasets/documents/detail/completed/common/full-screen-drawer.tsx b/web/app/components/datasets/documents/detail/completed/common/full-screen-drawer.tsxindex 5f62bf0185b..73b5cbdef9e 100644--- a/web/app/components/datasets/documents/detail/completed/common/full-screen-drawer.tsx+++ b/web/app/components/datasets/documents/detail/completed/common/full-screen-drawer.tsx@@ -1,4 +1,4 @@-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { cn } from '@/utils/classnames'import Drawer from './drawer'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 4957104e25e..114d713170a 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,7 +1,7 @@import type { FC } from 'react'import { RiLoader2Line } from '@remixicon/react'import { useCountDown } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useRef, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/datasets/documents/detail/completed/index.tsx b/web/app/components/datasets/documents/detail/completed/index.tsxindex 1b4aadfa502..e1491258656 100644--- a/web/app/components/datasets/documents/detail/completed/index.tsx+++ b/web/app/components/datasets/documents/detail/completed/index.tsx@@ -4,7 +4,7 @@ import type { Item } from '@/app/components/base/select'import type { FileEntity } from '@/app/components/datasets/common/image-uploader/types'import type { ChildChunkDetail, SegmentDetailModel, SegmentUpdater } from '@/models/datasets'import { useDebounceFn } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { usePathname } from 'next/navigation'import * as React from 'react'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'diff --git a/web/app/components/datasets/documents/detail/metadata/index.tsx b/web/app/components/datasets/documents/detail/metadata/index.tsxindex 87d136c3fe7..dbae76491e1 100644--- a/web/app/components/datasets/documents/detail/metadata/index.tsx+++ b/web/app/components/datasets/documents/detail/metadata/index.tsx@@ -4,7 +4,7 @@ import type { inputType, metadataType } from '@/hooks/use-metadata'import type { CommonResponse } from '@/models/common'import type { DocType, FullDocumentDetail } from '@/models/datasets'import { PencilIcon } from '@heroicons/react/24/outline'-import { get } from 'lodash-es'+import { get } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/datasets/documents/detail/settings/pipeline-settings/index.tsx b/web/app/components/datasets/documents/detail/settings/pipeline-settings/index.tsxindex 2d71fa9e7d0..2eac6b788d4 100644--- a/web/app/components/datasets/documents/detail/settings/pipeline-settings/index.tsx+++ b/web/app/components/datasets/documents/detail/settings/pipeline-settings/index.tsx@@ -1,7 +1,7 @@import type { NotionPage } from '@/models/common'import type { CrawlResultItem, CustomFile, FileIndexingEstimateResponse } from '@/models/datasets'import type { OnlineDriveFile, PublishedPipelineRunPreviewResponse } from '@/models/pipeline'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useRouter } from 'next/navigation'import { useCallback, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/datasets/documents/list.tsx b/web/app/components/datasets/documents/list.tsxindex 0b06d5fe152..670cdd659c9 100644--- a/web/app/components/datasets/documents/list.tsx+++ b/web/app/components/datasets/documents/list.tsx@@ -9,7 +9,7 @@ import {RiGlobalLine,} from '@remixicon/react'import { useBoolean } from 'ahooks'-import { pick, uniq } from 'lodash-es'+import { pick, uniq } from 'es-toolkit/compat'import { useRouter } from 'next/navigation'import * as React from 'react'import { useCallback, useEffect, useMemo, useState } from 'react'diff --git a/web/app/components/datasets/documents/operations.tsx b/web/app/components/datasets/documents/operations.tsxindex 825a3151780..038a89b56e4 100644--- a/web/app/components/datasets/documents/operations.tsx+++ b/web/app/components/datasets/documents/operations.tsx@@ -11,7 +11,7 @@ import {RiPlayCircleLine,} from '@remixicon/react'import { useBoolean, useDebounceFn } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useRouter } from 'next/navigation'import * as React from 'react'import { useCallback, useState } from 'react'diff --git a/web/app/components/datasets/metadata/hooks/use-metadata-document.ts b/web/app/components/datasets/metadata/hooks/use-metadata-document.tsindex 66dfc0384f2..4de18f6e500 100644--- a/web/app/components/datasets/metadata/hooks/use-metadata-document.ts+++ b/web/app/components/datasets/metadata/hooks/use-metadata-document.ts@@ -1,6 +1,6 @@import type { BuiltInMetadataItem, MetadataItemWithValue } from '../types'import type { FullDocumentDetail } from '@/models/datasets'-import { get } from 'lodash-es'+import { get } from 'es-toolkit/compat'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import Toast from '@/app/components/base/toast'diff --git a/web/app/components/datasets/metadata/metadata-dataset/create-content.tsx b/web/app/components/datasets/metadata/metadata-dataset/create-content.tsxindex d31e9d79576..85fd01b2bbf 100644--- a/web/app/components/datasets/metadata/metadata-dataset/create-content.tsx+++ b/web/app/components/datasets/metadata/metadata-dataset/create-content.tsx@@ -1,7 +1,7 @@'use client'import type { FC } from 'react'import { RiArrowLeftLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/datasets/rename-modal/index.tsx b/web/app/components/datasets/rename-modal/index.tsxindex 8b152b8f028..ef988fc9bc5 100644--- a/web/app/components/datasets/rename-modal/index.tsx+++ b/web/app/components/datasets/rename-modal/index.tsx@@ -4,7 +4,7 @@ import type { MouseEventHandler } from 'react'import type { AppIconSelection } from '../../base/app-icon-picker'import type { DataSet } from '@/models/datasets'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useCallback, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Button from '@/app/components/base/button'diff --git a/web/app/components/explore/create-app-modal/index.tsx b/web/app/components/explore/create-app-modal/index.tsxindex dac89bc776e..b05188fe4de 100644--- a/web/app/components/explore/create-app-modal/index.tsx+++ b/web/app/components/explore/create-app-modal/index.tsx@@ -2,7 +2,7 @@import type { AppIconType } from '@/types/app'import { RiCloseLine, RiCommandLine, RiCornerDownLeftLine } from '@remixicon/react'import { useDebounceFn, useKeyPress } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'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 d1f64f0d592..f691044bd32 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,6 +1,6 @@import type { FC } from 'react'import type { ApiBasedExtension } from '@/models/common'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useState } from 'react'import { useTranslation } from 'react-i18next'import Button from '@/app/components/base/button'diff --git a/web/app/components/header/account-setting/data-source-page/data-source-notion/index.tsx b/web/app/components/header/account-setting/data-source-page/data-source-notion/index.tsxindex d139ab39df6..2766dc016cc 100644--- a/web/app/components/header/account-setting/data-source-page/data-source-notion/index.tsx+++ b/web/app/components/header/account-setting/data-source-page/data-source-notion/index.tsx@@ -1,7 +1,7 @@'use client'import type { FC } from 'react'import type { DataSourceNotion as TDataSourceNotion } from '@/models/common'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/header/account-setting/data-source-page/panel/config-item.tsx b/web/app/components/header/account-setting/data-source-page/panel/config-item.tsxindex b98dd7933dd..c57ef96bf9d 100644--- a/web/app/components/header/account-setting/data-source-page/panel/config-item.tsx+++ b/web/app/components/header/account-setting/data-source-page/panel/config-item.tsx@@ -3,7 +3,7 @@ import type { FC } from 'react'import {RiDeleteBinLine,} from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useTranslation } from 'react-i18next'import { cn } from '@/utils/classnames'diff --git a/web/app/components/header/account-setting/key-validator/hooks.ts b/web/app/components/header/account-setting/key-validator/hooks.tsindex eeb7b63955a..4d4cf8d8a46 100644--- a/web/app/components/header/account-setting/key-validator/hooks.ts+++ b/web/app/components/header/account-setting/key-validator/hooks.ts@@ -1,4 +1,4 @@-import type { DebouncedFunc } from 'lodash-es'+import type { DebouncedFunc } from 'es-toolkit/compat'import type { ValidateCallback, ValidatedStatusState, ValidateValue } from './declarations'import { useDebounceFn } from 'ahooks'import { useState } from 'react'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 7d609dba688..31f3fc0afee 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,6 +1,6 @@'use client'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { useContext } from 'use-context-selector'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 9b80cd343d8..93d88fc4eae 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@@ -2,7 +2,7 @@import type { InvitationResult } from '@/models/common'import { RiCloseLine, RiErrorWarningFill } from '@remixicon/react'import { useBoolean } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import { ReactMultiEmail } from 'react-multi-email'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 5fb6c410c41..829eb364a4e 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@@ -2,7 +2,7 @@ import type { InvitationResult } from '@/models/common'import { XMarkIcon } from '@heroicons/react/24/outline'import { CheckCircleIcon } from '@heroicons/react/24/solid'import { RiQuestionLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useMemo } from 'react'import { useTranslation } from 'react-i18next'import Button from '@/app/components/base/button'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 2c6a33dc1fd..323e8f300c8 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,5 +1,5 @@import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useState } from 'react'import { Trans, useTranslation } from 'react-i18next'diff --git a/web/app/components/header/account-setting/menu-dialog.tsx b/web/app/components/header/account-setting/menu-dialog.tsxindex 0b2d2208cd3..cc5adbc18f8 100644--- a/web/app/components/header/account-setting/menu-dialog.tsx+++ b/web/app/components/header/account-setting/menu-dialog.tsx@@ -1,6 +1,6 @@import type { ReactNode } from 'react'import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { Fragment, useCallback, useEffect } from 'react'import { cn } from '@/utils/classnames'diff --git a/web/app/components/header/app-nav/index.tsx b/web/app/components/header/app-nav/index.tsxindex ab567540d4c..34d192de416 100644--- a/web/app/components/header/app-nav/index.tsx+++ b/web/app/components/header/app-nav/index.tsx@@ -5,8 +5,8 @@ import {RiRobot2Fill,RiRobot2Line,} from '@remixicon/react'+import { flatten } from 'es-toolkit/compat'import { produce } from 'immer'-import { flatten } from 'lodash-es'import { useParams } from 'next/navigation'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/header/app-selector/index.tsx b/web/app/components/header/app-selector/index.tsxindex c15ed3e79c3..a9aab59356d 100644--- a/web/app/components/header/app-selector/index.tsx+++ b/web/app/components/header/app-selector/index.tsx@@ -2,7 +2,7 @@import type { AppDetailResponse } from '@/models/app'import { Menu, MenuButton, MenuItem, MenuItems, Transition } from '@headlessui/react'import { ChevronDownIcon, PlusIcon } from '@heroicons/react/24/solid'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useRouter } from 'next/navigation'import { Fragment, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/header/dataset-nav/index.tsx b/web/app/components/header/dataset-nav/index.tsxindex e1943a4ec28..4cdc259d677 100644--- a/web/app/components/header/dataset-nav/index.tsx+++ b/web/app/components/header/dataset-nav/index.tsx@@ -6,7 +6,7 @@ import {RiBook2Fill,RiBook2Line,} from '@remixicon/react'-import { flatten } from 'lodash-es'+import { flatten } from 'es-toolkit/compat'import { useParams, useRouter } from 'next/navigation'import { useCallback, useMemo } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/header/nav/nav-selector/index.tsx b/web/app/components/header/nav/nav-selector/index.tsxindex 905597f021f..c12be7e035c 100644--- a/web/app/components/header/nav/nav-selector/index.tsx+++ b/web/app/components/header/nav/nav-selector/index.tsx@@ -6,7 +6,7 @@ import {RiArrowDownSLine,RiArrowRightSLine,} from '@remixicon/react'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'import { useRouter } from 'next/navigation'import { Fragment, useCallback } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/plugins/base/deprecation-notice.tsx b/web/app/components/plugins/base/deprecation-notice.tsxindex 76d64a45f47..efdd9038831 100644--- a/web/app/components/plugins/base/deprecation-notice.tsx+++ b/web/app/components/plugins/base/deprecation-notice.tsx@@ -1,6 +1,6 @@import type { FC } from 'react'import { RiAlertFill } from '@remixicon/react'-import { camelCase } from 'lodash-es'+import { camelCase } from 'es-toolkit/compat'import Link from 'next/link'import * as React from 'react'import { useMemo } from 'react'diff --git a/web/app/components/plugins/install-plugin/utils.ts b/web/app/components/plugins/install-plugin/utils.tsindex 32d3e542258..549bdc62415 100644--- a/web/app/components/plugins/install-plugin/utils.ts+++ b/web/app/components/plugins/install-plugin/utils.ts@@ -1,6 +1,6 @@import type { Plugin, PluginDeclaration, PluginManifestInMarket } from '../types'import type { GitHubUrlInfo } from '@/app/components/plugins/types'-import { isEmpty } from 'lodash-es'+import { isEmpty } from 'es-toolkit/compat'export const pluginManifestToCardPluginProps = (pluginManifest: PluginDeclaration): Plugin => {return {diff --git a/web/app/components/plugins/marketplace/context.tsx b/web/app/components/plugins/marketplace/context.tsxindex ec76d3440f2..4053c4a556e 100644--- a/web/app/components/plugins/marketplace/context.tsx+++ b/web/app/components/plugins/marketplace/context.tsx@@ -10,7 +10,7 @@ import type {SearchParams,SearchParamsFromCollection,} from './types'-import { debounce, noop } from 'lodash-es'+import { debounce, noop } from 'es-toolkit/compat'import {useCallback,useEffect,diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsxindex b0625d1e825..d0326f6b439 100644--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx@@ -3,7 +3,7 @@ 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 { RiLoader2Line } from '@remixicon/react'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'import * as React from 'react'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'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 18bebf8d959..539544f4359 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,7 +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 { isEqual } from 'lodash-es'+import { isEqual } from 'es-toolkit/compat'import { useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { EncryptedBottom } from '@/app/components/base/encrypted-bottom'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 96c1b6e278d..404766ae436 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,7 +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 { isEqual } from 'lodash-es'+import { isEqual } from 'es-toolkit/compat'import { useMemo, useRef } from 'react'import { useTranslation } from 'react-i18next'import { BaseForm } from '@/app/components/base/form/components/base'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 9adee6cc342..53bb6aa69dc 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,7 +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 { isEqual } from 'lodash-es'+import { isEqual } from 'es-toolkit/compat'import { useMemo, useRef } from 'react'import { useTranslation } from 'react-i18next'import { BaseForm } from '@/app/components/base/form/components/base'diff --git a/web/app/components/plugins/plugin-page/context.tsx b/web/app/components/plugins/plugin-page/context.tsxindex 8a560ac90a8..146353da4f2 100644--- a/web/app/components/plugins/plugin-page/context.tsx+++ b/web/app/components/plugins/plugin-page/context.tsx@@ -2,7 +2,7 @@import type { ReactNode, RefObject } from 'react'import type { FilterState } from './filter-management'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import {useMemo,useRef,diff --git a/web/app/components/plugins/plugin-page/empty/index.tsx b/web/app/components/plugins/plugin-page/empty/index.tsxindex 4d8904d2935..90854bda5d8 100644--- a/web/app/components/plugins/plugin-page/empty/index.tsx+++ b/web/app/components/plugins/plugin-page/empty/index.tsx@@ -1,5 +1,5 @@'use client'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/plugins/plugin-page/index.tsx b/web/app/components/plugins/plugin-page/index.tsxindex 2c6f90caa58..afa85d70100 100644--- a/web/app/components/plugins/plugin-page/index.tsx+++ b/web/app/components/plugins/plugin-page/index.tsx@@ -7,7 +7,7 @@ import {RiEqualizer2Line,} from '@remixicon/react'import { useBoolean } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import Link from 'next/link'import {useRouter,diff --git a/web/app/components/plugins/plugin-page/install-plugin-dropdown.tsx b/web/app/components/plugins/plugin-page/install-plugin-dropdown.tsxindex 60c18dca126..22ed35e95b1 100644--- a/web/app/components/plugins/plugin-page/install-plugin-dropdown.tsx+++ b/web/app/components/plugins/plugin-page/install-plugin-dropdown.tsx@@ -1,7 +1,7 @@'use client'import { RiAddLine, RiArrowDownSLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import Button from '@/app/components/base/button'diff --git a/web/app/components/rag-pipeline/components/panel/input-field/field-list/field-list-container.tsx b/web/app/components/rag-pipeline/components/panel/input-field/field-list/field-list-container.tsxindex 3c4faad439a..108f3a642f4 100644--- a/web/app/components/rag-pipeline/components/panel/input-field/field-list/field-list-container.tsx+++ b/web/app/components/rag-pipeline/components/panel/input-field/field-list/field-list-container.tsx@@ -1,6 +1,6 @@import type { SortableItem } from './types'import type { InputVar } from '@/models/pipeline'-import { isEqual } from 'lodash-es'+import { isEqual } from 'es-toolkit/compat'import {memo,useCallback,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 b11bae24494..303a8caaf57 100644--- a/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx+++ b/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx@@ -2,7 +2,7 @@import type { AppIconSelection } from '@/app/components/base/app-icon-picker'import type { IconInfo } from '@/models/datasets'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'import AppIcon from '@/app/components/base/app-icon'diff --git a/web/app/components/rag-pipeline/hooks/use-pipeline.tsx b/web/app/components/rag-pipeline/hooks/use-pipeline.tsxindex 779a38df995..c84bba660d2 100644--- a/web/app/components/rag-pipeline/hooks/use-pipeline.tsx+++ b/web/app/components/rag-pipeline/hooks/use-pipeline.tsx@@ -1,6 +1,6 @@import type { DataSourceNodeType } from '../../workflow/nodes/data-source/types'import type { Node, ValueSelector } from '../../workflow/types'-import { uniqBy } from 'lodash-es'+import { uniqBy } from 'es-toolkit/compat'import { useCallback } from 'react'import { getOutgoers, useStoreApi } from 'reactflow'import { findUsedVarNodes, updateNodeVars } from '../../workflow/nodes/_base/components/variable/utils'diff --git a/web/app/components/tools/labels/selector.tsx b/web/app/components/tools/labels/selector.tsxindex e3afea41a85..43143e5a058 100644--- a/web/app/components/tools/labels/selector.tsx+++ b/web/app/components/tools/labels/selector.tsx@@ -2,7 +2,7 @@ import type { FC } from 'react'import type { Label } from '@/app/components/tools/labels/constant'import { RiArrowDownSLine } from '@remixicon/react'import { useDebounceFn } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import Checkbox from '@/app/components/base/checkbox'diff --git a/web/app/components/tools/mcp/modal.tsx b/web/app/components/tools/mcp/modal.tsxindex eb8f280484e..c5cde65674c 100644--- a/web/app/components/tools/mcp/modal.tsx+++ b/web/app/components/tools/mcp/modal.tsx@@ -5,7 +5,7 @@ import type { ToolWithProvider } from '@/app/components/workflow/types'import type { AppIconType } from '@/types/app'import { RiCloseLine, RiEditLine } from '@remixicon/react'import { useHover } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useCallback, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/tools/setting/build-in/config-credentials.tsx b/web/app/components/tools/setting/build-in/config-credentials.tsxindex 43383cdb510..033052e8a1e 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,7 @@'use client'import type { FC } from 'react'import type { Collection } from '../../types'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/tools/workflow-tool/confirm-modal/index.tsx b/web/app/components/tools/workflow-tool/confirm-modal/index.tsxindex f90774cb32d..e1a7dff113f 100644--- a/web/app/components/tools/workflow-tool/confirm-modal/index.tsx+++ b/web/app/components/tools/workflow-tool/confirm-modal/index.tsx@@ -1,7 +1,7 @@'use client'import { RiCloseLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useTranslation } from 'react-i18next'import Button from '@/app/components/base/button'import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'diff --git a/web/app/components/workflow-app/hooks/use-workflow-run.ts b/web/app/components/workflow-app/hooks/use-workflow-run.tsindex 16c7bab6d4e..031e2949cb9 100644--- a/web/app/components/workflow-app/hooks/use-workflow-run.ts+++ b/web/app/components/workflow-app/hooks/use-workflow-run.ts@@ -2,8 +2,8 @@ import type AudioPlayer from '@/app/components/base/audio-btn/audio'import type { Node } from '@/app/components/workflow/types'import type { IOtherOptions } from '@/service/base'import type { VersionHistory } from '@/types/workflow'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import { usePathname } from 'next/navigation'import { useCallback, useRef } from 'react'import {diff --git a/web/app/components/workflow/block-selector/blocks.tsx b/web/app/components/workflow/block-selector/blocks.tsxindex 51d08d15df9..388532f7a23 100644--- a/web/app/components/workflow/block-selector/blocks.tsx+++ b/web/app/components/workflow/block-selector/blocks.tsx@@ -1,5 +1,5 @@import type { NodeDefault } from '../types'-import { groupBy } from 'lodash-es'+import { groupBy } from 'es-toolkit/compat'import {memo,useCallback,diff --git a/web/app/components/workflow/block-selector/market-place-plugin/list.tsx b/web/app/components/workflow/block-selector/market-place-plugin/list.tsxindex 58724b46219..d6f3007b516 100644--- a/web/app/components/workflow/block-selector/market-place-plugin/list.tsx+++ b/web/app/components/workflow/block-selector/market-place-plugin/list.tsx@@ -2,7 +2,7 @@import type { RefObject } from 'react'import type { Plugin, PluginCategoryEnum } from '@/app/components/plugins/types'import { RiArrowRightUpLine, RiSearchLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import Link from 'next/link'import { useEffect, useImperativeHandle, useMemo, useRef } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/custom-edge.tsx b/web/app/components/workflow/custom-edge.tsxindex 3b73e07536e..6427520d817 100644--- a/web/app/components/workflow/custom-edge.tsx+++ b/web/app/components/workflow/custom-edge.tsx@@ -3,7 +3,7 @@ import type {Edge,OnSelectBlock,} from './types'-import { intersection } from 'lodash-es'+import { intersection } from 'es-toolkit/compat'import {memo,useCallback,diff --git a/web/app/components/workflow/dsl-export-confirm-modal.tsx b/web/app/components/workflow/dsl-export-confirm-modal.tsxindex b616ec5fb57..c5ae8e7cffb 100644--- a/web/app/components/workflow/dsl-export-confirm-modal.tsx+++ b/web/app/components/workflow/dsl-export-confirm-modal.tsx@@ -1,7 +1,7 @@'use client'import type { EnvironmentVariable } from '@/app/components/workflow/types'import { RiCloseLine, RiLock2Line } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/hooks-store/store.ts b/web/app/components/workflow/hooks-store/store.tsindex 79cfb7dbcec..3aa4ba3d912 100644--- a/web/app/components/workflow/hooks-store/store.ts+++ b/web/app/components/workflow/hooks-store/store.ts@@ -12,7 +12,7 @@ import type { FlowType } from '@/types/common'import type { VarInInspect } from '@/types/workflow'import {noop,-} from 'lodash-es'+} from 'es-toolkit/compat'import { useContext } from 'react'import {useStore as useZustandStore,diff --git a/web/app/components/workflow/hooks/use-nodes-layout.ts b/web/app/components/workflow/hooks/use-nodes-layout.tsindex 653b37008c4..2ad89ff1005 100644--- a/web/app/components/workflow/hooks/use-nodes-layout.ts+++ b/web/app/components/workflow/hooks/use-nodes-layout.ts@@ -3,7 +3,7 @@ import type {Node,} from '../types'import ELK from 'elkjs/lib/elk.bundled.js'-import { cloneDeep } from 'lodash-es'+import { cloneDeep } from 'es-toolkit/compat'import { useCallback } from 'react'import {useReactFlow,diff --git a/web/app/components/workflow/hooks/use-workflow-history.ts b/web/app/components/workflow/hooks/use-workflow-history.tsindex 3e6043a1fd2..0171271c3bb 100644--- a/web/app/components/workflow/hooks/use-workflow-history.ts+++ b/web/app/components/workflow/hooks/use-workflow-history.ts@@ -1,5 +1,5 @@import type { WorkflowHistoryEventMeta } from '../workflow-history-store'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'import {useCallback,useRef,diff --git a/web/app/components/workflow/hooks/use-workflow.ts b/web/app/components/workflow/hooks/use-workflow.tsindex c958bb6b83f..990c8c950d2 100644--- a/web/app/components/workflow/hooks/use-workflow.ts+++ b/web/app/components/workflow/hooks/use-workflow.ts@@ -9,7 +9,7 @@ import type {Node,ValueSelector,} from '../types'-import { uniqBy } from 'lodash-es'+import { uniqBy } from 'es-toolkit/compat'import {useCallback,} from 'react'diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsxindex 1d0c594c234..2b2b1ee5434 100644--- a/web/app/components/workflow/index.tsx+++ b/web/app/components/workflow/index.tsx@@ -13,8 +13,8 @@ import type { VarInInspect } from '@/types/workflow'import {useEventListener,} from 'ahooks'+import { isEqual } from 'es-toolkit/compat'import { setAutoFreeze } from 'immer'-import { isEqual } from 'lodash-es'import dynamic from 'next/dynamic'import {memo,diff --git a/web/app/components/workflow/nodes/_base/components/agent-strategy.tsx b/web/app/components/workflow/nodes/_base/components/agent-strategy.tsxindex d7592b3c6f1..a390ccec3c5 100644--- a/web/app/components/workflow/nodes/_base/components/agent-strategy.tsx+++ b/web/app/components/workflow/nodes/_base/components/agent-strategy.tsx@@ -4,7 +4,7 @@ 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 'lodash-es'+import { noop } from 'es-toolkit/compat'import Link from 'next/link'import { memo } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx b/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsxindex fa7aef90a5b..ad5410986c2 100644--- a/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx+++ b/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx@@ -1,7 +1,7 @@'use client'import type { FC } from 'react'import Editor, { loader } from '@monaco-editor/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useMemo, useRef, useState } from 'react'import {diff --git a/web/app/components/workflow/nodes/_base/components/file-type-item.tsx b/web/app/components/workflow/nodes/_base/components/file-type-item.tsxindex b354d35276e..9498edba8fc 100644--- a/web/app/components/workflow/nodes/_base/components/file-type-item.tsx+++ b/web/app/components/workflow/nodes/_base/components/file-type-item.tsx@@ -1,6 +1,6 @@'use client'import type { FC } from 'react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/_base/components/input-support-select-var.tsx b/web/app/components/workflow/nodes/_base/components/input-support-select-var.tsxindex 348bb23302c..e0bb6f6df55 100644--- a/web/app/components/workflow/nodes/_base/components/input-support-select-var.tsx+++ b/web/app/components/workflow/nodes/_base/components/input-support-select-var.tsx@@ -5,7 +5,7 @@ import type {NodeOutPutVar,} from '@/app/components/workflow/types'import { useBoolean } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useEffect } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/_base/components/next-step/index.tsx b/web/app/components/workflow/nodes/_base/components/next-step/index.tsxindex 0f23161261b..b9a4404dbbf 100644--- a/web/app/components/workflow/nodes/_base/components/next-step/index.tsx+++ b/web/app/components/workflow/nodes/_base/components/next-step/index.tsx@@ -1,7 +1,7 @@import type {Node,} from '../../../../types'-import { isEqual } from 'lodash-es'+import { isEqual } from 'es-toolkit/compat'import { memo, useMemo } from 'react'import { useTranslation } from 'react-i18next'import {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 1b550f035de..906dad4bc9a 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@@ -3,7 +3,7 @@ import type {OnSelectBlock,} from '@/app/components/workflow/types'import { RiMoreFill } from '@remixicon/react'-import { intersection } from 'lodash-es'+import { intersection } from 'es-toolkit/compat'import {useCallback,} from 'react'diff --git a/web/app/components/workflow/nodes/_base/components/panel-operator/change-block.tsx b/web/app/components/workflow/nodes/_base/components/panel-operator/change-block.tsxindex 47e1c4b22b0..9236c022b9f 100644--- a/web/app/components/workflow/nodes/_base/components/panel-operator/change-block.tsx+++ b/web/app/components/workflow/nodes/_base/components/panel-operator/change-block.tsx@@ -2,7 +2,7 @@ import type {Node,OnSelectBlock,} from '@/app/components/workflow/types'-import { intersection } from 'lodash-es'+import { intersection } from 'es-toolkit/compat'import {memo,useCallback,diff --git a/web/app/components/workflow/nodes/_base/components/variable/utils.ts b/web/app/components/workflow/nodes/_base/components/variable/utils.tsindex 5a5a9b826ab..a7dc04e5715 100644--- a/web/app/components/workflow/nodes/_base/components/variable/utils.ts+++ b/web/app/components/workflow/nodes/_base/components/variable/utils.ts@@ -33,8 +33,8 @@ import type {import type { PromptItem } from '@/models/debug'import type { RAGPipelineVariable } from '@/models/pipeline'import type { SchemaTypeDefinition } from '@/service/use-common'+import { isArray, uniq } from 'es-toolkit/compat'import { produce } from 'immer'-import { isArray, uniq } from 'lodash-es'import {AGENT_OUTPUT_STRUCT,FILE_STRUCT,diff --git a/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.tsx b/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.tsxindex 05e2c913cea..e92fc9a3b7c 100644--- a/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.tsx+++ b/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.tsx@@ -11,8 +11,8 @@ import {RiLoader4Line,RiMoreLine,} from '@remixicon/react'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import * as React from 'react'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx b/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsxindex dd0dfa86823..078ba1ef4f9 100644--- a/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx+++ b/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx@@ -4,7 +4,7 @@ import type { StructuredOutput } from '../../../llm/types'import type { Field } from '@/app/components/workflow/nodes/llm/types'import type { NodeOutPutVar, ValueSelector, Var } from '@/app/components/workflow/types'import { useHover } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useEffect, useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'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 63b392482f0..828f7e5ebee 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@@ -3,7 +3,7 @@ import {RiErrorWarningFill,RiMoreLine,} from '@remixicon/react'-import { capitalize } from 'lodash-es'+import { capitalize } from 'es-toolkit/compat'import { memo } from 'react'import Tooltip from '@/app/components/base/tooltip'import { cn } from '@/utils/classnames'diff --git a/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx b/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsxindex 8e684afa87c..2e25d029b46 100644--- a/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx+++ b/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx@@ -6,7 +6,7 @@ import {RiCloseLine,RiPlayLargeLine,} from '@remixicon/react'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'import * as React from 'react'import {cloneElement,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 59774ab96ae..d8fd4d2c57e 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,9 +1,9 @@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 { produce } from 'immer'+import { noop, unionBy } from 'es-toolkit/compat'-import { noop, unionBy } from 'lodash-es'+import { produce } from 'immer'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import {diff --git a/web/app/components/workflow/nodes/assigner/components/var-list/index.tsx b/web/app/components/workflow/nodes/assigner/components/var-list/index.tsxindex 422cd5a486b..f5ea45d60e7 100644--- a/web/app/components/workflow/nodes/assigner/components/var-list/index.tsx+++ b/web/app/components/workflow/nodes/assigner/components/var-list/index.tsx@@ -3,8 +3,8 @@ import type { FC } from 'react'import type { AssignerNodeOperation } from '../../types'import type { ValueSelector, Var } from '@/app/components/workflow/types'import { RiDeleteBinLine } from '@remixicon/react'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/assigner/hooks.ts b/web/app/components/workflow/nodes/assigner/hooks.tsindex d708222868d..a3a5db8bfbd 100644--- a/web/app/components/workflow/nodes/assigner/hooks.ts+++ b/web/app/components/workflow/nodes/assigner/hooks.ts@@ -2,7 +2,7 @@ import type {Node,Var,} from '../../types'-import { uniqBy } from 'lodash-es'+import { uniqBy } from 'es-toolkit/compat'import { useCallback } from 'react'import { useNodes } from 'reactflow'import {diff --git a/web/app/components/workflow/nodes/http/components/edit-body/index.tsx b/web/app/components/workflow/nodes/http/components/edit-body/index.tsxindex c475f1234aa..90c230b6bb5 100644--- a/web/app/components/workflow/nodes/http/components/edit-body/index.tsx+++ b/web/app/components/workflow/nodes/http/components/edit-body/index.tsx@@ -2,8 +2,8 @@import type { FC } from 'react'import type { Body, BodyPayload, KeyValue as KeyValueType } from '../../types'import type { ValueSelector, Var } from '@/app/components/workflow/types'+import { uniqueId } from 'es-toolkit/compat'import { produce } from 'immer'-import { uniqueId } from 'lodash-es'import * as React from 'react'import { useCallback, useMemo } from 'react'import InputWithVar from '@/app/components/workflow/nodes/_base/components/prompt/editor'diff --git a/web/app/components/workflow/nodes/http/hooks/use-key-value-list.ts b/web/app/components/workflow/nodes/http/hooks/use-key-value-list.tsindex b174b7e6de0..650ae471562 100644--- a/web/app/components/workflow/nodes/http/hooks/use-key-value-list.ts+++ b/web/app/components/workflow/nodes/http/hooks/use-key-value-list.ts@@ -1,6 +1,6 @@import type { KeyValue } from '../types'import { useBoolean } from 'ahooks'-import { uniqueId } from 'lodash-es'+import { uniqueId } from 'es-toolkit/compat'import { useCallback, useEffect, useState } from 'react'const UNIQUE_ID_PREFIX = 'key-value-'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 29419be0110..9133271161e 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@@ -4,7 +4,7 @@ import type {} from '@/app/components/workflow/types'import { RiArrowDownSLine } from '@remixicon/react'import { useBoolean } from 'ahooks'-import { capitalize } from 'lodash-es'+import { capitalize } from 'es-toolkit/compat'import {memo,useCallback,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 cdcd7561db8..b829ebb0408 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@@ -7,7 +7,7 @@ import {RiDeleteBinLine,RiDraggable,} from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/iteration/use-config.ts b/web/app/components/workflow/nodes/iteration/use-config.tsindex 50cee67f81d..31065770859 100644--- a/web/app/components/workflow/nodes/iteration/use-config.ts+++ b/web/app/components/workflow/nodes/iteration/use-config.ts@@ -2,8 +2,8 @@ import type { ErrorHandleMode, ValueSelector, Var } from '../../types'import type { IterationNodeType } from './types'import type { Item } from '@/app/components/base/select'import type { VarType as VarKindType } from '@/app/components/workflow/nodes/tool/types'+import { isEqual } from 'es-toolkit/compat'import { produce } from 'immer'-import { isEqual } from 'lodash-es'import { useCallback } from 'react'import {useAllBuiltInTools,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 c930387c823..574501a27dc 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,5 +1,5 @@import { RiArrowDownSLine } from '@remixicon/react'-import { capitalize } from 'lodash-es'+import { capitalize } from 'es-toolkit/compat'import { useState } from 'react'import Button from '@/app/components/base/button'import {diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/index.tsx b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/index.tsxindex 9b541b9ea67..8a90a8bf5d5 100644--- a/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/index.tsx+++ b/web/app/components/workflow/nodes/knowledge-retrieval/components/metadata/metadata-filter/index.tsx@@ -1,5 +1,5 @@import type { MetadataShape } from '@/app/components/workflow/nodes/knowledge-retrieval/types'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import {useCallback,useState,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 02ae01ba166..610aaf5d637 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@@ -2,6 +2,7 @@import type { FC } from 'react'import type { ModelConfig } from '../../../types'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 { RiEqualizer2Line } from '@remixicon/react'@@ -28,8 +29,8 @@ type Props = {onRetrievalModeChange: (mode: RETRIEVE_TYPE) => voidonMultipleRetrievalConfigChange: (config: MultipleRetrievalConfig) => voidsingleRetrievalModelConfig?: ModelConfig- onSingleRetrievalModelChange?: (config: ModelConfig) => void- onSingleRetrievalModelParamsChange?: (config: ModelConfig) => void+ onSingleRetrievalModelChange?: ModelParameterModalProps['setModel']+ onSingleRetrievalModelParamsChange?: ModelParameterModalProps['onCompletionParamsChange']readonly?: booleanrerankModalOpen: booleanonRerankModelOpenChange: (open: boolean) => voiddiff --git a/web/app/components/workflow/nodes/knowledge-retrieval/panel.tsx b/web/app/components/workflow/nodes/knowledge-retrieval/panel.tsxindex ff5a9e22925..1471be9741e 100644--- a/web/app/components/workflow/nodes/knowledge-retrieval/panel.tsx+++ b/web/app/components/workflow/nodes/knowledge-retrieval/panel.tsx@@ -1,7 +1,7 @@import type { FC } from 'react'import type { KnowledgeRetrievalNodeType } from './types'import type { NodePanelProps } from '@/app/components/workflow/types'-import { intersectionBy } from 'lodash-es'+import { intersectionBy } from 'es-toolkit/compat'import {memo,useMemo,@@ -104,7 +104,7 @@ const Panel: FC<NodePanelProps<KnowledgeRetrievalNodeType>> = ({onRetrievalModeChange={handleRetrievalModeChange}onMultipleRetrievalConfigChange={handleMultipleRetrievalConfigChange}singleRetrievalModelConfig={inputs.single_retrieval_config?.model}- onSingleRetrievalModelChange={handleModelChanged as any}+ onSingleRetrievalModelChange={handleModelChanged}onSingleRetrievalModelParamsChange={handleCompletionParamsChange}readonly={readOnly || !selectedDatasets.length}rerankModalOpen={rerankModelOpen}diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/use-config.ts b/web/app/components/workflow/nodes/knowledge-retrieval/use-config.tsindex d0846b3a342..9a63bf96de6 100644--- a/web/app/components/workflow/nodes/knowledge-retrieval/use-config.ts+++ b/web/app/components/workflow/nodes/knowledge-retrieval/use-config.ts@@ -9,8 +9,8 @@ import type {MultipleRetrievalConfig,} from './types'import type { DataSet } from '@/models/datasets'+import { isEqual } from 'es-toolkit/compat'import { produce } from 'immer'-import { isEqual } from 'lodash-es'import {useCallback,useEffect,diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts b/web/app/components/workflow/nodes/knowledge-retrieval/utils.tsindex 12cf8c053ce..d6cd69b39ac 100644--- a/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts+++ b/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts@@ -6,7 +6,7 @@ import type {import {uniq,xorBy,-} from 'lodash-es'+} from 'es-toolkit/compat'import { DATASET_DEFAULT } from '@/config'import {DEFAULT_WEIGHTED_SCORE,diff --git a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/context.tsx b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/context.tsxindex cfe63159d37..557cddfb61c 100644--- a/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/context.tsx+++ b/web/app/components/workflow/nodes/llm/components/json-schema-config-modal/visual-editor/context.tsx@@ -1,4 +1,4 @@-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import {createContext,useContext,diff --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 84c28b236ec..1673c80f4f6 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,8 +1,8 @@import type { VisualEditorProps } from '.'import type { Field } from '../../../types'import type { EditData } from './edit-card'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import Toast from '@/app/components/base/toast'import { ArrayType, Type } from '../../../types'import { findPropertyWithPath } from '../../../utils'diff --git a/web/app/components/workflow/nodes/llm/use-single-run-form-params.ts b/web/app/components/workflow/nodes/llm/use-single-run-form-params.tsindex ae500074ff8..f7cb609f0ee 100644--- a/web/app/components/workflow/nodes/llm/use-single-run-form-params.ts+++ b/web/app/components/workflow/nodes/llm/use-single-run-form-params.ts@@ -2,7 +2,7 @@ import type { RefObject } from 'react'import type { LLMNodeType } from './types'import type { Props as FormProps } from '@/app/components/workflow/nodes/_base/components/before-run-form/form'import type { InputVar, PromptItem, Var, Variable } from '@/app/components/workflow/types'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { InputVarType, VarType } from '@/app/components/workflow/types'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 29419be0110..9133271161e 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@@ -4,7 +4,7 @@ import type {} from '@/app/components/workflow/types'import { RiArrowDownSLine } from '@remixicon/react'import { useBoolean } from 'ahooks'-import { capitalize } from 'lodash-es'+import { capitalize } from 'es-toolkit/compat'import {memo,useCallback,diff --git a/web/app/components/workflow/nodes/parameter-extractor/use-single-run-form-params.ts b/web/app/components/workflow/nodes/parameter-extractor/use-single-run-form-params.tsindex abf187d6e50..c53df966882 100644--- a/web/app/components/workflow/nodes/parameter-extractor/use-single-run-form-params.ts+++ b/web/app/components/workflow/nodes/parameter-extractor/use-single-run-form-params.ts@@ -2,7 +2,7 @@ import type { RefObject } from 'react'import type { ParameterExtractorNodeType } from './types'import type { Props as FormProps } from '@/app/components/workflow/nodes/_base/components/before-run-form/form'import type { InputVar, Var, Variable } from '@/app/components/workflow/types'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { InputVarType, VarType } from '@/app/components/workflow/types'diff --git a/web/app/components/workflow/nodes/question-classifier/components/class-item.tsx b/web/app/components/workflow/nodes/question-classifier/components/class-item.tsxindex 2af2f8036a9..a33ba03550a 100644--- a/web/app/components/workflow/nodes/question-classifier/components/class-item.tsx+++ b/web/app/components/workflow/nodes/question-classifier/components/class-item.tsx@@ -2,7 +2,7 @@import type { FC } from 'react'import type { Topic } from '../types'import type { ValueSelector, Var } from '@/app/components/workflow/types'-import { uniqueId } from 'lodash-es'+import { uniqueId } from 'es-toolkit/compat'import * as React from 'react'import { useCallback, useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/question-classifier/components/class-list.tsx b/web/app/components/workflow/nodes/question-classifier/components/class-list.tsxindex 8e61f918a52..8527ce3ad39 100644--- a/web/app/components/workflow/nodes/question-classifier/components/class-list.tsx+++ b/web/app/components/workflow/nodes/question-classifier/components/class-list.tsx@@ -3,8 +3,8 @@ import type { FC } from 'react'import type { Topic } from '@/app/components/workflow/nodes/question-classifier/types'import type { ValueSelector, Var } from '@/app/components/workflow/types'import { RiDraggable } from '@remixicon/react'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import * as React from 'react'import { useCallback, useEffect, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/question-classifier/use-single-run-form-params.ts b/web/app/components/workflow/nodes/question-classifier/use-single-run-form-params.tsindex 095809eba29..9f2ad5fa39d 100644--- a/web/app/components/workflow/nodes/question-classifier/use-single-run-form-params.ts+++ b/web/app/components/workflow/nodes/question-classifier/use-single-run-form-params.ts@@ -2,7 +2,7 @@ import type { RefObject } from 'react'import type { QuestionClassifierNodeType } from './types'import type { Props as FormProps } from '@/app/components/workflow/nodes/_base/components/before-run-form/form'import type { InputVar, Var, Variable } from '@/app/components/workflow/types'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'import { InputVarType, VarType } from '@/app/components/workflow/types'diff --git a/web/app/components/workflow/nodes/start/components/var-item.tsx b/web/app/components/workflow/nodes/start/components/var-item.tsxindex a506c51e31d..83676ed21f1 100644--- a/web/app/components/workflow/nodes/start/components/var-item.tsx+++ b/web/app/components/workflow/nodes/start/components/var-item.tsx@@ -5,7 +5,7 @@ import {RiDeleteBinLine,} from '@remixicon/react'import { useBoolean, useHover } from 'ahooks'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import * as React from 'react'import { useCallback, useRef } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/tool/components/copy-id.tsx b/web/app/components/workflow/nodes/tool/components/copy-id.tsxindex 8e53970749c..6a608fa0b63 100644--- a/web/app/components/workflow/nodes/tool/components/copy-id.tsx+++ b/web/app/components/workflow/nodes/tool/components/copy-id.tsx@@ -1,7 +1,7 @@'use client'import { RiFileCopyLine } from '@remixicon/react'import copy from 'copy-to-clipboard'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'import * as React from 'react'import { useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/tool/components/input-var-list.tsx b/web/app/components/workflow/nodes/tool/components/input-var-list.tsxindex 8b1bd46eebd..23f3868c593 100644--- a/web/app/components/workflow/nodes/tool/components/input-var-list.tsx+++ b/web/app/components/workflow/nodes/tool/components/input-var-list.tsx@@ -4,8 +4,8 @@ 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, ValueSelector, Var } from '@/app/components/workflow/types'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import * as React from 'react'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/variable-assigner/components/var-list/index.tsx b/web/app/components/workflow/nodes/variable-assigner/components/var-list/index.tsxindex 19ead7ead15..85ff2def9a9 100644--- a/web/app/components/workflow/nodes/variable-assigner/components/var-list/index.tsx+++ b/web/app/components/workflow/nodes/variable-assigner/components/var-list/index.tsx@@ -1,8 +1,8 @@'use client'import type { FC } from 'react'import type { ValueSelector, Var } from '@/app/components/workflow/types'+import { noop } from 'es-toolkit/compat'import { produce } from 'immer'-import { noop } from 'lodash-es'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/nodes/variable-assigner/hooks.ts b/web/app/components/workflow/nodes/variable-assigner/hooks.tsindex b20cee79c7d..5c2fe369225 100644--- a/web/app/components/workflow/nodes/variable-assigner/hooks.ts+++ b/web/app/components/workflow/nodes/variable-assigner/hooks.ts@@ -7,9 +7,9 @@ import type {VarGroupItem,VariableAssignerNodeType,} from './types'-import { produce } from 'immer'+import { uniqBy } from 'es-toolkit/compat'-import { uniqBy } from 'lodash-es'+import { produce } from 'immer'import { useCallback } from 'react'import {useNodes,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 3f5472ad568..d1b178ec4c2 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@@ -11,7 +11,7 @@ import {RiLinkUnlinkM,} from '@remixicon/react'import { useClickAway } from 'ahooks'-import { escape } from 'lodash-es'+import { escape } from 'es-toolkit/compat'import {memo,useEffect,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 2c6e014b154..fb191bc05ab 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@@ -5,11 +5,11 @@ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContextimport {mergeRegister,} from '@lexical/utils'+import { escape } from 'es-toolkit/compat'import {CLICK_COMMAND,COMMAND_PRIORITY_LOW,} from 'lexical'-import { escape } from 'lodash-es'import {useCallback,useEffect,diff --git a/web/app/components/workflow/panel/chat-variable-panel/components/variable-item.tsx b/web/app/components/workflow/panel/chat-variable-panel/components/variable-item.tsxindex a43179026ef..9fec4f7d014 100644--- a/web/app/components/workflow/panel/chat-variable-panel/components/variable-item.tsx+++ b/web/app/components/workflow/panel/chat-variable-panel/components/variable-item.tsx@@ -1,6 +1,6 @@import type { ConversationVariable } from '@/app/components/workflow/types'import { RiDeleteBinLine, RiEditLine } from '@remixicon/react'-import { capitalize } from 'lodash-es'+import { capitalize } from 'es-toolkit/compat'import { memo, useState } from 'react'import { BubbleX } from '@/app/components/base/icons/src/vender/line/others'import { cn } from '@/utils/classnames'diff --git a/web/app/components/workflow/panel/debug-and-preview/conversation-variable-modal.tsx b/web/app/components/workflow/panel/debug-and-preview/conversation-variable-modal.tsxindex 6e130180d08..4542e1fb906 100644--- a/web/app/components/workflow/panel/debug-and-preview/conversation-variable-modal.tsx+++ b/web/app/components/workflow/panel/debug-and-preview/conversation-variable-modal.tsx@@ -5,7 +5,7 @@ import type {import { RiCloseLine } from '@remixicon/react'import { useMount } from 'ahooks'import copy from 'copy-to-clipboard'-import { capitalize, noop } from 'lodash-es'+import { capitalize, noop } from 'es-toolkit/compat'import * as React from 'react'import { useCallback } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/app/components/workflow/panel/debug-and-preview/hooks.ts b/web/app/components/workflow/panel/debug-and-preview/hooks.tsindex 6eb1ea0b767..b771d97006e 100644--- a/web/app/components/workflow/panel/debug-and-preview/hooks.ts+++ b/web/app/components/workflow/panel/debug-and-preview/hooks.ts@@ -5,8 +5,8 @@ import type {Inputs,} from '@/app/components/base/chat/types'import type { FileEntity } from '@/app/components/base/file-uploader/types'+import { uniqBy } from 'es-toolkit/compat'import { produce, setAutoFreeze } from 'immer'-import { uniqBy } from 'lodash-es'import {useCallback,useEffect,diff --git a/web/app/components/workflow/panel/debug-and-preview/index.tsx b/web/app/components/workflow/panel/debug-and-preview/index.tsxindex 3005b68a9ce..2b63cf47515 100644--- a/web/app/components/workflow/panel/debug-and-preview/index.tsx+++ b/web/app/components/workflow/panel/debug-and-preview/index.tsx@@ -1,7 +1,7 @@import type { StartNodeType } from '../../nodes/start/types'import { RiCloseLine, RiEqualizer2Line } from '@remixicon/react'-import { debounce, noop } from 'lodash-es'+import { debounce, noop } from 'es-toolkit/compat'import {memo,useCallback,diff --git a/web/app/components/workflow/panel/env-panel/env-item.tsx b/web/app/components/workflow/panel/env-panel/env-item.tsxindex 64d6610643e..582539b85b8 100644--- a/web/app/components/workflow/panel/env-panel/env-item.tsx+++ b/web/app/components/workflow/panel/env-panel/env-item.tsx@@ -1,6 +1,6 @@import type { EnvironmentVariable } from '@/app/components/workflow/types'import { RiDeleteBinLine, RiEditLine, RiLock2Line } from '@remixicon/react'-import { capitalize } from 'lodash-es'+import { capitalize } from 'es-toolkit/compat'import { memo, useState } from 'react'import { Env } from '@/app/components/base/icons/src/vender/line/others'import { useStore } from '@/app/components/workflow/store'diff --git a/web/app/components/workflow/panel/global-variable-panel/item.tsx b/web/app/components/workflow/panel/global-variable-panel/item.tsxindex f82579dedbc..458dd276923 100644--- a/web/app/components/workflow/panel/global-variable-panel/item.tsx+++ b/web/app/components/workflow/panel/global-variable-panel/item.tsx@@ -1,5 +1,5 @@import type { GlobalVariable } from '@/app/components/workflow/types'-import { capitalize } from 'lodash-es'+import { capitalize } from 'es-toolkit/compat'import { memo } from 'react'import { GlobalVariable as GlobalVariableIcon } from '@/app/components/base/icons/src/vender/line/others'diff --git a/web/app/components/workflow/run/utils/format-log/agent/index.ts b/web/app/components/workflow/run/utils/format-log/agent/index.tsindex a4c1ea5167d..f86e4b33bb8 100644--- a/web/app/components/workflow/run/utils/format-log/agent/index.ts+++ b/web/app/components/workflow/run/utils/format-log/agent/index.ts@@ -1,5 +1,5 @@import type { AgentLogItem, AgentLogItemWithChildren, NodeTracing } from '@/types/workflow'-import { cloneDeep } from 'lodash-es'+import { cloneDeep } from 'es-toolkit/compat'import { BlockEnum } from '@/app/components/workflow/types'const supportedAgentLogNodes = [BlockEnum.Agent, BlockEnum.Tool]diff --git a/web/app/components/workflow/run/utils/format-log/index.ts b/web/app/components/workflow/run/utils/format-log/index.tsindex 2c89e915719..1dbe8f16823 100644--- a/web/app/components/workflow/run/utils/format-log/index.ts+++ b/web/app/components/workflow/run/utils/format-log/index.ts@@ -1,5 +1,5 @@import type { NodeTracing } from '@/types/workflow'-import { cloneDeep } from 'lodash-es'+import { cloneDeep } from 'es-toolkit/compat'import { BlockEnum } from '../../../types'import formatAgentNode from './agent'import { addChildrenToIterationNode } from './iteration'diff --git a/web/app/components/workflow/run/utils/format-log/iteration/index.spec.ts b/web/app/components/workflow/run/utils/format-log/iteration/index.spec.tsindex 855ac4c69d9..8b4416f5299 100644--- a/web/app/components/workflow/run/utils/format-log/iteration/index.spec.ts+++ b/web/app/components/workflow/run/utils/format-log/iteration/index.spec.ts@@ -1,4 +1,4 @@-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import format from '.'import graphToLogStruct from '../graph-to-log-struct'diff --git a/web/app/components/workflow/run/utils/format-log/loop/index.spec.ts b/web/app/components/workflow/run/utils/format-log/loop/index.spec.tsindex aee2a432c35..3d31e43ba3e 100644--- a/web/app/components/workflow/run/utils/format-log/loop/index.spec.ts+++ b/web/app/components/workflow/run/utils/format-log/loop/index.spec.ts@@ -1,4 +1,4 @@-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import format from '.'import graphToLogStruct from '../graph-to-log-struct'diff --git a/web/app/components/workflow/store/workflow/workflow-draft-slice.ts b/web/app/components/workflow/store/workflow/workflow-draft-slice.tsindex 83792e84a60..68265a8eba6 100644--- a/web/app/components/workflow/store/workflow/workflow-draft-slice.ts+++ b/web/app/components/workflow/store/workflow/workflow-draft-slice.ts@@ -5,7 +5,7 @@ import type {EnvironmentVariable,Node,} from '@/app/components/workflow/types'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'type DebouncedFunc = {(fn: () => void): voiddiff --git a/web/app/components/workflow/utils/elk-layout.ts b/web/app/components/workflow/utils/elk-layout.tsindex 05f81872bbc..1a4bbf2d502 100644--- a/web/app/components/workflow/utils/elk-layout.ts+++ b/web/app/components/workflow/utils/elk-layout.ts@@ -5,7 +5,7 @@ import type {Node,} from '@/app/components/workflow/types'import ELK from 'elkjs/lib/elk.bundled.js'-import { cloneDeep } from 'lodash-es'+import { cloneDeep } from 'es-toolkit/compat'import {CUSTOM_NODE,NODE_LAYOUT_HORIZONTAL_PADDING,diff --git a/web/app/components/workflow/utils/workflow-init.ts b/web/app/components/workflow/utils/workflow-init.tsindex 18ba643d30d..fa211934e48 100644--- a/web/app/components/workflow/utils/workflow-init.ts+++ b/web/app/components/workflow/utils/workflow-init.ts@@ -9,7 +9,7 @@ import type {} from '../types'import {cloneDeep,-} from 'lodash-es'+} from 'es-toolkit/compat'import {getConnectedEdges,} from 'reactflow'diff --git a/web/app/components/workflow/utils/workflow.ts b/web/app/components/workflow/utils/workflow.tsindex 43fbd687c12..7fabc51a455 100644--- a/web/app/components/workflow/utils/workflow.ts+++ b/web/app/components/workflow/utils/workflow.ts@@ -4,7 +4,7 @@ import type {} from '../types'import {uniqBy,-} from 'lodash-es'+} from 'es-toolkit/compat'import {getOutgoers,} from 'reactflow'diff --git a/web/app/components/workflow/variable-inspect/index.tsx b/web/app/components/workflow/variable-inspect/index.tsxindex ced7861e004..775c761eca5 100644--- a/web/app/components/workflow/variable-inspect/index.tsx+++ b/web/app/components/workflow/variable-inspect/index.tsx@@ -1,5 +1,5 @@import type { FC } from 'react'-import { debounce } from 'lodash-es'+import { debounce } from 'es-toolkit/compat'import {useCallback,useMemo,diff --git a/web/app/components/workflow/workflow-history-store.tsx b/web/app/components/workflow/workflow-history-store.tsxindex 502cb733cbc..6729fe50e39 100644--- a/web/app/components/workflow/workflow-history-store.tsx+++ b/web/app/components/workflow/workflow-history-store.tsx@@ -3,8 +3,8 @@ import type { TemporalState } from 'zundo'import type { StoreApi } from 'zustand'import type { WorkflowHistoryEventT } from './hooks'import type { Edge, Node } from './types'+import { noop } from 'es-toolkit/compat'import isDeepEqual from 'fast-deep-equal'-import { noop } from 'lodash-es'import { createContext, useContext, useMemo, useState } from 'react'import { temporal } from 'zundo'import { create } from 'zustand'diff --git a/web/app/education-apply/education-apply-page.tsx b/web/app/education-apply/education-apply-page.tsxindex 5f2446352e4..efd74d42d51 100644--- a/web/app/education-apply/education-apply-page.tsx+++ b/web/app/education-apply/education-apply-page.tsx@@ -1,7 +1,7 @@'use client'import { RiExternalLinkLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import {useRouter,useSearchParams,diff --git a/web/app/reset-password/page.tsx b/web/app/reset-password/page.tsxindex c7e15f8b3fa..479f550ae92 100644--- a/web/app/reset-password/page.tsx+++ b/web/app/reset-password/page.tsx@@ -1,6 +1,6 @@'use client'import { RiArrowLeftLine, RiLockPasswordLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import Link from 'next/link'import { useRouter, useSearchParams } from 'next/navigation'import { useState } from 'react'diff --git a/web/app/signin/components/mail-and-password-auth.tsx b/web/app/signin/components/mail-and-password-auth.tsxindex 9ab2d9314c0..2e95ac8663a 100644--- a/web/app/signin/components/mail-and-password-auth.tsx+++ b/web/app/signin/components/mail-and-password-auth.tsx@@ -1,5 +1,5 @@import type { ResponseError } from '@/service/fetch'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import Link from 'next/link'import { useRouter, useSearchParams } from 'next/navigation'import { useState } from 'react'diff --git a/web/app/signin/invite-settings/page.tsx b/web/app/signin/invite-settings/page.tsxindex e3bbe420bce..c4923959ab6 100644--- a/web/app/signin/invite-settings/page.tsx+++ b/web/app/signin/invite-settings/page.tsx@@ -1,7 +1,7 @@'use client'import type { Locale } from '@/i18n-config'import { RiAccountCircleLine } from '@remixicon/react'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import Link from 'next/link'import { useRouter, useSearchParams } from 'next/navigation'import { useCallback, useState } from 'react'diff --git a/web/app/signup/components/input-mail.tsx b/web/app/signup/components/input-mail.tsxindex b001e1f8b01..26ac99d2c68 100644--- a/web/app/signup/components/input-mail.tsx+++ b/web/app/signup/components/input-mail.tsx@@ -1,6 +1,6 @@'use client'import type { MailSendResponse } from '@/service/use-common'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import Link from 'next/link'import { useCallback, useState } from 'react'import { useTranslation } from 'react-i18next'diff --git a/web/context/app-context.tsx b/web/context/app-context.tsxindex b7a47048f31..cb4cab65b77 100644--- a/web/context/app-context.tsx+++ b/web/context/app-context.tsx@@ -3,7 +3,7 @@import type { FC, ReactNode } from 'react'import type { ICurrentWorkspace, LangGeniusVersionResponse, UserProfileResponse } from '@/models/common'import { useQueryClient } from '@tanstack/react-query'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useCallback, useEffect, useMemo } from 'react'import { createContext, useContext, useContextSelector } from 'use-context-selector'import { setUserId, setUserProperties } from '@/app/components/base/amplitude'diff --git a/web/context/datasets-context.tsx b/web/context/datasets-context.tsxindex 4ca7ad311e4..f35767bc215 100644--- a/web/context/datasets-context.tsx+++ b/web/context/datasets-context.tsx@@ -1,7 +1,7 @@'use client'import type { DataSet } from '@/models/datasets'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { createContext, useContext } from 'use-context-selector'export type DatasetsContextValue = {diff --git a/web/context/debug-configuration.ts b/web/context/debug-configuration.tsindex 51ba4ab6264..2518af62600 100644--- a/web/context/debug-configuration.ts+++ b/web/context/debug-configuration.ts@@ -22,7 +22,7 @@ import type {TextToSpeechConfig,} from '@/models/debug'import type { VisionSettings } from '@/types/app'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { createContext, useContext } from 'use-context-selector'import { ANNOTATION_DEFAULT, DEFAULT_AGENT_SETTING, DEFAULT_CHAT_PROMPT_CONFIG, DEFAULT_COMPLETION_PROMPT_CONFIG } from '@/config'import { PromptMode } from '@/models/debug'diff --git a/web/context/explore-context.ts b/web/context/explore-context.tsindex 688b9036f9e..1a7b35a09b1 100644--- a/web/context/explore-context.ts+++ b/web/context/explore-context.ts@@ -1,5 +1,5 @@import type { InstalledApp } from '@/models/explore'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { createContext } from 'use-context-selector'type IExplore = {diff --git a/web/context/i18n.ts b/web/context/i18n.tsindex 773569fa21e..92d66a1b2fb 100644--- a/web/context/i18n.ts+++ b/web/context/i18n.ts@@ -1,5 +1,5 @@import type { Locale } from '@/i18n-config'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import {createContext,useContext,diff --git a/web/context/mitt-context.tsx b/web/context/mitt-context.tsxindex 6c6209b5a5e..0fc160613a2 100644--- a/web/context/mitt-context.tsx+++ b/web/context/mitt-context.tsx@@ -1,4 +1,4 @@-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { createContext, useContext, useContextSelector } from 'use-context-selector'import { useMitt } from '@/hooks/use-mitt'diff --git a/web/context/modal-context.tsx b/web/context/modal-context.tsxindex 2afd1b7b2f0..5b417a64ffd 100644--- a/web/context/modal-context.tsx+++ b/web/context/modal-context.tsx@@ -22,7 +22,7 @@ import type {ExternalDataTool,} from '@/models/common'import type { ModerationConfig, PromptVariable } from '@/models/debug'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import dynamic from 'next/dynamic'import { useSearchParams } from 'next/navigation'import { useCallback, useEffect, useState } from 'react'diff --git a/web/context/provider-context.tsx b/web/context/provider-context.tsxindex eb2a034f3b8..3394ea20f6a 100644--- a/web/context/provider-context.tsx+++ b/web/context/provider-context.tsx@@ -5,7 +5,7 @@ import type { Model, ModelProvider } from '@/app/components/header/account-settiimport type { RETRIEVE_METHOD } from '@/types/app'import { useQueryClient } from '@tanstack/react-query'import dayjs from 'dayjs'-import { noop } from 'lodash-es'+import { noop } from 'es-toolkit/compat'import { useEffect, useState } from 'react'import { useTranslation } from 'react-i18next'import { createContext, useContext, useContextSelector } from 'use-context-selector'diff --git a/web/i18n-config/i18next-config.ts b/web/i18n-config/i18next-config.tsindex e82f5f2acb7..8dce79a5e5d 100644--- a/web/i18n-config/i18next-config.ts+++ b/web/i18n-config/i18next-config.ts@@ -1,7 +1,7 @@'use client'import type { Locale } from '.'+import { camelCase, kebabCase } from 'es-toolkit/compat'import i18n from 'i18next'-import { camelCase, kebabCase } from 'lodash-es'import { initReactI18next } from 'react-i18next'import app from '../i18n/en-US/app'diff --git a/web/i18n-config/server.ts b/web/i18n-config/server.tsindex 75a5f3943b3..c92a5a60258 100644--- a/web/i18n-config/server.ts+++ b/web/i18n-config/server.ts@@ -1,9 +1,9 @@import type { Locale } from '.'import type { KeyPrefix, Namespace } from './i18next-config'import { match } from '@formatjs/intl-localematcher'+import { camelCase } from 'es-toolkit/compat'import { createInstance } from 'i18next'import resourcesToBackend from 'i18next-resources-to-backend'-import { camelCase } from 'lodash-es'import Negotiator from 'negotiator'import { cookies, headers } from 'next/headers'import { initReactI18next } from 'react-i18next/initReactI18next'diff --git a/web/package.json b/web/package.jsonindex f3cc0958118..a27ac234ad2 100644--- a/web/package.json+++ b/web/package.json@@ -85,6 +85,7 @@"echarts-for-react": "^3.0.5","elkjs": "^0.9.3","emoji-mart": "^5.6.0",+ "es-toolkit": "^1.43.0","fast-deep-equal": "^3.1.3","html-entities": "^2.6.0","html-to-image": "1.11.13",@@ -100,7 +101,6 @@"lamejs": "^1.2.1","lexical": "^0.38.2","line-clamp": "^1.0.0",- "lodash-es": "^4.17.21","mermaid": "~11.11.0","mime": "^4.1.0","mitt": "^3.0.1",@@ -169,7 +169,6 @@"@testing-library/user-event": "^14.6.1","@types/js-cookie": "^3.0.6","@types/js-yaml": "^4.0.9",- "@types/lodash-es": "^4.17.12","@types/negotiator": "^0.6.4","@types/node": "18.15.0","@types/qs": "^6.14.0",diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yamlindex 24e710534f0..51f421e90bc 100644--- a/web/pnpm-lock.yaml+++ b/web/pnpm-lock.yaml@@ -174,6 +174,9 @@ importers:emoji-mart:specifier: ^5.6.0version: 5.6.0+ es-toolkit:+ specifier: ^1.43.0+ version: 1.43.0fast-deep-equal:specifier: ^3.1.3version: 3.1.3@@ -219,9 +222,6 @@ importers:line-clamp:specifier: ^1.0.0version: 1.0.0- lodash-es:- specifier: ^4.17.21- version: 4.17.21mermaid:specifier: ~11.11.0version: 11.11.0@@ -421,9 +421,6 @@ importers:'@types/js-yaml':specifier: ^4.0.9version: 4.0.9- '@types/lodash-es':- specifier: ^4.17.12- version: 4.17.12'@types/negotiator':specifier: ^0.6.4version: 0.6.4@@ -3575,12 +3572,6 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}- '@types/[email protected]':- resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==}-- '@types/[email protected]':- resolution: {integrity: sha512-FOvQ0YPD5NOfPgMzJihoT+Za5pdkDJWcbpuj1DjaKZIr/gxodQjY/uWEFlTNqW2ugXHUiL8lRQgw63dzKHZdeQ==}-'@types/[email protected]':resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==}@@ -5042,6 +5033,9 @@ packages:resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==}+ resolution: {integrity: sha512-SKCT8AsWvYzBBuUqMk4NPwFlSdqLpJwmy6AP322ERn8W2YLIB6JBXnwMI2Qsh2gfphT3q7EKAxKb23cvFHFwKA==}+resolution: {integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==}@@ -12077,12 +12071,6 @@ snapshots:dependencies:'@types/node': 18.15.0- '@types/[email protected]':- dependencies:- '@types/lodash': 4.17.21-- '@types/[email protected]': {}-'@types/[email protected]':dependencies:'@types/unist': 3.0.3@@ -13685,6 +13673,8 @@ snapshots:+ [email protected]: {}+dependencies:'@types/estree-jsx': 1.0.5diff --git a/web/service/knowledge/use-create-dataset.ts b/web/service/knowledge/use-create-dataset.tsindex eb656c2994d..a0d55eeb99f 100644--- a/web/service/knowledge/use-create-dataset.ts+++ b/web/service/knowledge/use-create-dataset.ts@@ -18,7 +18,7 @@ import type {ProcessRuleResponse,} from '@/models/datasets'import { useMutation } from '@tanstack/react-query'-import groupBy from 'lodash-es/groupBy'+import { groupBy } from 'es-toolkit/compat'import { post } from '../base'import { createDocument, createFirstDocument, fetchDefaultProcessRule, fetchFileIndexingEstimate } from '../datasets'diff --git a/web/service/use-flow.ts b/web/service/use-flow.tsindex 30bec6dd23e..74aa78ec106 100644--- a/web/service/use-flow.ts+++ b/web/service/use-flow.ts@@ -1,5 +1,5 @@import type { FlowType } from '@/types/common'-import { curry } from 'lodash-es'+import { curry } from 'es-toolkit/compat'import {useDeleteAllInspectorVars as useDeleteAllInspectorVarsInner,useDeleteInspectVar as useDeleteInspectVarInner,diff --git a/web/service/use-plugins.ts b/web/service/use-plugins.tsindex 58454125edc..32ea4f35fd2 100644--- a/web/service/use-plugins.ts+++ b/web/service/use-plugins.ts@@ -33,7 +33,7 @@ import {useQuery,useQueryClient,} from '@tanstack/react-query'-import { cloneDeep } from 'lodash-es'+import { cloneDeep } from 'es-toolkit/compat'import { useCallback, useEffect, useState } from 'react'import useRefreshPluginList from '@/app/components/plugins/install-plugin/hooks/use-refresh-plugin-list'import { getFormattedPlugin } from '@/app/components/plugins/marketplace/utils'diff --git a/web/utils/index.ts b/web/utils/index.tsindex 263d4154795..ebb8b906454 100644--- a/web/utils/index.ts+++ b/web/utils/index.ts@@ -1,4 +1,4 @@-import { escape } from 'lodash-es'+import { escape } from 'es-toolkit/compat'export const sleep = (ms: number) => {return new Promise(resolve => setTimeout(resolve, ms))