mirror of
https://github.com/langgenius/dify.git
synced 2026-04-21 15:28:42 +08:00
The frontend and backend implementation for the human input node. Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com> Co-authored-by: zhsama <torvalds@linux.do>
28 lines
575 B
TypeScript
28 lines
575 B
TypeScript
'use client'
|
|
import type { FC } from 'react'
|
|
import type { FormInputItem } from '../types'
|
|
import * as React from 'react'
|
|
import InputField from '@/app/components/base/prompt-editor/plugins/hitl-input-block/input-field'
|
|
|
|
type Props = {
|
|
nodeId: string
|
|
onSave: (newPayload: FormInputItem) => void
|
|
onCancel: () => void
|
|
}
|
|
|
|
const AddInputField: FC<Props> = ({
|
|
nodeId,
|
|
onSave,
|
|
onCancel,
|
|
}) => {
|
|
return (
|
|
<InputField
|
|
nodeId={nodeId}
|
|
isEdit={false}
|
|
onChange={onSave}
|
|
onCancel={onCancel}
|
|
/>
|
|
)
|
|
}
|
|
export default React.memo(AddInputField)
|