mirror of https://github.com/langgenius/dify.git
chore(web): migrate lodash-es to es-toolkit compat (#30126)
This commit is contained in:
parent
fdaeec7f7d
commit
3cbbb06dc4
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Plan, UsagePlanInfo } from '@/app/components/billing/type'
|
import type { Plan, UsagePlanInfo } from '@/app/components/billing/type'
|
||||||
import type { ProviderContextState } from '@/context/provider-context'
|
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'
|
import { defaultPlan } from '@/app/components/billing/config'
|
||||||
|
|
||||||
// Avoid being mocked in tests
|
// Avoid being mocked in tests
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import type { FC } from 'react'
|
||||||
import type { TriggerProps } from '@/app/components/base/date-and-time-picker/types'
|
import type { TriggerProps } from '@/app/components/base/date-and-time-picker/types'
|
||||||
import { RiCalendarLine } from '@remixicon/react'
|
import { RiCalendarLine } from '@remixicon/react'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback } from 'react'
|
import { useCallback } from 'react'
|
||||||
import Picker from '@/app/components/base/date-and-time-picker/date-picker'
|
import Picker from '@/app/components/base/date-and-time-picker/date-picker'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
import { RiArrowLeftLine, RiLockPasswordLine } from '@remixicon/react'
|
import { RiArrowLeftLine, RiLockPasswordLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { useRouter, useSearchParams } from 'next/navigation'
|
import { useRouter, useSearchParams } from 'next/navigation'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useRouter, useSearchParams } from 'next/navigation'
|
import { useRouter, useSearchParams } from 'next/navigation'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
'use client'
|
'use client'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { useRouter, useSearchParams } from 'next/navigation'
|
import { useRouter, useSearchParams } from 'next/navigation'
|
||||||
import { useCallback, useState } from 'react'
|
import { useCallback, useState } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { ResponseError } from '@/service/fetch'
|
import type { ResponseError } from '@/service/fetch'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client'
|
'use client'
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {
|
||||||
RiAddLine,
|
RiAddLine,
|
||||||
RiEditLine,
|
RiEditLine,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ import type { ExternalDataTool } from '@/models/common'
|
||||||
import type { PromptVariable } from '@/models/debug'
|
import type { PromptVariable } from '@/models/debug'
|
||||||
import type { GenRes } from '@/service/debug'
|
import type { GenRes } from '@/service/debug'
|
||||||
import { useBoolean } from 'ahooks'
|
import { useBoolean } from 'ahooks'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { produce } from 'immer'
|
import { produce } from 'immer'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import type { ExternalDataTool } from '@/models/common'
|
import type { ExternalDataTool } from '@/models/common'
|
||||||
import copy from 'copy-to-clipboard'
|
import copy from 'copy-to-clipboard'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useContext } from 'use-context-selector'
|
import { useContext } from 'use-context-selector'
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ vi.mock('../debug/hooks', () => ({
|
||||||
useFormattingChangedDispatcher: vi.fn(() => vi.fn()),
|
useFormattingChangedDispatcher: vi.fn(() => vi.fn()),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
vi.mock('lodash-es', () => ({
|
vi.mock('es-toolkit/compat', () => ({
|
||||||
intersectionBy: vi.fn((...arrays) => {
|
intersectionBy: vi.fn((...arrays) => {
|
||||||
// Mock realistic intersection behavior based on metadata name
|
// Mock realistic intersection behavior based on metadata name
|
||||||
const validArrays = arrays.filter(Array.isArray)
|
const validArrays = arrays.filter(Array.isArray)
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import type {
|
||||||
MetadataFilteringModeEnum,
|
MetadataFilteringModeEnum,
|
||||||
} from '@/app/components/workflow/nodes/knowledge-retrieval/types'
|
} from '@/app/components/workflow/nodes/knowledge-retrieval/types'
|
||||||
import type { DataSet } from '@/models/datasets'
|
import type { DataSet } from '@/models/datasets'
|
||||||
|
import { intersectionBy } from 'es-toolkit/compat'
|
||||||
import { produce } from 'immer'
|
import { produce } from 'immer'
|
||||||
import { intersectionBy } from 'lodash-es'
|
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useMemo } from 'react'
|
import { useCallback, useMemo } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import type { FC } from 'react'
|
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 { ModelConfig } from '@/app/components/workflow/types'
|
||||||
import type {
|
import type {
|
||||||
DataSet,
|
DataSet,
|
||||||
|
|
@ -8,7 +9,6 @@ import type {
|
||||||
import type {
|
import type {
|
||||||
DatasetConfigs,
|
DatasetConfigs,
|
||||||
} from '@/models/debug'
|
} from '@/models/debug'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import { memo, useCallback, useEffect, useMemo } from 'react'
|
import { memo, useCallback, useEffect, useMemo } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Divider from '@/app/components/base/divider'
|
import Divider from '@/app/components/base/divider'
|
||||||
|
|
@ -33,17 +33,20 @@ type Props = {
|
||||||
selectedDatasets?: DataSet[]
|
selectedDatasets?: DataSet[]
|
||||||
isInWorkflow?: boolean
|
isInWorkflow?: boolean
|
||||||
singleRetrievalModelConfig?: ModelConfig
|
singleRetrievalModelConfig?: ModelConfig
|
||||||
onSingleRetrievalModelChange?: (config: ModelConfig) => void
|
onSingleRetrievalModelChange?: ModelParameterModalProps['setModel']
|
||||||
onSingleRetrievalModelParamsChange?: (config: ModelConfig) => void
|
onSingleRetrievalModelParamsChange?: ModelParameterModalProps['onCompletionParamsChange']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const noopModelChange: ModelParameterModalProps['setModel'] = () => {}
|
||||||
|
const noopParamsChange: ModelParameterModalProps['onCompletionParamsChange'] = () => {}
|
||||||
|
|
||||||
const ConfigContent: FC<Props> = ({
|
const ConfigContent: FC<Props> = ({
|
||||||
datasetConfigs,
|
datasetConfigs,
|
||||||
onChange,
|
onChange,
|
||||||
isInWorkflow,
|
isInWorkflow,
|
||||||
singleRetrievalModelConfig: singleRetrievalConfig = {} as ModelConfig,
|
singleRetrievalModelConfig: singleRetrievalConfig = {} as ModelConfig,
|
||||||
onSingleRetrievalModelChange = noop,
|
onSingleRetrievalModelChange = noopModelChange,
|
||||||
onSingleRetrievalModelParamsChange = noop,
|
onSingleRetrievalModelParamsChange = noopParamsChange,
|
||||||
selectedDatasets = [],
|
selectedDatasets = [],
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { memo } from 'react'
|
import { memo } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Slider from '@/app/components/base/slider'
|
import Slider from '@/app/components/base/slider'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import type { Member } from '@/models/common'
|
||||||
import type { DataSet } from '@/models/datasets'
|
import type { DataSet } from '@/models/datasets'
|
||||||
import type { RetrievalConfig } from '@/types/app'
|
import type { RetrievalConfig } from '@/types/app'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { isEqual } from 'lodash-es'
|
import { isEqual } from 'es-toolkit/compat'
|
||||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Button from '@/app/components/base/button'
|
import Button from '@/app/components/base/button'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import type { ModelAndParameter } from '../types'
|
import type { ModelAndParameter } from '../types'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { createContext, useContext } from 'use-context-selector'
|
import { createContext, useContext } from 'use-context-selector'
|
||||||
|
|
||||||
export type DebugWithMultipleModelContextType = {
|
export type DebugWithMultipleModelContextType = {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import type {
|
||||||
OnSend,
|
OnSend,
|
||||||
TextGenerationConfig,
|
TextGenerationConfig,
|
||||||
} from '@/app/components/base/text-generation/types'
|
} 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 { memo } from 'react'
|
||||||
import TextGeneration from '@/app/components/app/text-generate/item'
|
import TextGeneration from '@/app/components/app/text-generate/item'
|
||||||
import { TransferMethod } from '@/app/components/base/chat/types'
|
import { TransferMethod } from '@/app/components/base/chat/types'
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import type {
|
||||||
ChatConfig,
|
ChatConfig,
|
||||||
ChatItem,
|
ChatItem,
|
||||||
} from '@/app/components/base/chat/types'
|
} from '@/app/components/base/chat/types'
|
||||||
import cloneDeep from 'lodash-es/cloneDeep'
|
import { cloneDeep } from 'es-toolkit/compat'
|
||||||
import {
|
import {
|
||||||
useCallback,
|
useCallback,
|
||||||
useRef,
|
useRef,
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,8 @@ import {
|
||||||
RiSparklingFill,
|
RiSparklingFill,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { useBoolean } from 'ahooks'
|
import { useBoolean } from 'ahooks'
|
||||||
|
import { cloneDeep, noop } from 'es-toolkit/compat'
|
||||||
import { produce, setAutoFreeze } from 'immer'
|
import { produce, setAutoFreeze } from 'immer'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import cloneDeep from 'lodash-es/cloneDeep'
|
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { FormValue } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
import type { FormValue } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
||||||
import type { ChatPromptConfig, CompletionPromptConfig, ConversationHistoriesRole, PromptItem } from '@/models/debug'
|
import type { ChatPromptConfig, CompletionPromptConfig, ConversationHistoriesRole, PromptItem } from '@/models/debug'
|
||||||
|
import { clone } from 'es-toolkit/compat'
|
||||||
import { produce } from 'immer'
|
import { produce } from 'immer'
|
||||||
import { clone } from 'lodash-es'
|
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { checkHasContextBlock, checkHasHistoryBlock, checkHasQueryBlock, PRE_PROMPT_PLACEHOLDER_TEXT } from '@/app/components/base/prompt-editor/constants'
|
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'
|
import { DEFAULT_CHAT_PROMPT_CONFIG, DEFAULT_COMPLETION_PROMPT_CONFIG } from '@/config'
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ import type {
|
||||||
import type { ModelConfig as BackendModelConfig, UserInputFormItem, VisionSettings } from '@/types/app'
|
import type { ModelConfig as BackendModelConfig, UserInputFormItem, VisionSettings } from '@/types/app'
|
||||||
import { CodeBracketIcon } from '@heroicons/react/20/solid'
|
import { CodeBracketIcon } from '@heroicons/react/20/solid'
|
||||||
import { useBoolean, useGetState } from 'ahooks'
|
import { useBoolean, useGetState } from 'ahooks'
|
||||||
|
import { clone, isEqual } from 'es-toolkit/compat'
|
||||||
import { produce } from 'immer'
|
import { produce } from 'immer'
|
||||||
import { clone, isEqual } from 'lodash-es'
|
|
||||||
import { usePathname } from 'next/navigation'
|
import { usePathname } from 'next/navigation'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import type {
|
||||||
CodeBasedExtensionItem,
|
CodeBasedExtensionItem,
|
||||||
ExternalDataTool,
|
ExternalDataTool,
|
||||||
} from '@/models/common'
|
} from '@/models/common'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useContext } from 'use-context-selector'
|
import { useContext } from 'use-context-selector'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import type { MouseEventHandler } from 'react'
|
import type { MouseEventHandler } from 'react'
|
||||||
import { RiCloseLine, RiCommandLine, RiCornerDownLeftLine } from '@remixicon/react'
|
import { RiCloseLine, RiCommandLine, RiCornerDownLeftLine } from '@remixicon/react'
|
||||||
import { useDebounceFn, useKeyPress } from 'ahooks'
|
import { useDebounceFn, useKeyPress } from 'ahooks'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client'
|
'use client'
|
||||||
import type { AppIconType } from '@/types/app'
|
import type { AppIconType } from '@/types/app'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import type { FC } from 'react'
|
||||||
import type { App } from '@/types/app'
|
import type { App } from '@/types/app'
|
||||||
import { useDebounce } from 'ahooks'
|
import { useDebounce } from 'ahooks'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { omit } from 'lodash-es'
|
import { omit } from 'es-toolkit/compat'
|
||||||
import { usePathname, useRouter, useSearchParams } from 'next/navigation'
|
import { usePathname, useRouter, useSearchParams } from 'next/navigation'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useEffect, useState } from 'react'
|
import { useCallback, useEffect, useState } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import { RiCloseLine, RiEditFill } from '@remixicon/react'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import timezone from 'dayjs/plugin/timezone'
|
import timezone from 'dayjs/plugin/timezone'
|
||||||
import utc from 'dayjs/plugin/utc'
|
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 { usePathname, useRouter, useSearchParams } from 'next/navigation'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import type { RenderOptions } from '@testing-library/react'
|
||||||
import type { Mock, MockedFunction } from 'vitest'
|
import type { Mock, MockedFunction } from 'vitest'
|
||||||
import type { ModalContextState } from '@/context/modal-context'
|
import type { ModalContextState } from '@/context/modal-context'
|
||||||
import { fireEvent, render } from '@testing-library/react'
|
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 { defaultPlan } from '@/app/components/billing/config'
|
||||||
import { useModalContext as actualUseModalContext } from '@/context/modal-context'
|
import { useModalContext as actualUseModalContext } from '@/context/modal-context'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import type { AppDailyConversationsResponse, AppDailyEndUsersResponse, AppDailyM
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import Decimal from 'decimal.js'
|
import Decimal from 'decimal.js'
|
||||||
import ReactECharts from 'echarts-for-react'
|
import ReactECharts from 'echarts-for-react'
|
||||||
import { get } from 'lodash-es'
|
import { get } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Basic from '@/app/components/app-sidebar/basic'
|
import Basic from '@/app/components/app-sidebar/basic'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import type { App } from '@/types/app'
|
import type { App } from '@/types/app'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { useDebounce } from 'ahooks'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import timezone from 'dayjs/plugin/timezone'
|
import timezone from 'dayjs/plugin/timezone'
|
||||||
import utc from 'dayjs/plugin/utc'
|
import utc from 'dayjs/plugin/utc'
|
||||||
import { omit } from 'lodash-es'
|
import { omit } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import type { IChatItem } from '@/app/components/base/chat/chat/type'
|
import type { IChatItem } from '@/app/components/base/chat/chat/type'
|
||||||
import type { AgentIteration, AgentLogDetailResponse } from '@/models/log'
|
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 * as React from 'react'
|
||||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import type { Area } from 'react-easy-crop'
|
||||||
import type { OnImageInput } from './ImageInput'
|
import type { OnImageInput } from './ImageInput'
|
||||||
import type { AppIconType, ImageFile } from '@/types/app'
|
import type { AppIconType, ImageFile } from '@/types/app'
|
||||||
import { RiImageCircleAiLine } from '@remixicon/react'
|
import { RiImageCircleAiLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useCallback, useState } from 'react'
|
import { useCallback, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { DISABLE_UPLOAD_IMAGE_AS_ICON } from '@/config'
|
import { DISABLE_UPLOAD_IMAGE_AS_ICON } from '@/config'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import type { ChatItemInTree } from '../types'
|
import type { ChatItemInTree } from '../types'
|
||||||
import { get } from 'lodash-es'
|
import { get } from 'es-toolkit/compat'
|
||||||
import { buildChatItemTree, getThreadMessages } from '../utils'
|
import { buildChatItemTree, getThreadMessages } from '../utils'
|
||||||
import branchedTestMessages from './branchedTestMessages.json'
|
import branchedTestMessages from './branchedTestMessages.json'
|
||||||
import legacyTestMessages from './legacyTestMessages.json'
|
import legacyTestMessages from './legacyTestMessages.json'
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import type {
|
||||||
AppMeta,
|
AppMeta,
|
||||||
ConversationItem,
|
ConversationItem,
|
||||||
} from '@/models/share'
|
} from '@/models/share'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { createContext, useContext } from 'use-context-selector'
|
import { createContext, useContext } from 'use-context-selector'
|
||||||
|
|
||||||
export type ChatWithHistoryContextValue = {
|
export type ChatWithHistoryContextValue = {
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ import type {
|
||||||
ConversationItem,
|
ConversationItem,
|
||||||
} from '@/models/share'
|
} from '@/models/share'
|
||||||
import { useLocalStorageState } from 'ahooks'
|
import { useLocalStorageState } from 'ahooks'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { produce } from 'immer'
|
import { produce } from 'immer'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import {
|
import {
|
||||||
useCallback,
|
useCallback,
|
||||||
useEffect,
|
useEffect,
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import type { InputForm } from './type'
|
||||||
import type AudioPlayer from '@/app/components/base/audio-btn/audio'
|
import type AudioPlayer from '@/app/components/base/audio-btn/audio'
|
||||||
import type { FileEntity } from '@/app/components/base/file-uploader/types'
|
import type { FileEntity } from '@/app/components/base/file-uploader/types'
|
||||||
import type { Annotation } from '@/models/log'
|
import type { Annotation } from '@/models/log'
|
||||||
|
import { noop, uniqBy } from 'es-toolkit/compat'
|
||||||
import { produce, setAutoFreeze } from 'immer'
|
import { produce, setAutoFreeze } from 'immer'
|
||||||
import { noop, uniqBy } from 'lodash-es'
|
|
||||||
import { useParams, usePathname } from 'next/navigation'
|
import { useParams, usePathname } from 'next/navigation'
|
||||||
import {
|
import {
|
||||||
useCallback,
|
useCallback,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import type {
|
||||||
import type { InputForm } from './type'
|
import type { InputForm } from './type'
|
||||||
import type { Emoji } from '@/app/components/tools/types'
|
import type { Emoji } from '@/app/components/tools/types'
|
||||||
import type { AppData } from '@/models/share'
|
import type { AppData } from '@/models/share'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'es-toolkit/compat'
|
||||||
import {
|
import {
|
||||||
memo,
|
memo,
|
||||||
useCallback,
|
useCallback,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import type {
|
||||||
AppMeta,
|
AppMeta,
|
||||||
ConversationItem,
|
ConversationItem,
|
||||||
} from '@/models/share'
|
} from '@/models/share'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { createContext, useContext } from 'use-context-selector'
|
import { createContext, useContext } from 'use-context-selector'
|
||||||
|
|
||||||
export type EmbeddedChatbotContextValue = {
|
export type EmbeddedChatbotContextValue = {
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import type {
|
||||||
ConversationItem,
|
ConversationItem,
|
||||||
} from '@/models/share'
|
} from '@/models/share'
|
||||||
import { useLocalStorageState } from 'ahooks'
|
import { useLocalStorageState } from 'ahooks'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { produce } from 'immer'
|
import { produce } from 'immer'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import {
|
import {
|
||||||
useCallback,
|
useCallback,
|
||||||
useEffect,
|
useEffect,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {
|
||||||
RiClipboardLine,
|
RiClipboardLine,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import copy from 'copy-to-clipboard'
|
import copy from 'copy-to-clipboard'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
import copy from 'copy-to-clipboard'
|
import copy from 'copy-to-clipboard'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useState } from 'react'
|
import { useCallback, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ import type { InputVar } from '@/app/components/workflow/types'
|
||||||
import type { PromptVariable } from '@/models/debug'
|
import type { PromptVariable } from '@/models/debug'
|
||||||
import { RiAddLine, RiAsterisk, RiCloseLine, RiDeleteBinLine, RiDraggable } from '@remixicon/react'
|
import { RiAddLine, RiAsterisk, RiCloseLine, RiDeleteBinLine, RiDraggable } from '@remixicon/react'
|
||||||
import { useBoolean } from 'ahooks'
|
import { useBoolean } from 'ahooks'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { produce } from 'immer'
|
import { produce } from 'immer'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import type { ChangeEvent, FC } from 'react'
|
||||||
import type { CodeBasedExtensionItem } from '@/models/common'
|
import type { CodeBasedExtensionItem } from '@/models/common'
|
||||||
import type { ModerationConfig, ModerationContentConfig } from '@/models/debug'
|
import type { ModerationConfig, ModerationContentConfig } from '@/models/debug'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useContext } from 'use-context-selector'
|
import { useContext } from 'use-context-selector'
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ import type { ClipboardEvent } from 'react'
|
||||||
import type { FileEntity } from './types'
|
import type { FileEntity } from './types'
|
||||||
import type { FileUpload } from '@/app/components/base/features/types'
|
import type { FileUpload } from '@/app/components/base/features/types'
|
||||||
import type { FileUploadConfigResponse } from '@/models/common'
|
import type { FileUploadConfigResponse } from '@/models/common'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { produce } from 'immer'
|
import { produce } from 'immer'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import { useParams } from 'next/navigation'
|
import { useParams } from 'next/navigation'
|
||||||
import {
|
import {
|
||||||
useCallback,
|
useCallback,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import { RiCloseLine, RiZoomInLine, RiZoomOutLine } from '@remixicon/react'
|
import { RiCloseLine, RiZoomInLine, RiZoomOutLine } from '@remixicon/react'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { t } from 'i18next'
|
import { t } from 'i18next'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { createPortal } from 'react-dom'
|
import { createPortal } from 'react-dom'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type {
|
import type {
|
||||||
FileEntity,
|
FileEntity,
|
||||||
} from './types'
|
} from './types'
|
||||||
import { isEqual } from 'lodash-es'
|
import { isEqual } from 'es-toolkit/compat'
|
||||||
import {
|
import {
|
||||||
createContext,
|
createContext,
|
||||||
useContext,
|
useContext,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react'
|
import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react'
|
||||||
import { RiCloseLargeLine } from '@remixicon/react'
|
import { RiCloseLargeLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
|
|
||||||
type IModal = {
|
type IModal = {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { access, appendFile, mkdir, open, readdir, rm, writeFile } from 'node:fs
|
||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
import { fileURLToPath } from 'node:url'
|
import { fileURLToPath } from 'node:url'
|
||||||
import { parseXml } from '@rgrove/parse-xml'
|
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))
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import { RiAddBoxLine, RiCloseLine, RiDownloadCloud2Line, RiFileCopyLine, RiZoomInLine, RiZoomOutLine } from '@remixicon/react'
|
import { RiAddBoxLine, RiCloseLine, RiDownloadCloud2Line, RiFileCopyLine, RiZoomInLine, RiZoomOutLine } from '@remixicon/react'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { t } from 'i18next'
|
import { t } from 'i18next'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||||
import { createPortal } from 'react-dom'
|
import { createPortal } from 'react-dom'
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ vi.mock('react-i18next', () => ({
|
||||||
}),
|
}),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// Mock lodash-es debounce
|
// Mock es-toolkit/compat debounce
|
||||||
vi.mock('lodash-es', () => ({
|
vi.mock('es-toolkit/compat', () => ({
|
||||||
debounce: (fn: any) => fn,
|
debounce: (fn: any) => fn,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import type { InputProps } from '../input'
|
import type { InputProps } from '../input'
|
||||||
import { RiClipboardFill, RiClipboardLine } from '@remixicon/react'
|
import { RiClipboardFill, RiClipboardLine } from '@remixicon/react'
|
||||||
import copy from 'copy-to-clipboard'
|
import copy from 'copy-to-clipboard'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import type { VariantProps } from 'class-variance-authority'
|
||||||
import type { ChangeEventHandler, CSSProperties, FocusEventHandler } from 'react'
|
import type { ChangeEventHandler, CSSProperties, FocusEventHandler } from 'react'
|
||||||
import { RiCloseCircleFill, RiErrorWarningLine, RiSearchLine } from '@remixicon/react'
|
import { RiCloseCircleFill, RiErrorWarningLine, RiSearchLine } from '@remixicon/react'
|
||||||
import { cva } from 'class-variance-authority'
|
import { cva } from 'class-variance-authority'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import type { ReactMarkdownWrapperProps, SimplePluginInfo } from './react-markdown-wrapper'
|
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 dynamic from 'next/dynamic'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
import { preprocessLaTeX, preprocessThinkTag } from './markdown-utils'
|
import { preprocessLaTeX, preprocessThinkTag } from './markdown-utils'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* These functions were extracted from the main markdown renderer for better separation of concerns.
|
* These functions were extracted from the main markdown renderer for better separation of concerns.
|
||||||
* Includes preprocessing for LaTeX and custom "think" tags.
|
* 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'
|
import { ALLOW_UNSAFE_DATA_SCHEME } from '@/config'
|
||||||
|
|
||||||
export const preprocessLaTeX = (content: string) => {
|
export const preprocessLaTeX = (content: string) => {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react'
|
import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { Fragment } from 'react'
|
import { Fragment } from 'react'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
// https://headlessui.com/react/dialog
|
// https://headlessui.com/react/dialog
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { ButtonProps } from '@/app/components/base/button'
|
import type { ButtonProps } from '@/app/components/base/button'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { memo } from 'react'
|
import { memo } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Button from '@/app/components/base/button'
|
import Button from '@/app/components/base/button'
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import type {
|
||||||
IPaginationProps,
|
IPaginationProps,
|
||||||
PageButtonProps,
|
PageButtonProps,
|
||||||
} from './type'
|
} from './type'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
import usePagination from './hook'
|
import usePagination from './hook'
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import type { ContextBlockType } from '../../types'
|
import type { ContextBlockType } from '../../types'
|
||||||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
||||||
import { mergeRegister } from '@lexical/utils'
|
import { mergeRegister } from '@lexical/utils'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { $applyNodeReplacement } from 'lexical'
|
import { $applyNodeReplacement } from 'lexical'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import {
|
import {
|
||||||
memo,
|
memo,
|
||||||
useCallback,
|
useCallback,
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import type { ContextBlockType } from '../../types'
|
import type { ContextBlockType } from '../../types'
|
||||||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
||||||
import { mergeRegister } from '@lexical/utils'
|
import { mergeRegister } from '@lexical/utils'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import {
|
import {
|
||||||
$insertNodes,
|
$insertNodes,
|
||||||
COMMAND_PRIORITY_EDITOR,
|
COMMAND_PRIORITY_EDITOR,
|
||||||
createCommand,
|
createCommand,
|
||||||
} from 'lexical'
|
} from 'lexical'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import {
|
import {
|
||||||
memo,
|
memo,
|
||||||
useEffect,
|
useEffect,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import type { HistoryBlockType } from '../../types'
|
import type { HistoryBlockType } from '../../types'
|
||||||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
||||||
import { mergeRegister } from '@lexical/utils'
|
import { mergeRegister } from '@lexical/utils'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { $applyNodeReplacement } from 'lexical'
|
import { $applyNodeReplacement } from 'lexical'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import {
|
import {
|
||||||
useCallback,
|
useCallback,
|
||||||
useEffect,
|
useEffect,
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import type { HistoryBlockType } from '../../types'
|
import type { HistoryBlockType } from '../../types'
|
||||||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
||||||
import { mergeRegister } from '@lexical/utils'
|
import { mergeRegister } from '@lexical/utils'
|
||||||
|
import { noop } from 'es-toolkit/compat'
|
||||||
import {
|
import {
|
||||||
$insertNodes,
|
$insertNodes,
|
||||||
COMMAND_PRIORITY_EDITOR,
|
COMMAND_PRIORITY_EDITOR,
|
||||||
createCommand,
|
createCommand,
|
||||||
} from 'lexical'
|
} from 'lexical'
|
||||||
import { noop } from 'lodash-es'
|
|
||||||
import {
|
import {
|
||||||
memo,
|
memo,
|
||||||
useEffect,
|
useEffect,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import type { HtmlContentProps } from '@/app/components/base/popover'
|
||||||
import type { Tag } from '@/app/components/base/tag-management/constant'
|
import type { Tag } from '@/app/components/base/tag-management/constant'
|
||||||
import { RiAddLine, RiPriceTag3Line } from '@remixicon/react'
|
import { RiAddLine, RiPriceTag3Line } from '@remixicon/react'
|
||||||
import { useUnmount } from 'ahooks'
|
import { useUnmount } from 'ahooks'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useMemo, useState } from 'react'
|
import { useMemo, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import type { Tag } from '@/app/components/base/tag-management/constant'
|
import type { Tag } from '@/app/components/base/tag-management/constant'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Button from '@/app/components/base/button'
|
import Button from '@/app/components/base/button'
|
||||||
import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'
|
import { AlertTriangle } from '@/app/components/base/icons/src/vender/solid/alertsAndFeedback'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { ReactNode } from 'react'
|
import type { ReactNode } from 'react'
|
||||||
import { act, render, screen, waitFor } from '@testing-library/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 * as React from 'react'
|
||||||
import Toast, { ToastProvider, useToastContext } from '.'
|
import Toast, { ToastProvider, useToastContext } from '.'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import {
|
||||||
RiErrorWarningFill,
|
RiErrorWarningFill,
|
||||||
RiInformation2Fill,
|
RiInformation2Fill,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { createRoot } from 'react-dom/client'
|
import { createRoot } from 'react-dom/client'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { render, screen } from '@testing-library/react'
|
import { render, screen } from '@testing-library/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
import withValidation from '.'
|
import withValidation from '.'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client'
|
'use client'
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import type { IndexingStatusResponse } from '@/models/datasets'
|
import type { IndexingStatusResponse } from '@/models/datasets'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useEffect, useReducer } from 'react'
|
import { useEffect, useReducer } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
import { useDebounceFn, useKeyPress } from 'ahooks'
|
import { useDebounceFn, useKeyPress } from 'ahooks'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import { useMemo, useRef, useState } from 'react'
|
import { useMemo, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
RiArrowLeftLine,
|
RiArrowLeftLine,
|
||||||
RiSearchEyeLine,
|
RiSearchEyeLine,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import type { ChunkingMode, FileItem } from '@/models/datasets'
|
import type { ChunkingMode, FileItem } from '@/models/datasets'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
import Drawer from './drawer'
|
import Drawer from './drawer'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import { RiLoader2Line } from '@remixicon/react'
|
import { RiLoader2Line } from '@remixicon/react'
|
||||||
import { useCountDown } from 'ahooks'
|
import { useCountDown } from 'ahooks'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useRef, useState } from 'react'
|
import { useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -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 { FileEntity } from '@/app/components/datasets/common/image-uploader/types'
|
||||||
import type { ChildChunkDetail, SegmentDetailModel, SegmentUpdater } from '@/models/datasets'
|
import type { ChildChunkDetail, SegmentDetailModel, SegmentUpdater } from '@/models/datasets'
|
||||||
import { useDebounceFn } from 'ahooks'
|
import { useDebounceFn } from 'ahooks'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { usePathname } from 'next/navigation'
|
import { usePathname } from 'next/navigation'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import type { inputType, metadataType } from '@/hooks/use-metadata'
|
||||||
import type { CommonResponse } from '@/models/common'
|
import type { CommonResponse } from '@/models/common'
|
||||||
import type { DocType, FullDocumentDetail } from '@/models/datasets'
|
import type { DocType, FullDocumentDetail } from '@/models/datasets'
|
||||||
import { PencilIcon } from '@heroicons/react/24/outline'
|
import { PencilIcon } from '@heroicons/react/24/outline'
|
||||||
import { get } from 'lodash-es'
|
import { get } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { NotionPage } from '@/models/common'
|
import type { NotionPage } from '@/models/common'
|
||||||
import type { CrawlResultItem, CustomFile, FileIndexingEstimateResponse } from '@/models/datasets'
|
import type { CrawlResultItem, CustomFile, FileIndexingEstimateResponse } from '@/models/datasets'
|
||||||
import type { OnlineDriveFile, PublishedPipelineRunPreviewResponse } from '@/models/pipeline'
|
import type { OnlineDriveFile, PublishedPipelineRunPreviewResponse } from '@/models/pipeline'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import { useCallback, useMemo, useRef, useState } from 'react'
|
import { useCallback, useMemo, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {
|
||||||
RiGlobalLine,
|
RiGlobalLine,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { useBoolean } from 'ahooks'
|
import { useBoolean } from 'ahooks'
|
||||||
import { pick, uniq } from 'lodash-es'
|
import { pick, uniq } from 'es-toolkit/compat'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useEffect, useMemo, useState } from 'react'
|
import { useCallback, useEffect, useMemo, useState } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import {
|
||||||
RiPlayCircleLine,
|
RiPlayCircleLine,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { useBoolean, useDebounceFn } from 'ahooks'
|
import { useBoolean, useDebounceFn } from 'ahooks'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useState } from 'react'
|
import { useCallback, useState } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { BuiltInMetadataItem, MetadataItemWithValue } from '../types'
|
import type { BuiltInMetadataItem, MetadataItemWithValue } from '../types'
|
||||||
import type { FullDocumentDetail } from '@/models/datasets'
|
import type { FullDocumentDetail } from '@/models/datasets'
|
||||||
import { get } from 'lodash-es'
|
import { get } from 'es-toolkit/compat'
|
||||||
import { useCallback, useState } from 'react'
|
import { useCallback, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Toast from '@/app/components/base/toast'
|
import Toast from '@/app/components/base/toast'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client'
|
'use client'
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import { RiArrowLeftLine } from '@remixicon/react'
|
import { RiArrowLeftLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useState } from 'react'
|
import { useCallback, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import type { MouseEventHandler } from 'react'
|
||||||
import type { AppIconSelection } from '../../base/app-icon-picker'
|
import type { AppIconSelection } from '../../base/app-icon-picker'
|
||||||
import type { DataSet } from '@/models/datasets'
|
import type { DataSet } from '@/models/datasets'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useCallback, useRef, useState } from 'react'
|
import { useCallback, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Button from '@/app/components/base/button'
|
import Button from '@/app/components/base/button'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import type { AppIconType } from '@/types/app'
|
import type { AppIconType } from '@/types/app'
|
||||||
import { RiCloseLine, RiCommandLine, RiCornerDownLeftLine } from '@remixicon/react'
|
import { RiCloseLine, RiCommandLine, RiCornerDownLeftLine } from '@remixicon/react'
|
||||||
import { useDebounceFn, useKeyPress } from 'ahooks'
|
import { useDebounceFn, useKeyPress } from 'ahooks'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useState } from 'react'
|
import { useCallback, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import type { ApiBasedExtension } from '@/models/common'
|
import type { ApiBasedExtension } from '@/models/common'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Button from '@/app/components/base/button'
|
import Button from '@/app/components/base/button'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client'
|
'use client'
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import type { DataSourceNotion as TDataSourceNotion } from '@/models/common'
|
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 * as React from 'react'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import type { FC } from 'react'
|
||||||
import {
|
import {
|
||||||
RiDeleteBinLine,
|
RiDeleteBinLine,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
|
|
|
||||||
|
|
@ -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 type { ValidateCallback, ValidatedStatusState, ValidateValue } from './declarations'
|
||||||
import { useDebounceFn } from 'ahooks'
|
import { useDebounceFn } from 'ahooks'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useContext } from 'use-context-selector'
|
import { useContext } from 'use-context-selector'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import type { InvitationResult } from '@/models/common'
|
import type { InvitationResult } from '@/models/common'
|
||||||
import { RiCloseLine, RiErrorWarningFill } from '@remixicon/react'
|
import { RiCloseLine, RiErrorWarningFill } from '@remixicon/react'
|
||||||
import { useBoolean } from 'ahooks'
|
import { useBoolean } from 'ahooks'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useCallback, useEffect, useState } from 'react'
|
import { useCallback, useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { ReactMultiEmail } from 'react-multi-email'
|
import { ReactMultiEmail } from 'react-multi-email'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import type { InvitationResult } from '@/models/common'
|
||||||
import { XMarkIcon } from '@heroicons/react/24/outline'
|
import { XMarkIcon } from '@heroicons/react/24/outline'
|
||||||
import { CheckCircleIcon } from '@heroicons/react/24/solid'
|
import { CheckCircleIcon } from '@heroicons/react/24/solid'
|
||||||
import { RiQuestionLine } from '@remixicon/react'
|
import { RiQuestionLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import { useMemo } from 'react'
|
import { useMemo } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Button from '@/app/components/base/button'
|
import Button from '@/app/components/base/button'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { RiCloseLine } from '@remixicon/react'
|
import { RiCloseLine } from '@remixicon/react'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { Trans, useTranslation } from 'react-i18next'
|
import { Trans, useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { ReactNode } from 'react'
|
import type { ReactNode } from 'react'
|
||||||
import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/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 { Fragment, useCallback, useEffect } from 'react'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import {
|
||||||
RiRobot2Fill,
|
RiRobot2Fill,
|
||||||
RiRobot2Line,
|
RiRobot2Line,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
|
import { flatten } from 'es-toolkit/compat'
|
||||||
import { produce } from 'immer'
|
import { produce } from 'immer'
|
||||||
import { flatten } from 'lodash-es'
|
|
||||||
import { useParams } from 'next/navigation'
|
import { useParams } from 'next/navigation'
|
||||||
import { useCallback, useEffect, useState } from 'react'
|
import { useCallback, useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import type { AppDetailResponse } from '@/models/app'
|
import type { AppDetailResponse } from '@/models/app'
|
||||||
import { Menu, MenuButton, MenuItem, MenuItems, Transition } from '@headlessui/react'
|
import { Menu, MenuButton, MenuItem, MenuItems, Transition } from '@headlessui/react'
|
||||||
import { ChevronDownIcon, PlusIcon } from '@heroicons/react/24/solid'
|
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 { useRouter } from 'next/navigation'
|
||||||
import { Fragment, useState } from 'react'
|
import { Fragment, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import {
|
||||||
RiBook2Fill,
|
RiBook2Fill,
|
||||||
RiBook2Line,
|
RiBook2Line,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { flatten } from 'lodash-es'
|
import { flatten } from 'es-toolkit/compat'
|
||||||
import { useParams, useRouter } from 'next/navigation'
|
import { useParams, useRouter } from 'next/navigation'
|
||||||
import { useCallback, useMemo } from 'react'
|
import { useCallback, useMemo } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import {
|
||||||
RiArrowDownSLine,
|
RiArrowDownSLine,
|
||||||
RiArrowRightSLine,
|
RiArrowRightSLine,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'es-toolkit/compat'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
import { Fragment, useCallback } from 'react'
|
import { Fragment, useCallback } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import { RiAlertFill } from '@remixicon/react'
|
import { RiAlertFill } from '@remixicon/react'
|
||||||
import { camelCase } from 'lodash-es'
|
import { camelCase } from 'es-toolkit/compat'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useMemo } from 'react'
|
import { useMemo } from 'react'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Plugin, PluginDeclaration, PluginManifestInMarket } from '../types'
|
import type { Plugin, PluginDeclaration, PluginManifestInMarket } from '../types'
|
||||||
import type { GitHubUrlInfo } from '@/app/components/plugins/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 => {
|
export const pluginManifestToCardPluginProps = (pluginManifest: PluginDeclaration): Plugin => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import type {
|
||||||
SearchParams,
|
SearchParams,
|
||||||
SearchParamsFromCollection,
|
SearchParamsFromCollection,
|
||||||
} from './types'
|
} from './types'
|
||||||
import { debounce, noop } from 'lodash-es'
|
import { debounce, noop } from 'es-toolkit/compat'
|
||||||
import {
|
import {
|
||||||
useCallback,
|
useCallback,
|
||||||
useEffect,
|
useEffect,
|
||||||
|
|
|
||||||
|
|
@ -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 { TriggerSubscriptionBuilder } from '@/app/components/workflow/block-selector/types'
|
||||||
import type { BuildTriggerSubscriptionPayload } from '@/service/use-triggers'
|
import type { BuildTriggerSubscriptionPayload } from '@/service/use-triggers'
|
||||||
import { RiLoader2Line } from '@remixicon/react'
|
import { RiLoader2Line } from '@remixicon/react'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'es-toolkit/compat'
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue