From e26d77e78c80652546e4a8069bcee3d495182ea0 Mon Sep 17 00:00:00 2001 From: zhsama Date: Mon, 20 Oct 2025 14:27:28 +0800 Subject: [PATCH] fix(checklist): enhance type safety by refining BlockEnum usage in checklist components --- web/app/components/workflow/header/checklist.tsx | 3 ++- web/app/components/workflow/hooks/use-checklist.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/components/workflow/header/checklist.tsx b/web/app/components/workflow/header/checklist.tsx index 39155c037e..794a8997a9 100644 --- a/web/app/components/workflow/header/checklist.tsx +++ b/web/app/components/workflow/header/checklist.tsx @@ -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 = ({ >
diff --git a/web/app/components/workflow/hooks/use-checklist.ts b/web/app/components/workflow/hooks/use-checklist.ts index b09dd10bc8..5d9160faf0 100644 --- a/web/app/components/workflow/hooks/use-checklist.ts +++ b/web/app/components/workflow/hooks/use-checklist.ts @@ -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