feat(skills): add skill sync method setting (symlink/copy)

- Add SyncMethod enum (Auto/Symlink/Copy) in Rust backend
- Implement sync_to_app_dir with symlink support (cross-platform)
- Add SkillSyncMethodSettings UI component (simplified 2-button selector)
- Add i18n support for zh/en/ja
- Replace copy_to_app with configurable sync_to_app_dir
- Add skill_sync_method field to AppSettings

User can now choose between symlink (disk space saving) or copy (best compatibility) in Settings > General.
This commit is contained in:
Jason
2026-01-24 18:24:05 +08:00
parent 096c1d57c4
commit 779fefd86d
10 changed files with 252 additions and 18 deletions
+7
View File
@@ -137,6 +137,9 @@ export interface ProviderMeta {
proxyConfig?: ProviderProxyConfig;
}
// Skill 同步方式
export type SkillSyncMethod = "auto" | "symlink" | "copy";
// 主页面显示的应用配置
export interface VisibleApps {
claude: boolean;
@@ -182,6 +185,10 @@ export interface Settings {
currentProviderCodex?: string;
// 当前 Gemini 供应商 ID(优先于数据库 is_current
currentProviderGemini?: string;
// ===== Skill 同步设置 =====
// Skill 同步方式:auto(默认,优先 symlink)、symlink、copy
skillSyncMethod?: SkillSyncMethod;
}
// MCP 服务器连接参数(宽松:允许扩展字段)