diff --git a/cli/src/commands.ts b/cli/src/commands.ts index 4c01b859..ed8b4e76 100644 --- a/cli/src/commands.ts +++ b/cli/src/commands.ts @@ -398,13 +398,14 @@ export function buildAgentPickerHints(manifest: Manifest): Record { const agents = agentKeys(manifest); const agentHints = buildAgentPickerHints(manifest); - const agentChoice = await p.select({ - message: "Select an agent", + const agentChoice = await p.autocomplete({ + message: "Select an agent (type to filter)", options: mapToSelectOptions(agents, manifest.agents, agentHints), + placeholder: "Start typing to search...", }); if (p.isCancel(agentChoice)) handleCancel(); return agentChoice; @@ -435,11 +436,12 @@ function getAndValidateCloudChoices( return { clouds: sortedClouds, hintOverrides, credCount }; } -// Prompt user to select a cloud from the sorted list +// Prompt user to select a cloud from the sorted list with type-ahead filtering async function selectCloud(manifest: Manifest, cloudList: string[], hintOverrides: Record): Promise { - const cloudChoice = await p.select({ - message: "Select a cloud provider", + const cloudChoice = await p.autocomplete({ + message: "Select a cloud provider (type to filter)", options: mapToSelectOptions(cloudList, manifest.clouds, hintOverrides), + placeholder: "Start typing to search...", }); if (p.isCancel(cloudChoice)) handleCancel(); return cloudChoice;