mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 00:48:04 +08:00
feat: Unify sandbox detection and apply Agent icon override
This commit is contained in:
@ -100,7 +100,7 @@ const NextStep = ({
|
||||
<div className="flex py-1">
|
||||
<div className="relative flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border-[0.5px] border-divider-regular bg-background-default shadow-xs">
|
||||
<BlockIcon
|
||||
type={selectedNode!.data.type}
|
||||
type={selectedNode!.data._iconTypeOverride ?? selectedNode!.data.type}
|
||||
toolIcon={toolIcon}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -42,7 +42,7 @@ const Item = ({
|
||||
className="group relative flex h-9 cursor-pointer items-center rounded-lg border-[0.5px] border-divider-regular bg-background-default px-2 text-xs text-text-secondary shadow-xs last-of-type:mb-0 hover:bg-background-default-hover"
|
||||
>
|
||||
<BlockIcon
|
||||
type={data.type}
|
||||
type={data._iconTypeOverride ?? data.type}
|
||||
toolIcon={toolIcon}
|
||||
className="mr-1.5 shrink-0"
|
||||
/>
|
||||
|
||||
@ -527,7 +527,7 @@ const BasePanel: FC<BasePanelProps> = ({
|
||||
<div className="flex items-center px-4 pb-1 pt-4">
|
||||
<BlockIcon
|
||||
className="mr-1 shrink-0"
|
||||
type={data.type}
|
||||
type={data._iconTypeOverride ?? data.type}
|
||||
toolIcon={toolIcon}
|
||||
size="md"
|
||||
/>
|
||||
|
||||
@ -69,11 +69,8 @@ const BaseNode: FC<BaseNodeProps> = ({
|
||||
const { t } = useTranslation()
|
||||
const nodeRef = useRef<HTMLDivElement>(null)
|
||||
const { nodesReadOnly } = useNodesReadOnly()
|
||||
const { _subGraphEntry, _iconTypeOverride } = data as {
|
||||
_subGraphEntry?: boolean
|
||||
_iconTypeOverride?: BlockEnum
|
||||
}
|
||||
const iconType = _iconTypeOverride ?? data.type
|
||||
const { _subGraphEntry } = data
|
||||
const iconType = data._iconTypeOverride ?? data.type
|
||||
|
||||
const { handleNodeIterationChildSizeChange } = useNodeIterationInteractions()
|
||||
const { handleNodeLoopChildSizeChange } = useNodeLoopInteractions()
|
||||
|
||||
Reference in New Issue
Block a user