fix: implement skill synchronization to enabled application directories#2010
fix: implement skill synchronization to enabled application directories#2010buddydeus wants to merge 1 commit intofarion1231:mainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
29ac316 to
df7c1b8
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
There was a problem hiding this comment.
💡 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".
src-tauri/src/services/skill.rs
Outdated
| } | ||
| } | ||
| } | ||
| match db.delete_skill(&skill.id) { |
There was a problem hiding this comment.
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.
df7c1b8 to
acfb214
Compare
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 / 概述
Related Issue / 关联 Issue
Fixes #
Screenshots / 截图
Checklist / 检查清单
pnpm typecheckpasses / 通过 TypeScript 类型检查pnpm format:checkpasses / 通过代码格式检查cargo clippypasses (if Rust code changed) / 通过 Clippy 检查(如修改了 Rust 代码)