Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
) -> Result<bool, String> {
Ok(crate::harness_ai_service::resolve_tool_approval(&tool_call_id, approved, result))
}

#[tauri::command]
async fn ai_completion(
state: tauri::State<'_, AppState>,
Expand Down
6 changes: 3 additions & 3 deletions src/components/Onboarding/OnboardingTour.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -212,8 +212,8 @@ export const OnboardingTour: React.FC<OnboardingTourProps> = ({
// 目标元素选择器(只检查静态元素)
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;
Expand Down