From 76fa8306886c49626de3820ef66758f508bde9c5 Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 11 Jan 2026 16:37:18 +0800 Subject: [PATCH] fix(live): sync skills to app directories on config path change When users change app config directories (claudeConfigDir, codexConfigDir, geminiConfigDir), MCP servers were being synced to the new paths but Skills were not. This adds Skill synchronization to sync_current_to_live() to ensure installed Skills are also copied to the new app directories. --- src-tauri/src/services/provider/live.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src-tauri/src/services/provider/live.rs b/src-tauri/src/services/provider/live.rs index 6389827b9..0192f6ecd 100644 --- a/src-tauri/src/services/provider/live.rs +++ b/src-tauri/src/services/provider/live.rs @@ -148,6 +148,15 @@ pub fn sync_current_to_live(state: &AppState) -> Result<(), AppError> { // MCP sync McpService::sync_all_enabled(state)?; + + // Skill sync + for app_type in [AppType::Claude, AppType::Codex, AppType::Gemini] { + if let Err(e) = crate::services::skill::SkillService::sync_to_app(&state.db, &app_type) { + log::warn!("同步 Skill 到 {:?} 失败: {}", app_type, e); + // Continue syncing other apps, don't abort + } + } + Ok(()) }