mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-04 06:30:53 +00:00
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 - 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 * feat(vscode-ide-companion): add Tab key fill-only behavior for completions - 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> * feat: add command selection behavior logic and tests Co-developed-by: Aone Copilot <noreply@alibaba-inc.com> * feat(vscode-ide-companion): add Tab key completion fill behavior with 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> * refactor: add itemId variable for command handling in App component Co-developed-by: Aone Copilot <noreply@alibaba-inc.com> * refactor: remove unused command selection behavior utils and tests --------- Co-authored-by: Mingholy <14246397+Mingholy@users.noreply.github.com> Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
28148d36c3
commit
ef640ba698
5 changed files with 186 additions and 11 deletions
|
|
@ -111,8 +111,10 @@ export interface InputFormProps {
|
|||
completionIsOpen: boolean;
|
||||
/** Completion items */
|
||||
completionItems?: CompletionItem[];
|
||||
/** Completion select callback */
|
||||
/** Completion select callback (Enter / click) */
|
||||
onCompletionSelect?: (item: CompletionItem) => void;
|
||||
/** Completion fill callback (Tab — fill without executing). Falls back to onCompletionSelect. */
|
||||
onCompletionFill?: (item: CompletionItem) => void;
|
||||
/** Completion close callback */
|
||||
onCompletionClose?: () => void;
|
||||
/** Placeholder text */
|
||||
|
|
@ -170,6 +172,7 @@ export const InputForm: FC<InputFormProps> = ({
|
|||
completionIsOpen,
|
||||
completionItems,
|
||||
onCompletionSelect,
|
||||
onCompletionFill,
|
||||
onCompletionClose,
|
||||
placeholder = 'Ask Qwen Code …',
|
||||
}) => {
|
||||
|
|
@ -242,6 +245,7 @@ export const InputForm: FC<InputFormProps> = ({
|
|||
<CompletionMenu
|
||||
items={completionItemsResolved}
|
||||
onSelect={onCompletionSelect}
|
||||
onFill={onCompletionFill}
|
||||
onClose={onCompletionClose}
|
||||
title={undefined}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue