Skip to content

refactor(command): unify slash direct handlers and agent-safe tool schema#287

Merged
duguwanglong merged 3 commits into
devfrom
refactor/slash-command-direct-shared
May 19, 2026
Merged

refactor(command): unify slash direct handlers and agent-safe tool schema#287
duguwanglong merged 3 commits into
devfrom
refactor/slash-command-direct-shared

Conversation

@xiami762
Copy link
Copy Markdown
Contributor

@xiami762 xiami762 commented May 19, 2026

Summary

  • 抽取 flocks/command/direct.pyflocks/command/help.py,让 UI handler、run_slash_command 工具与 Rex prompt 共用同一套 direct 命令执行与 /help 格式化逻辑。
  • run_slash_command 仅暴露 Agent-safe 的只读 direct 命令(helptoolsskillsworkflowsmcp),schema 由 registry 动态生成。
  • 改进 /help 输出:按 direct / deferred 分组、用反引号占位符替代 <name> 类标记,Tips 仅展示有额外用法的命令。

xiami762 and others added 2 commits May 19, 2026 11:34
…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>
@xiami762 xiami762 requested a review from duguwanglong May 19, 2026 07:46
Resolve registry.py conflict by keeping storage custom agent loading
and available-agent name sorting together.

Co-authored-by: Cursor <cursoragent@cursor.com>
@duguwanglong duguwanglong merged commit 5f2fa3c into dev May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants