Merge branch 'feat/hitl-frontend' of https://github.com/langgenius/dify into feat/hitl-frontend

This commit is contained in:
twwu 2026-01-21 11:32:20 +08:00
commit 6e9facd9b5
5 changed files with 14 additions and 16 deletions

View File

@ -20,7 +20,7 @@ const ExecutedAction = ({
i18nKey="nodes.humanInput.userActions.triggered"
ns="workflow"
components={{ strong: <span className="system-xs-medium text-text-secondary"></span> }}
values={{ actionName: executedAction.title }}
values={{ actionName: executedAction.id }}
/>
</div>
</div>

View File

@ -19,7 +19,7 @@ type Props = {
value: RecipientItem[]
list: Member[]
onDelete: (recipient: RecipientItem) => void
onSelect: (value: any) => void
onSelect: (value: string) => void
onAdd: (email: string) => void
disabled?: boolean
}
@ -69,7 +69,7 @@ const EmailInput = ({
setOpen(true)
}
const handleSelect = (value: any) => {
const handleSelect = (value: string) => {
setSearchKey('')
setOpen(false)
onSelect(value)
@ -89,10 +89,13 @@ const EmailInput = ({
return
if (value.some(item => item.email === emailAddress))
return
if (list.some(item => item.email === emailAddress))
onSelect(emailAddress)
else
if (list.some(item => item.email === emailAddress)) {
const item = list.find(item => item.email === emailAddress)!
onSelect(item.id)
}
else {
onAdd(emailAddress)
}
setSearchKey('')
setOpen(false)
}

View File

@ -122,7 +122,7 @@ const EmailSenderModal = ({
return varInputs
}, [availableNodes, config?.body, formContent, nodesOutputVars])
const [inputs, setInputs] = useState<Record<string, any>>({})
const [inputs, setInputs] = useState<Record<string, unknown>>({})
const [collapsed, setCollapsed] = useState(true)
const [sendingEmail, setSendingEmail] = useState(false)
const [done, setDone] = useState(false)
@ -193,7 +193,7 @@ const EmailSenderModal = ({
</div>
)}
</div>
{(onlySpecificUsers || combinedRecipients) && (
{(onlySpecificUsers || combinedRecipients) && !debugEnabled && (
<div className="px-5">
<EmailInput
disabled
@ -267,7 +267,7 @@ const EmailSenderModal = ({
</div>
)}
</div>
{(onlySpecificUsers || combinedRecipients) && (
{(onlySpecificUsers || combinedRecipients) && !debugEnabled && (
<>
<div className="px-5">
<EmailInput

View File

@ -184,7 +184,7 @@ const Panel: FC<NodePanelProps<HumanInputNodeType>> = ({
<div className="space-y-2">
{inputs.user_actions.map((action, index) => (
<UserActionItem
key={index}
key={action.id}
data={action}
onChange={data => handleUserActionChange(index, data)}
onDelete={handleUserActionDelete}

View File

@ -3392,11 +3392,6 @@
"count": 5
}
},
"app/components/workflow/nodes/human-input/components/delivery-method/recipient/email-input.tsx": {
"ts/no-explicit-any": {
"count": 2
}
},
"app/components/workflow/nodes/human-input/components/delivery-method/recipient/member-list.tsx": {
"ts/no-explicit-any": {
"count": 2
@ -3409,7 +3404,7 @@
},
"app/components/workflow/nodes/human-input/components/delivery-method/test-email-sender.tsx": {
"ts/no-explicit-any": {
"count": 3
"count": 2
}
},
"app/components/workflow/nodes/human-input/components/form-content-preview.tsx": {