Class: Aidp::CLI::PromptsCommand
- Inherits:
-
Object
- Object
- Aidp::CLI::PromptsCommand
- Includes:
- MessageDisplay
- Defined in:
- lib/aidp/cli/prompts_command.rb
Overview
Command handler for aidp prompts subcommand
Provides commands for managing prompt templates:
- List all available templates
- Show template details
- Customize templates for project
- Reset customized templates
Usage:
aidp prompts list
aidp prompts show <template_id>
aidp prompts customize <template_id>
aidp prompts reset <template_id>
Constant Summary
Constants included from MessageDisplay
MessageDisplay::COLOR_MAP, MessageDisplay::CRITICAL_TYPES
Instance Method Summary collapse
-
#initialize(prompt: TTY::Prompt.new, project_dir: Dir.pwd) ⇒ PromptsCommand
constructor
A new instance of PromptsCommand.
-
#run(args) ⇒ Object
Main entry point for prompts command.
Methods included from MessageDisplay
#display_message, included, #message_display_prompt, #quiet_mode?
Constructor Details
#initialize(prompt: TTY::Prompt.new, project_dir: Dir.pwd) ⇒ PromptsCommand
Returns a new instance of PromptsCommand.
26 27 28 29 30 |
# File 'lib/aidp/cli/prompts_command.rb', line 26 def initialize(prompt: TTY::Prompt.new, project_dir: Dir.pwd) @prompt = prompt @project_dir = project_dir @template_manager = Prompts::PromptTemplateManager.new(project_dir: project_dir) end |
Instance Method Details
#run(args) ⇒ Object
Main entry point for prompts command
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/aidp/cli/prompts_command.rb', line 33 def run(args) subcommand = args.shift case subcommand when "list", "ls" list_templates(args) when "show", "view" show_template(args) when "customize", "edit" customize_template(args) when "reset" reset_template(args) when "-h", "--help", nil display_usage else ("Unknown subcommand: #{subcommand}", type: :error) display_usage end end |