-
-
Notifications
You must be signed in to change notification settings - Fork 2
Labels
Description
Feature Request: Display Variable Descriptions in Interactive Mode
Current Behavior
When running struct generate in interactive mode, users are prompted for missing variables with only the variable name and default value:
❓ Enter value for my_variable [default_value]:
Desired Behavior
When a variable has a description field in the YAML configuration, it should be displayed in the interactive prompt to help users understand what the variable is for:
❓ Enter value for my_variable [default_value]:
Description: The name of your project
Example Configuration
variables:
- project_name:
type: string
description: "The name of your project"
default: "MyProject"
- environment:
type: string
description: "Target deployment environment"
enum: ["dev", "staging", "prod"]
default: "dev"Expected Output
❓ Enter value for project_name [MyProject]:
Description: The name of your project
❓ Enter value for environment [dev] (1) dev, (2) staging, (3) prod:
Description: Target deployment environment
Implementation Notes
- The change should be in
struct_module/template_renderer.pyin theprompt_for_missing_varsmethod - Should support both
descriptionandhelpfields (for backward compatibility) - Should only display the description if it exists in the variable configuration
- Should maintain current functionality for variables without descriptions
- Should work for both regular variables and enum variables
Benefits
- Improved user experience in interactive mode
- Better understanding of what each variable represents
- More self-documenting configurations
- Reduces need to check YAML file while running interactive generation