Repository navigation
perf(skills): 批量导入 Skill 文件夹并复用上次成功位置 - #1172
Merged
Merged
Conversation
Reduce repeated picker launches, IPC requests, and list reloads when users import several skills. Keep each host import independent and reopen the picker beside the last successfully imported folder.
The old handler-wide assertion rejected the new folder multi-selection even though file imports still select one file. Keep the check on the file path and make handler extraction tolerant of platform line endings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
逐个导入 N 个 Skill 文件夹时,需要重复打开原生目录选择器 N 次、发起 N 次桌面 IPC 请求,并刷新技能列表 N 次。下一轮导入还要重新找到来源目录,整批操作耗时增加。
改动
SKILL.md的文件夹。skills.import。一个目录失败不会阻断后续导入;界面反馈成功数量、失败数量和首个错误,列表只刷新一次。导入 N 个目录时,选择器打开、渲染进程到主进程的请求和列表刷新各由 N 次降为 1 次;host 内部的 N 次导入仍顺序执行。总耗时尚未做受控测量。
验证
pnpm lint、pnpm build:js、Desktop 类型检查:通过。epsilon/、zeta/、broken/:前两个出现在列表,缺少SKILL.md的broken/未落盘;下次选择器从最后成功目录的上一级打开。兼容性
单文件导入的返回结果和 host 的
skills.import合同保持不变;目录导入新增imported与failed字段。每个目录继续沿用原有的路径检查、复制与失败规则。操作截图
Windows 原生选择器一次选中多个 Skill 文件夹。截图展示选择操作;导入成功与失败结果见上方验证。