Skip to content

fix: implement skill synchronization to enabled application directories#2010

Open
buddydeus wants to merge 1 commit intofarion1231:mainfrom
buddydeus:fix/skill-copy
Open

fix: implement skill synchronization to enabled application directories#2010
buddydeus wants to merge 1 commit intofarion1231:mainfrom
buddydeus:fix/skill-copy

Conversation

@buddydeus
Copy link
Copy Markdown

@buddydeus buddydeus commented Apr 11, 2026

Add functionality to sync imported skills to application directories based on user configuration (symlink/copy). Enhance Windows symlink creation with fallback to junctions for better compatibility. Update path removal logic to support both symlinks and junctions, ensuring safe deletion without affecting source files.

Summary / 概述

  1. 安装skill时会以复制方式安装到具体产品中,而没有读取配置中是否使用软链接方式。
  2. windows系统中 skill 无法以软链接方式创建。

Related Issue / 关联 Issue

Fixes #

Screenshots / 截图

Before / 修改前 After / 修改后
206f24ac1c7f4357b6f43a47a9ef177c

Checklist / 检查清单

  • pnpm typecheck passes / 通过 TypeScript 类型检查
  • pnpm format:check passes / 通过代码格式检查
  • cargo clippy passes (if Rust code changed) / 通过 Clippy 检查(如修改了 Rust 代码)
  • Updated i18n files if user-facing text changed / 如修改了用户可见文本,已更新国际化文件

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@buddydeus buddydeus marked this pull request as draft April 11, 2026 11:47
@buddydeus buddydeus force-pushed the fix/skill-copy branch 2 times, most recently from 29ac316 to df7c1b8 Compare April 11, 2026 11:49
@buddydeus buddydeus marked this pull request as ready for review April 11, 2026 11:49
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@farion1231
Copy link
Copy Markdown
Owner

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df7c1b851b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
}
}
match db.delete_skill(&skill.id) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore prior skill record during import rollback

After db.save_skill(&skill) succeeds, a later app-sync failure unconditionally executes db.delete_skill(&skill.id), but save_skill is implemented as INSERT OR REPLACE (src-tauri/src/database/dao/skills.rs), so this rollback path can erase a pre-existing skill record instead of restoring it. If the import list includes an already-managed skill (e.g., stale unmanaged scan results or repeated command invocation), a transient sync error will drop that skill from the database while leaving on-disk state partially preserved, which is data-lossy and hard to recover from. Capture and restore the previous row (or skip delete when replacing an existing record) rather than always deleting.

Useful? React with 👍 / 👎.

Add functionality to sync imported skills to application directories based on user configuration (symlink/copy). Enhance Windows symlink creation with fallback to junctions for better compatibility. Update path removal logic to support both symlinks and junctions, ensuring safe deletion without affecting source files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants