@@ -17,10 +17,7 @@ import { logAction } from './logger.mjs';
1717import { configureSshKey } from './lagoon-ssh-key-configurator.mjs' ;
1818
1919// Import the modern inquirer prompts
20- import { select } from '@inquirer/prompts' ;
21- import { input } from '@inquirer/prompts' ;
22- import { confirm } from '@inquirer/prompts' ;
23- import { checkbox } from '@inquirer/prompts' ;
20+ import { select , input , confirm , checkbox , search } from '@inquirer/prompts' ;
2421
2522/**
2623 * Starts the interactive Lagoon CLI session for managing projects and environments.
@@ -156,8 +153,9 @@ async function selectProjectWithDetails(instance) {
156153 const projectsWithDetails = await getProjectsWithDetails ( instance ) ;
157154 spinner . stop ( ) ;
158155
159- const project = await select ( {
160- message : 'Select a project:' ,
156+ // Use search prompt with autocomplete functionality
157+ const project = await search ( {
158+ message : 'Select a project (type to search):' ,
161159 choices : projectsWithDetails . map ( project => ( {
162160 value : project . projectname ,
163161 label : project . projectname
@@ -183,8 +181,8 @@ async function showMainMenu(instance, project) {
183181 console . log ( chalk . blue ( `\nCurrent Instance: ${ chalk . bold ( instance ) } ` ) ) ;
184182 console . log ( chalk . blue ( `Current Project: ${ chalk . bold ( project ) } \n` ) ) ;
185183
186- const action = await select ( {
187- message : 'What would you like to do?' ,
184+ const action = await search ( {
185+ message : 'What would you like to do? (type to search) ' ,
188186 choices : [
189187 { value : 'listEnvironments' , label : 'List Environments' } ,
190188 { value : 'listUsers' , label : 'List Users' } ,
0 commit comments