feat(vscode): expose /skills as slash command with secondary picker#2548
Conversation
📋 Review SummaryThis PR implements a secondary completion picker for the 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 Low
✅ Highlights
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
我这边从代码层面又过了一遍,这个 PR 的整体方向和主链路我认为是成立的:CLI 侧已经把 我目前有两个非阻塞的改进建议,明天你可以顺手补一下:
整体上我没有看到当前需要阻塞合并的问题,这两个点更像是把兼容性和回归保护再补齐一点。 |
tanzhenxin
left a comment
There was a problem hiding this comment.
Exposing /skills as a slash command with the secondary picker is a really clean UX pattern. Makes skill discovery much more intuitive. Looks great — approved, merge whenever you're ready! 🙌
cbd8894 to
9db4d22
Compare
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — gpt-5.4 via Qwen Code /review
|
拉到本地跑了一遍,验证如下: ✅ 自动化全绿
✅ 你 4-08 自评的两点,从 commit 看已经处理一点
🟢 其余 bot review 的小项可选
|
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — gpt-5.4 via Qwen Code /review
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — gpt-5.4 via Qwen Code /review
3360334 to
3d4e791
Compare
59fc397 to
30aa84c
Compare
|
@wenshao Rebase 已完成并推送。
Rebase 后全部 12 个 commit 都 cleanly applied。 关于 App.tsx 的 |
wenshao
left a comment
There was a problem hiding this comment.
[Critical] packages/vscode-ide-companion/src/webview/hooks/useMessageSubmit.ts: the submit path still only intercepts /login, while this PR exposes /auth. If a user types /auth manually and presses Enter, it is sent as a normal prompt instead of launching the interactive auth flow. Please handle /auth here as well (and optionally keep /login as a backward-compatible alias).
[Critical] packages/vscode-ide-companion/src/webview/hooks/useWebViewMessages.ts: the new auth flow emits authCancelled, but the waiting/loading state is only cleared for authSuccess, authError, agentConnected, and agentConnectionError. If the user dismisses the auth flow, the chat can remain stuck showing the authentication spinner. Please clear the waiting state on authCancelled too.
— gpt-5.4 via Qwen Code /review
|
Both Critical items from the last review are false positives for this PR:
Both findings appear to be the review bot hallucinating issues outside the actual changeset. No action needed here. |
Add a secondary completion picker for the /skills slash command in the VSCode IDE companion, allowing users to browse and select skills from a dropdown before sending. Changes: - CLI: add 'skills' to ALLOWED_BUILTIN_COMMANDS_NON_INTERACTIVE whitelist - CLI: send available_skills_update via ACP with skill names/descriptions - Extension: handle available_skills_update in session update handler - Webview: implement secondary picker that triggers after selecting /skills - Webview: allow spaces in completion trigger for /skills sub-queries Closes #1562 Made-with: Cursor
- Move available skills from separate session update to _meta field of available_commands_update for more efficient delivery - Simplify skill data to just skill names (string array) - Add skillsCompletion utility for secondary picker logic - Cache available skills in WebViewProvider for replay on webview ready - Update all related types and handlers to support the new structure Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…ared module Move `isSkillsSecondaryQuery`, `shouldOpenSkillsSecondaryPicker`, and `SKILL_ITEM_ID_PREFIX` from App.tsx and useCompletionTrigger.ts into a shared `completionUtils.ts` file to eliminate duplication.
Cache and replay available skills when the webview becomes ready again. Clear stale skills when commands metadata does not include availableSkills.
Cache available commands in the webview provider. Replay them on webviewReady so slash command state survives reloads.
The auto-merge introduced a duplicate AvailableCommand in the @agentclientprotocol/sdk import block, causing TS2300.
…in handleWebviewReady The handleWebviewReady method was sending cachedAvailableCommands twice on every webview-ready handshake, causing an unnecessary extra state update in the webview.
…ility After the capability-based filtering refactor (a82d766), /skills was excluded from ACP mode because its commandType 'local-jsx' defaults to interactive-only. Add an explicit supportedModes declaration so the command passes the ACP filter and appears in the webview slash command picker.
1375ed6 to
816bb27
Compare
…e-experimental-cli-flags # Conflicts: # packages/vscode-ide-companion/src/webview/App.tsx # packages/vscode-ide-companion/src/webview/hooks/useCompletionTrigger.ts
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — gpt-5.5 via Qwen Code /review
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — gpt-5.5 via Qwen Code /review
…wenLM#2548) * feat(vscode): expose /skills as slash command with secondary picker Add a secondary completion picker for the /skills slash command in the VSCode IDE companion, allowing users to browse and select skills from a dropdown before sending. Changes: - CLI: add 'skills' to ALLOWED_BUILTIN_COMMANDS_NON_INTERACTIVE whitelist - CLI: send available_skills_update via ACP with skill names/descriptions - Extension: handle available_skills_update in session update handler - Webview: implement secondary picker that triggers after selecting /skills - Webview: allow spaces in completion trigger for /skills sub-queries Closes QwenLM#1562 Made-with: Cursor * feat(vscode-ide-companion): embed skills in commands update metadata - Move available skills from separate session update to _meta field of available_commands_update for more efficient delivery - Simplify skill data to just skill names (string array) - Add skillsCompletion utility for secondary picker logic - Cache available skills in WebViewProvider for replay on webview ready - Update all related types and handlers to support the new structure Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * refactor(vscode-ide-companion): simplify skills picker flow * refactor(vscode-ide-companion): extract skills completion utils to shared module Move `isSkillsSecondaryQuery`, `shouldOpenSkillsSecondaryPicker`, and `SKILL_ITEM_ID_PREFIX` from App.tsx and useCompletionTrigger.ts into a shared `completionUtils.ts` file to eliminate duplication. * fix(vscode-ide-companion): restore skills picker state on reload Cache and replay available skills when the webview becomes ready again. Clear stale skills when commands metadata does not include availableSkills. * fix(vscode-ide-companion): replay slash commands after webview reload Cache available commands in the webview provider. Replay them on webviewReady so slash command state survives reloads. * fix(vscode-ide-companion): import AvailableCommand from ACP SDK * fix(vscode-ide-companion): fallback /skills to direct command * test(vscode-ide-companion): cover skills secondary picker flow * test(vscode-ide-companion): guard App mock initialization * fix(vscode-ide-companion): remove duplicate AvailableCommand import The auto-merge introduced a duplicate AvailableCommand in the @agentclientprotocol/sdk import block, causing TS2300. * fix(vscode-ide-companion): remove duplicate availableCommands replay in handleWebviewReady The handleWebviewReady method was sending cachedAvailableCommands twice on every webview-ready handshake, causing an unnecessary extra state update in the webview. --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
TLDR
Support a secondary picker for
/skillsin the VSCode IDE companion.When a user types
/and selects/skills, the command is not sent immediately. Instead, the input is filled with/skillsand a secondary picker opens with the available skills. Selecting a skill then sends/skills <name>.Screenshots / Video Demo
Dive Deeper
Problem
The CLI already supports skills, but the VSCode IDE companion could not complete the
/skillsflow:/skillswas not exposed in ACP / non-interactive slash commands/skills, the input became/skills, but the secondary picker did not reliably openSolution
This PR keeps the implementation focused on the minimum path required for the
/skillssecondary picker:CLI layer
skillsto the ACP / non-interactive command listavailable_commands_update._meta.availableSkillsExtension layer
available_commands_update._meta.availableSkillsQwenAgentManagerandWebViewProviderWebview layer
availableSkillsin webview state/skills <filter>/skillsis selected, fill/skillsand explicitly reopen completion/skills xxxqueries with spaces to continue triggering completionInteraction flow
/and sees slash commands, including/skills/skills/skillsand is not sent immediatelyEnter: sends/skills <name>Tab: fills/skills <name>for further editingScope
This PR only focuses on the
/skillssecondary picker experience in the VSCode IDE companion. It does not introduce broader skills configuration or other slash-command interaction changes.Backward compatibility
available_commands_updatechannel instead of adding a custom ACP session update typeavailableSkillsmetadata is absent, the secondary picker stays unavailable, while other slash command behavior remains unchangedReviewer Test Plan
/and confirm/skillsappears in the slash command list/skills/skillsand is not sent immediatelyEnterand confirm/skills <name>is sentTaband confirm it only fills/skills <name>for further editingLinked issues / bugs
Closes #1562