perf(buddy): 按需加载技能并缓存元数据 - #206
Merged
shanyuhai123 merged 3 commits intoSep 28, 2026
Merged
Conversation
Contributor
Author
|
bug体现:本人安装14个skills ,使用过程当中,第一次对话长时间转圈,然后直接失败,第二次发送才成功,现在解决,也符合pi 按需和渐进式加载 |
Contributor
|
非常好的 PR,之前我本地 skill 不是很多,没有发现这个问题。我在你的基础上做了个兼容修复。 |
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.
背景
普通消息发送前,会话准备会递归检查所有技能包的附属文件,未选择技能也会产生整包扫描成本。改为发现阶段读取并缓存 SKILL.md 元数据,显式选择技能时再校验所选包。
主要改动
验证
在本 PR 分支的 Linux 本地环境完成:
pnpm lint:fix、pnpm type-check、git diff --check通过。pnpm --filter @uselexora/lexora-buddy test:2493 项通过、13 项跳过。未执行 Windows/macOS 实机和 Electron 界面验收;本次没有视觉变更。
兼容与风险
不迁移或重写历史输入、冻结的 prompt 和用户技能文件。旧引用仍按整包语义校验,新目录引用使用文档 revision,物化后附带 packageRevision。外部新增技能通过列表刷新发现;缓存不替代使用时的路径与授权检查。