mirror of https://github.com/langgenius/dify.git
refactor(human-input): reorganize hooks and improve structure for better maintainability
This commit is contained in:
parent
d308c34842
commit
c0a4f3b715
|
|
@ -15,7 +15,7 @@ import useVariableAssignerSingleRunFormParams from '@/app/components/workflow/no
|
|||
import useCodeSingleRunFormParams from '@/app/components/workflow/nodes/code/use-single-run-form-params'
|
||||
import useDocExtractorSingleRunFormParams from '@/app/components/workflow/nodes/document-extractor/use-single-run-form-params'
|
||||
import useHttpRequestSingleRunFormParams from '@/app/components/workflow/nodes/http/use-single-run-form-params'
|
||||
import useHumanInputSingleRunFormParams from '@/app/components/workflow/nodes/human-input/use-single-run-form-params'
|
||||
import useHumanInputSingleRunFormParams from '@/app/components/workflow/nodes/human-input/hooks/use-single-run-form-params'
|
||||
import useIfElseSingleRunFormParams from '@/app/components/workflow/nodes/if-else/use-single-run-form-params'
|
||||
import useIterationSingleRunFormParams from '@/app/components/workflow/nodes/iteration/use-single-run-form-params'
|
||||
import useKnowledgeBaseSingleRunFormParams from '@/app/components/workflow/nodes/knowledge-base/use-single-run-form-params'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { DeliveryMethod, HumanInputNodeType, UserAction } from './types'
|
||||
import type { DeliveryMethod, HumanInputNodeType, UserAction } from '../types'
|
||||
import { produce } from 'immer'
|
||||
import { useState } from 'react'
|
||||
import {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import type { FormInputItem, HumanInputNodeType } from './types'
|
||||
import type { FormInputItem, HumanInputNodeType } from '../types'
|
||||
import { produce } from 'immer'
|
||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import useNodeCrud from '../_base/hooks/use-node-crud'
|
||||
import useNodeCrud from '../../_base/hooks/use-node-crud'
|
||||
|
||||
const useFormContent = (id: string, payload: HumanInputNodeType) => {
|
||||
const [editorKey, setEditorKey] = useState(0)
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import type { HumanInputNodeType } from './types'
|
||||
import type { HumanInputNodeType } from '../types'
|
||||
import type { Props as FormProps } from '@/app/components/workflow/nodes/_base/components/before-run-form/form'
|
||||
import type { InputVar } from '@/app/components/workflow/types'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import useNodeCrud from '../_base/hooks/use-node-crud'
|
||||
import { isOutput } from './utils'
|
||||
import useNodeCrud from '../../_base/hooks/use-node-crud'
|
||||
import { isOutput } from '../utils'
|
||||
|
||||
const i18nPrefix = 'workflow.nodes.humanInput'
|
||||
|
||||
|
|
@ -28,8 +28,8 @@ import FormContent from './components/form-content'
|
|||
import FormContentPreview from './components/form-content-preview'
|
||||
import TimeoutInput from './components/timeout'
|
||||
import UserActionItem from './components/user-action'
|
||||
import useConfig from './hooks/use-config'
|
||||
import { UserActionButtonType } from './types'
|
||||
import useConfig from './use-config'
|
||||
import { genActionId } from './utils'
|
||||
|
||||
const i18nPrefix = 'workflow.nodes.humanInput'
|
||||
|
|
|
|||
Loading…
Reference in New Issue