From 2f0005ecad1d4b41ab33f6db015b44b0019f5667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Tue, 1 Sep 2026 19:10:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=85=A5=E6=98=BE=E5=BC=8F=20Tauri=20?= =?UTF-8?q?=E8=AF=8A=E6=96=AD=E9=87=87=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为 GDD 审批失败使用 diagnostic invoke 包装器 更新命令静态检查器识别诊断调用 --- apps/ai-game-creator-shell/scripts/check-config.mjs | 6 +++++- apps/ai-game-creator-shell/src/App.tsx | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/ai-game-creator-shell/scripts/check-config.mjs b/apps/ai-game-creator-shell/scripts/check-config.mjs index 6817d69bb..c21777466 100644 --- a/apps/ai-game-creator-shell/scripts/check-config.mjs +++ b/apps/ai-game-creator-shell/scripts/check-config.mjs @@ -320,6 +320,7 @@ const APP_INVOKE_BARE_CALL_NAMES = new Set([ 'directInvoke', 'invokeInput', 'invokeAuthenticatedInput', + 'invokeDiagnostic', ]); function parseAppInvokeCommandNames(source, fileName = 'fixture.tsx') { @@ -352,7 +353,10 @@ function parseAppInvokeCommandNames(source, fileName = 'fixture.tsx') { const isObjectInvoke = ts.isPropertyAccessExpression(expression) && expression.name.text === 'invoke'; - const commandArgument = node.arguments[0]; + const commandArgument = + ts.isIdentifier(expression) && expression.text === 'invokeDiagnostic' + ? node.arguments[1] + : node.arguments[0]; if ( (isBareCall || isObjectInvoke) && commandArgument !== undefined && diff --git a/apps/ai-game-creator-shell/src/App.tsx b/apps/ai-game-creator-shell/src/App.tsx index e265d1e82..e1a4f2cfe 100644 --- a/apps/ai-game-creator-shell/src/App.tsx +++ b/apps/ai-game-creator-shell/src/App.tsx @@ -237,6 +237,7 @@ import { ProjectSupervisorView } from './features/project-workspace/ProjectSuper import { ProjectWorkspaceChatPane } from './features/project-workspace/ProjectWorkspaceChatPane'; import { SupervisorChatOnlyView } from './features/project-workspace/SupervisorChatOnlyView'; import { RuntimeConfigDialog } from './features/runtime-config/RuntimeConfigDialog'; +import { invokeDiagnostic } from './services/errorReporting'; import type { HomeCreationType } from './view/home'; import { type ProjectAgentResultSummary, @@ -682,7 +683,7 @@ export function App({ setPlanGddDecisionBusy(true); setPlanGddError(null); try { - await invoke('decide_game_creator_plan_gdd', { + await invokeDiagnostic(invoke, 'decide_game_creator_plan_gdd', { projectPath: targetProjectPath, gddId: pending.gddRef.gddId, version: pending.gddRef.version,