feat: Human Input Node (#32060)

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>
This commit is contained in:
authored and GitHub committed 2026-02-09 14:57:23 +08:00
1 parent 56e3a55023
commit a1fc280102
474 files changed
+32667 -2050

No files matched your search

+12 -3
View File
@@ -11,8 +11,9 @@ import {
RiAlertFill,
RiArrowRightSLine,
RiCheckboxCircleFill,
RiErrorWarningLine,
RiErrorWarningFill,
RiLoader2Line,
RiPauseCircleFill,
} from '@remixicon/react'
import { useCallback, useEffect, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
@@ -144,7 +145,7 @@ const NodePanel: FC<Props> = ({
{nodeInfo.title}
</div>
</Tooltip>
{nodeInfo.status !== 'running' && !hideInfo && (
{!['running', 'paused'].includes(nodeInfo.status) && !hideInfo && (
<div className="system-xs-regular shrink-0 text-text-tertiary">
{nodeInfo.execution_metadata?.total_tokens ? `${getTokenCount(nodeInfo.execution_metadata?.total_tokens || 0)} tokens · ` : ''}
{`${getTime(nodeInfo.elapsed_time || 0)}`}
@@ -154,11 +155,14 @@ const NodePanel: FC<Props> = ({
<RiCheckboxCircleFill className="ml-2 h-3.5 w-3.5 shrink-0 text-text-success" />
)}
{nodeInfo.status === 'failed' && (
<RiErrorWarningLine className="ml-2 h-3.5 w-3.5 shrink-0 text-text-warning" />
<RiErrorWarningFill className="ml-2 h-3.5 w-3.5 shrink-0 text-text-destructive" />
)}
{nodeInfo.status === 'stopped' && (
<RiAlertFill className={cn('ml-2 h-4 w-4 shrink-0 text-text-warning-secondary', inMessage && 'h-3.5 w-3.5')} />
)}
{nodeInfo.status === 'paused' && (
<RiPauseCircleFill className={cn('ml-2 h-4 w-4 shrink-0 text-text-warning-secondary', inMessage && 'h-3.5 w-3.5')} />
)}
{nodeInfo.status === 'exception' && (
<RiAlertFill className={cn('ml-2 h-4 w-4 shrink-0 text-text-warning-secondary', inMessage && 'h-3.5 w-3.5')} />
)}
@@ -229,6 +233,11 @@ const NodePanel: FC<Props> = ({
{nodeInfo.error}
</StatusContainer>
)}
{(nodeInfo.status === 'paused') && (
<StatusContainer status="paused">
<div className="system-xs-regular text-text-warning">{t('nodes.humanInput.log.reasonContent', { ns: 'workflow' })}</div>
</StatusContainer>
)}
</div>
{nodeInfo.inputs && (
<div className={cn('mb-1')}>