From 6f0bae7724c8cc14544a7fdb751ef52573a8cca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 4 Sep 2026 18:06:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A9=E5=B7=A5=E4=BD=9C=E6=B5=81=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E6=A0=87=E9=A2=98=E6=98=A0=E5=B0=84=E6=98=BE=E5=BC=8F?= =?UTF-8?q?=E7=A9=B7=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用覆盖全部 UiEditorStepId 的 switch 映射步骤标题 增加 never 穷举检查以便新增步骤触发类型错误 --- .../components/workflowCompletionNotice.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.ts b/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.ts index 1c0bfbfa0..ff90b6dd5 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.ts +++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/workflowCompletionNotice.ts @@ -13,7 +13,14 @@ export function appendWorkflowCheckPrompt(message: string): string { } export function workflowStepLabel(step: UiEditorStepId): string { - if (step === 'reference-analysis') return '分析参考图'; - if (step === 'structure-recognition') return '识别界面结构'; - return '绑定视觉素材'; + switch (step) { + case 'reference-analysis': + return '分析参考图'; + case 'structure-recognition': + return '识别界面结构'; + case 'visual-binding': + return '绑定视觉素材'; + } + const exhaustiveCheck: never = step; + return exhaustiveCheck; }