From 33625c4369be36dc8de728d2a3f5feb812a94f5b Mon Sep 17 00:00:00 2001 From: peterfei Date: Tue, 21 Apr 2026 19:22:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E4=BA=A7=E7=94=9F=E7=9A=84=E9=87=8D=E5=A4=8D=20resolve=5Ftool?= =?UTF-8?q?=5Fapproval=20=E5=87=BD=E6=95=B0=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/lib.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 58246dda..b2344518 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1347,16 +1347,6 @@ fn resolve_tool_approval( Ok(crate::harness_ai_service::resolve_tool_approval(&tool_call_id, approved, result)) } -/// 前端审批完成后回调:将审批结果发送给等待中的 stream_chat loop -#[tauri::command] -fn resolve_tool_approval( - tool_call_id: String, - approved: bool, - result: Option, -) -> Result { - Ok(crate::harness_ai_service::resolve_tool_approval(&tool_call_id, approved, result)) -} - #[tauri::command] async fn ai_completion( state: tauri::State<'_, AppState>, From a306a5cfc2f5bd17db2f1fa86226da31d9abef42 Mon Sep 17 00:00:00 2001 From: peterfei Date: Tue, 21 Apr 2026 19:23:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20OnboardingTour?= =?UTF-8?q?=20=E6=89=BE=E4=B8=8D=E5=88=B0=20layout-switcher=20=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=20NotFoundError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LayoutSwitcher 组件在当前分支未挂载到 DOM,joyride 找不到目标 元素抛出 NotFoundError。动态检测目标是否存在,缺失时降级为 body。 --- src/components/Onboarding/OnboardingTour.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Onboarding/OnboardingTour.tsx b/src/components/Onboarding/OnboardingTour.tsx index 5a73f97a..6d995f5a 100644 --- a/src/components/Onboarding/OnboardingTour.tsx +++ b/src/components/Onboarding/OnboardingTour.tsx @@ -181,7 +181,7 @@ const getTourSteps = (t: (key: string) => string): any[] => { }, // 步骤 4: 布局切换器(定位到布局切换按钮) { - target: '[data-testid="layout-switcher"]', + target: document.querySelector('[data-testid="layout-switcher"]') ? '[data-testid="layout-switcher"]' : 'body', content: renderMarkdown(t('onboarding.steps.layoutSwitcher')), title: t('onboarding.steps.layoutSwitcherTitle'), disableBeacon: false, @@ -212,8 +212,8 @@ export const OnboardingTour: React.FC = ({ // 目标元素选择器(只检查静态元素) const targets = [ 'body', - '[data-testid="layout-switcher"]' - ]; + document.querySelector('[data-testid="layout-switcher"]') ? '[data-testid="layout-switcher"]' : null, + ].filter(Boolean) as string[]; // 轮询检测目标元素是否存在 let checkInterval: NodeJS.Timeout | null = null;