mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
chore: lint require and how to import react (#30041)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import type { QAChunk } from './types'
|
||||
import type { ParentMode } from '@/models/datasets'
|
||||
import React, { useMemo } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useMemo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Dot from '@/app/components/datasets/documents/detail/completed/common/dot'
|
||||
import SegmentIndexTag from '@/app/components/datasets/documents/detail/completed/common/segment-index-tag'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import { QAItemType } from './types'
|
||||
|
||||
type QAItemProps = {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { useParams } from 'next/navigation'
|
||||
import React, { useCallback, useState } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useCallback, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Button from '@/app/components/base/button'
|
||||
import Confirm from '@/app/components/base/confirm'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { useStore } from '@tanstack/react-form'
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import { withForm } from '@/app/components/base/form'
|
||||
import InputField from '@/app/components/base/form/form-scenarios/input-field/field'
|
||||
import { useHiddenConfigurations } from './hooks'
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import React, { useCallback } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useCallback } from 'react'
|
||||
import { withForm } from '@/app/components/base/form'
|
||||
import InputField from '@/app/components/base/form/form-scenarios/input-field/field'
|
||||
import { useConfigurations } from './hooks'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { RiArrowRightSLine } from '@remixicon/react'
|
||||
import { useStore } from '@tanstack/react-form'
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { withForm } from '@/app/components/base/form'
|
||||
import { useHiddenFieldNames } from './hooks'
|
||||
|
||||
@ -7,7 +7,8 @@ import {
|
||||
RiEditLine,
|
||||
} from '@remixicon/react'
|
||||
import { useHover } from 'ahooks'
|
||||
import React, { useCallback, useRef } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useCallback, useRef } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import ActionButton from '@/app/components/base/action-button'
|
||||
import Badge from '@/app/components/base/badge'
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import type { InputVar } from '@/models/pipeline'
|
||||
import { RiAddLine } from '@remixicon/react'
|
||||
import React, { useCallback } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useCallback } from 'react'
|
||||
import ActionButton from '@/app/components/base/action-button'
|
||||
import RemoveEffectVarConfirm from '@/app/components/workflow/nodes/_base/components/remove-effect-var-confirm'
|
||||
import { cn } from '@/utils/classnames'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { RiDragDropLine } from '@remixicon/react'
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
|
||||
const FooterTip = () => {
|
||||
return (
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { DataSourceNodeType } from '@/app/components/workflow/nodes/data-source/types'
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import BlockIcon from '@/app/components/workflow/block-icon'
|
||||
import { useToolIcon } from '@/app/components/workflow/hooks'
|
||||
import { BlockEnum } from '@/app/components/workflow/types'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Tooltip from '@/app/components/base/tooltip'
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { Datasource } from '../../test-run/types'
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useStore } from '@/app/components/workflow/store'
|
||||
import { useDraftPipelinePreProcessingParams } from '@/service/use-pipeline'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useStore } from '@/app/components/workflow/store'
|
||||
import { useDraftPipelineProcessingParams } from '@/service/use-pipeline'
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { RiCloseLine } from '@remixicon/react'
|
||||
import React, { useCallback } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useCallback } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useWorkflowInteractions } from '@/app/components/workflow/hooks'
|
||||
import { useWorkflowStore } from '@/app/components/workflow/store'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Button from '@/app/components/base/button'
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import type { DataSourceNodeType } from '@/app/components/workflow/nodes/data-source/types'
|
||||
import React, { useCallback } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useCallback } from 'react'
|
||||
import BlockIcon from '@/app/components/workflow/block-icon'
|
||||
import { useToolIcon } from '@/app/components/workflow/hooks'
|
||||
import { BlockEnum } from '@/app/components/workflow/types'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { CustomActionsProps } from '@/app/components/base/form/components/form/actions'
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Button from '@/app/components/base/button'
|
||||
import { useStore } from '@/app/components/workflow/store'
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import type { CustomActionsProps } from '@/app/components/base/form/components/form/actions'
|
||||
import React, { useCallback } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useCallback } from 'react'
|
||||
import { generateZodSchema } from '@/app/components/base/form/form-scenarios/base/utils'
|
||||
import { useConfigurations, useInitialData } from '@/app/components/rag-pipeline/hooks/use-input-fields'
|
||||
import Actions from './actions'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
const FooterTips = () => {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import type { Datasource } from '../types'
|
||||
import React, { useCallback, useMemo, useState } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useCallback, useMemo, useState } from 'react'
|
||||
import { useShallow } from 'zustand/react/shallow'
|
||||
import { trackEvent } from '@/app/components/base/amplitude'
|
||||
import LocalFile from '@/app/components/datasets/documents/create-from-pipeline/data-source/local-file'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import Divider from '@/app/components/base/divider'
|
||||
import { cn } from '@/utils/classnames'
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { RiLoader2Line } from '@remixicon/react'
|
||||
import React, { useMemo } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useMemo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Button from '@/app/components/base/button'
|
||||
import { RAG_PIPELINE_PREVIEW_CHUNK_NUM } from '@/config'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import type { WorkflowRunningData } from '@/app/components/workflow/types'
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Tab from './tab'
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import type { WorkflowRunningData } from '@/app/components/workflow/types'
|
||||
import React, { useCallback } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useCallback } from 'react'
|
||||
import { cn } from '@/utils/classnames'
|
||||
|
||||
type TabProps = {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { RiCloseLine, RiDatabase2Line, RiLoader2Line, RiPlayLargeLine } from '@remixicon/react'
|
||||
import React, { useCallback } from 'react'
|
||||
import * as React from 'react'
|
||||
import { useCallback } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { StopCircle } from '@/app/components/base/icons/src/vender/line/mediaAndDevices'
|
||||
import { useWorkflowRun, useWorkflowStartRun } from '@/app/components/workflow/hooks'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import Image from 'next/image'
|
||||
import React from 'react'
|
||||
import * as React from 'react'
|
||||
import useTheme from '@/hooks/use-theme'
|
||||
import { basePath } from '@/utils/var'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user