mirror of https://github.com/langgenius/dify.git
fix(checklist): enhance type safety by refining BlockEnum usage in checklist components
This commit is contained in:
parent
8e1e81732a
commit
e26d77e78c
|
|
@ -32,6 +32,7 @@ import {
|
|||
} from '@/app/components/base/icons/src/vender/line/general'
|
||||
import { Warning } from '@/app/components/base/icons/src/vender/line/alertsAndFeedback'
|
||||
import { IconR } from '@/app/components/base/icons/src/vender/line/arrows'
|
||||
import type { BlockEnum } from '../types'
|
||||
|
||||
type WorkflowChecklistProps = {
|
||||
disabled: boolean
|
||||
|
|
@ -120,7 +121,7 @@ const WorkflowChecklist = ({
|
|||
>
|
||||
<div className='flex h-9 items-center p-2 text-xs font-medium text-text-secondary'>
|
||||
<BlockIcon
|
||||
type={node.type}
|
||||
type={node.type as BlockEnum}
|
||||
className='mr-1.5'
|
||||
toolIcon={node.toolIcon}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -42,12 +42,13 @@ import { fetchDatasets } from '@/service/datasets'
|
|||
import { MAX_TREE_DEPTH } from '@/config'
|
||||
import useNodesAvailableVarList, { useGetNodesAvailableVarList } from './use-nodes-available-var-list'
|
||||
import { getNodeUsedVars, isSpecialVar } from '../nodes/_base/components/variable/utils'
|
||||
import type { Emoji } from '@/app/components/tools/types'
|
||||
|
||||
export type ChecklistItem = {
|
||||
id: string
|
||||
type: BlockEnum | string
|
||||
title: string
|
||||
toolIcon?: string
|
||||
toolIcon?: string | Emoji
|
||||
unConnected?: boolean
|
||||
errorMessage?: string
|
||||
canNavigate: boolean
|
||||
|
|
|
|||
Loading…
Reference in New Issue