feat(web): 在 Composer 中提供 Pi 原生斜杠命令发现 - #526
Open
6iKUN6 wants to merge 2 commits into
Open
Conversation
Define Pi-owned discovery, bounded command projection, conservative Web availability, and Composer completion behavior for openpi-dev#489.
Project Pi-native prompt templates, skills, and extension commands through a bounded Session-bound endpoint. Add local filtering, accessible completion interactions, stale-request isolation, responsive menu placement, and browser coverage.\n\nCloses openpi-dev#489\n\nCo-Authored-By: Codex <codex@openai.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 #489.
Web Composer 缺少 Pi 原生斜杠命令的发现入口。用户输入
/时无法查看当前 Session 注册的 Prompt Template、Skill 和 Extension Command,也无法了解命令来源及其在 Web 中的支持状态。在浏览器中维护硬编码命令表会复制 Pi 的注册逻辑、随运行时能力漂移,并可能泄露本机资源路径。
Value
让 Web 用户可以直接发现并补全当前 Pi Session 提供的命令,同时继续由 Pi 负责命令注册与 Prompt Template、Skill 的展开语义。
不支持的 Extension Command 会明确置灰,避免把命令已接收误解为命令已完成。
Approach
getCommands(),以 Pi 作为命令注册的唯一事实来源。GET /api/commands。/后加载一次命令,后续输入只在浏览器本地过滤。/name,不会立即提交。Validation
bun run checkbun run testbun run test:web:e2egit diff --checkImpact