feat(vscode-ide-companion): add Tab key fill-only behavior for completions#2431
feat(vscode-ide-companion): add Tab key fill-only behavior for completions#2431yiliang114 merged 9 commits intomainfrom
Conversation
…tions - Separate Tab and Enter key handling in CompletionMenu - Tab now inserts completion text without executing (useful for slash commands) - Enter/click continues to select and execute immediately - Allow users to append arguments after Tab-filling slash commands
…tions - Separate Tab and Enter key handling in CompletionMenu - Tab now inserts completion text without executing (useful for slash commands) - Enter/click continues to select and execute immediately - Allow users to append arguments after Tab-filling slash commands Co-authored-by: Mingholy <14246397+Mingholy@users.noreply.github.com>
Co-developed-by: Aone Copilot <noreply@alibaba-inc.com>
… tests - Add onCompletionFill prop to InputForm for Tab key handling - Distinguish Tab (fill) and Enter (select) completion behaviors - Add keyboard handling tests for completion items - Remove 'skills' command from non-interactive CLI allowed list Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…hub.com/QwenLM/qwen-code into feat/tab-action-in-vscode-ide-companion
Co-developed-by: Aone Copilot <noreply@alibaba-inc.com>
…tab-action-in-vscode-ide-companion
📋 Review SummaryThis PR implements a Tab key fill-only behavior for the completion menu in the VSCode IDE companion, allowing users to insert slash commands without immediate execution. The implementation is well-structured, properly separates concerns across components, and includes appropriate test coverage. The changes are minimal and focused on the specific feature request. 🔍 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. |
TLDR
Add Tab key fill-only behavior for completion menu in vscode-ide-companion. Tab now fills the selected item without executing, allowing users to append arguments before sending. Enter key still sends immediately.
Dive Deeper
Background
Previously, both Tab and Enter keys in the completion menu would execute the selected command immediately. For slash commands (e.g.,
/create-issue), this prevented users from adding parameters after selecting the command.Solution
Separate Tab and Enter behaviors:
Technical Implementation
CompletionMenu component (
packages/webui/src/components/layout/CompletionMenu.tsx)onFillcallback proponFill(falls back toonSelectif not provided)onSelectInputForm component (
packages/webui/src/components/layout/InputForm.tsx)onCompletionFillprop, passed through to CompletionMenuApp component (
packages/vscode-ide-companion/src/webview/App.tsx)fillOnlyparameter tohandleCompletionSelectfillOnly=trueand a slash command is selected, skip immediate send and use generic fill pathvalueproperty to command items for correct fill contentUnit tests (
InputForm.test.tsx)onCompletionFillinstead ofonCompletionSelectonCompletionSelectReviewer Test Plan
/to trigger command completion menunpm test -- --grep "InputForm completion keyboard handling"Testing Matrix
Linked issues / bugs
Fixes #2293