Skip to main content

prompt_template_selection

Function prompt_template_selection 

Source
pub fn prompt_template_selection(colors: Colors) -> Option<String>
Expand description

Prompt the user to select a template when PROMPT.md is missing.

This function:

  1. Displays a message that PROMPT.md is missing
  2. Asks if the user wants to create one from a template
  3. If yes, displays available templates
  4. Prompts for template selection (with default to feature-spec)
  5. Returns the selected template name or None if declined

§Arguments

  • colors - Terminal color configuration for output

§Returns

  • Some(template_name) - User selected a template
  • None - User declined, input was not a terminal, or input errored/ended