chore(web): pre-align HITL frontend from build/feat/hitl

This commit is contained in:
yyh
2026-02-09 15:34:15 +08:00
parent b289e6a2b6
commit ca243d7efc
261 changed files with 14122 additions and 1328 deletions

View File

@ -9,6 +9,7 @@ import {
RiCheckboxCircleFill,
RiErrorWarningFill,
RiLoader2Line,
RiPauseCircleFill,
} from '@remixicon/react'
import {
cloneElement,
@ -148,7 +149,7 @@ const BaseNode: FC<BaseNodeProps> = ({
showExceptionBorder,
} = useMemo(() => {
return {
showRunningBorder: data._runningStatus === NodeRunningStatus.Running && !showSelectedBorder,
showRunningBorder: (data._runningStatus === NodeRunningStatus.Running || data._runningStatus === NodeRunningStatus.Paused) && !showSelectedBorder,
showSuccessBorder: (data._runningStatus === NodeRunningStatus.Succeeded || hasVarValue) && !showSelectedBorder,
showFailedBorder: data._runningStatus === NodeRunningStatus.Failed && !showSelectedBorder,
showExceptionBorder: data._runningStatus === NodeRunningStatus.Exception && !showSelectedBorder,
@ -306,7 +307,7 @@ const BaseNode: FC<BaseNodeProps> = ({
)
}
{
data.type !== BlockEnum.IfElse && data.type !== BlockEnum.QuestionClassifier && data.type !== BlockEnum.Group && !data._isCandidate && (
data.type !== BlockEnum.IfElse && data.type !== BlockEnum.QuestionClassifier && data.type !== BlockEnum.Group && data.type !== BlockEnum.HumanInput && !data._isCandidate && (
<NodeSourceHandle
id={id}
data={data}
@ -382,15 +383,27 @@ const BaseNode: FC<BaseNodeProps> = ({
!!(data.type === BlockEnum.Loop && data._loopIndex) && LoopIndex
}
{
isLoading
? <RiLoader2Line className="h-3.5 w-3.5 animate-spin text-text-accent" />
: data._runningStatus === NodeRunningStatus.Failed
? <RiErrorWarningFill className="h-3.5 w-3.5 text-text-destructive" />
: data._runningStatus === NodeRunningStatus.Exception
? <RiAlertFill className="h-3.5 w-3.5 text-text-warning-secondary" />
: (data._runningStatus === NodeRunningStatus.Succeeded || hasVarValue)
? <RiCheckboxCircleFill className="h-3.5 w-3.5 text-text-success" />
: null
isLoading && <RiLoader2Line className="h-3.5 w-3.5 animate-spin text-text-accent" />
}
{
!isLoading && data._runningStatus === NodeRunningStatus.Failed && (
<RiErrorWarningFill className="h-3.5 w-3.5 text-text-destructive" />
)
}
{
!isLoading && data._runningStatus === NodeRunningStatus.Exception && (
<RiAlertFill className="h-3.5 w-3.5 text-text-warning-secondary" />
)
}
{
!isLoading && (data._runningStatus === NodeRunningStatus.Succeeded || hasVarValue) && (
<RiCheckboxCircleFill className="h-3.5 w-3.5 text-text-success" />
)
}
{
!isLoading && data._runningStatus === NodeRunningStatus.Paused && (
<RiPauseCircleFill className="h-3.5 w-3.5 text-text-warning-secondary" />
)
}
</div>
{