diff --git a/tools/cli/lib/prompts.js b/tools/cli/lib/prompts.js index 7ab2d21e..c51d68d1 100644 --- a/tools/cli/lib/prompts.js +++ b/tools/cli/lib/prompts.js @@ -322,6 +322,25 @@ async function autocompleteMultiselect(options) { }, }); + // === FIX: Make SPACE always act as selection key (not search input) === + // Override _isActionKey to treat SPACE like TAB - always an action key + // This prevents SPACE from being added to the search input + const originalIsActionKey = prompt._isActionKey.bind(prompt); + prompt._isActionKey = function (char, key) { + if (key && key.name === 'space') { + return true; + } + return originalIsActionKey(char, key); + }; + + // Handle SPACE toggle when NOT navigating (internal code only handles it when isNavigating=true) + prompt.on('key', (char, key) => { + if (key && key.name === 'space' && !prompt.isNavigating && prompt.focusedValue !== undefined) { + prompt.toggleSelected(prompt.focusedValue); + } + }); + // === END FIX === + const result = await prompt.prompt(); await handleCancel(result); return result; diff --git a/tools/cli/lib/ui.js b/tools/cli/lib/ui.js index 2ed7ab9f..811931f5 100644 --- a/tools/cli/lib/ui.js +++ b/tools/cli/lib/ui.js @@ -634,7 +634,7 @@ class UI { // Interactive mode const interactiveSelectedIdes = await prompts.autocompleteMultiselect({ - message: 'Select tools:', + message: 'Integrate with:', options: allToolOptions, initialValues: configuredIdes.length > 0 ? configuredIdes : undefined, required: false,