feat(skills): support inline $ Skill references - #321
Open
bkyssn wants to merge 1 commit into
Open
Conversation
This was referenced Aug 31, 2026
Collaborator
|
感谢 @bkyssn 和 @sowen1023 的投入。这里由维护者统一整合:以 #322 的 Session 实现为基础,纳入 #321 的 TUI 补全和相关测试,并修复评审发现的队列、压缩与解析边界问题。整合、冲突处理和验证由我们负责,采用的代码会保留原作者贡献与共同署名。请先不用继续重复修改这两块;我们会在整合结果通过验证后合并主 PR,再将另一 PR 标明已整合并关闭。当前尚未合并。 |
tt-a1i
added a commit
to sowen1023/openpi
that referenced
this pull request
Aug 31, 2026
…ections Integrate the autocomplete adapter and Editor tests from bkyssn/openpi PR openpi-dev#321 into sowen1023/openpi PR openpi-dev#322. Preserve run-scoped Skill snapshots through native compaction and repair Unicode and autocomplete composition boundaries. Co-authored-by: lwc <1803086257@qq.com>
tt-a1i
added a commit
that referenced
this pull request
Aug 31, 2026
* feat(skills): expand inline skill references * fix(skills): expand queued inline references * fix(skills): isolate inline skill projections * docs: use a public inline Skill example * feat(skills): integrate inline completion and preserve compacted projections Integrate the autocomplete adapter and Editor tests from bkyssn/openpi PR #321 into sowen1023/openpi PR #322. Preserve run-scoped Skill snapshots through native compaction and repair Unicode and autocomplete composition boundaries. Co-authored-by: lwc <1803086257@qq.com> * refactor(skills): defer loading and lifecycle to native Pi --------- Co-authored-by: tt-a1i <tt-a1i@users.noreply.github.com> Co-authored-by: lwc <1803086257@qq.com>
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.
Problem
Closes #282
Closes #316
Closes #317
Pi 的 Skill 补全只能通过消息开头的
/skill:name使用,无法在提示词中间自然引用 Skill。Value
用户可以在提示词任意位置输入
$,从当前已加载的 Skills 中选择,并用 Tab 补全而不发送消息。提交后模型会获得对应 Skill 内容,用户原始消息保持不变。Approach
$skill-name补全,候选始终来自pi.getCommands(),不重复维护 Skill 清单。before_agent_start中把已知引用展开为隐藏的模型上下文,并保持原始用户消息不变。/skill:name、slash command 和@path行为保持不变。Validation
bun run check:通过。bun run test:1089 个 Node 测试通过,1 个既有测试跳过;30 个 Vitest 测试通过。$能显示已加载 Skill,Tab 只补全不提交,提交后对应 Skill 可以正常使用。Impact
$skill-name补全与展开。/skill:name和@path兼容。