refactor(command): unify slash direct handlers and agent-safe tool schema#287
Merged
Conversation
…hema Extract shared direct command execution and help formatting so the UI handler, run_slash_command tool, and Rex guidance stay consistent. Limit the agent tool to read-only direct commands and improve /help formatting. Co-authored-by: Cursor <cursoragent@cursor.com>
Expose /agents as a shared direct slash command for UI and agent tools. WebUI agents/tools/skills/workflows pages refresh when the tab regains focus; Session restores the last selected chat from localStorage. Add skill-builder skill and route SkillSheet creation through it. Co-authored-by: Cursor <cursoragent@cursor.com>
duguwanglong
approved these changes
May 19, 2026
Resolve registry.py conflict by keeping storage custom agent loading and available-agent name sorting together. Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
flocks/command/direct.py与flocks/command/help.py,让 UI handler、run_slash_command工具与 Rex prompt 共用同一套 direct 命令执行与/help格式化逻辑。run_slash_command仅暴露 Agent-safe 的只读 direct 命令(help、tools、skills、workflows、mcp),schema 由 registry 动态生成。/help输出:按 direct / deferred 分组、用反引号占位符替代<name>类标记,Tips 仅展示有额外用法的命令。