Agentic UI: open slash-command dropdown when typing / in chat - #4509
Conversation
Port the classic UI inline slash-command autocomplete to the agentic UI composer, and expand bare /skill prompts server-side in the local web backend by sharing expandSkillCommandPrompt via @studio/common. Fixes STU-2244 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📊 Performance Test ResultsComparing 92473d4 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
bcotrim
left a comment
There was a problem hiding this comment.
Nice change, thanks!
One issue I ran into: the command picker still work in mid sentences but the command won't actually trigger. Should we display it only at the start of the prompt?
In classic UI we have the "/" button, I wonder if we should keep it, I think it's nice for discoverability. What do you think?
|
I think that's expected. In claude code you can trigger multiple skills at once if you want. The skill is loaded correctly even if you trigger it in the mid sentence. |
Yes it makes sense in that case, disregard! 🙇 |
bcotrim
left a comment
There was a problem hiding this comment.
Approving after the clarification on the mid sentence commands.
The "/" button is a suggestion we can revisit later
Keep expandSkillCommandPrompt in @studio/common, rebuilt on trunk's resolveSkillFromPrompt, so both the desktop IPC handler and the `studio ui` server share one implementation. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Related issues
How AI was used in this PR
Proposed Changes
/in the Agentic UI chat composer now opens the same inline skill-command dropdown that the Classic UI already has: it filters as you type (matching names and descriptions), supports full keyboard navigation (ArrowUp/Down, Enter/Tab to insert, Escape to dismiss), and inserts the chosen command into the draft without stealing focus from the textarea./rank-me-up) sent from the browser UI are now expanded into the actual skill invocation instruction before reaching the agent. Previously the local web backend passed the literal slash string through, so skills triggered from the browser UI (including the existing “+ → Skills” menu) did not actually run the skill./commandform the user typed; only the prompt the agent receives is expanded — matching the desktop app behavior.Testing Instructions
npm startand start the agentic UI/in the composer — the dropdown opens listing the five skills. Keep typing (e.g./sp) to filter; ArrowUp/Down moves the highlight; Enter or Tab inserts (e.g./need-for-speed); Escape closes and removes the unfinished token; clicking an item inserts it while the textarea keeps focus.path/to(slash glued to a word) does not open the dropdown./rank-me-upand confirm the agent actually runs the skill (previously it received the literal string).slash-command.mp4
Pre-merge Checklist