Class: Aidp::CLI::EvalCommand
- Inherits:
-
Object
- Object
- Aidp::CLI::EvalCommand
- Includes:
- MessageDisplay
- Defined in:
- lib/aidp/cli/eval_command.rb
Overview
Command handler for ‘aidp eval` subcommand
Provides commands for managing evaluations:
- list: List recent evaluations
- view <id>: View details of a specific evaluation
- stats: Show evaluation statistics
- add <>: Add a new evaluation
- clear: Clear all evaluation data
Usage:
aidp eval list
aidp eval list -- good
aidp eval view eval_20241115_123456_abc1
aidp eval stats
aidp eval add good "Great output"
aidp eval clear --force
Constant Summary
Constants included from MessageDisplay
MessageDisplay::COLOR_MAP, MessageDisplay::CRITICAL_TYPES
Instance Method Summary collapse
-
#initialize(prompt: TTY::Prompt.new, storage: nil, project_dir: nil) ⇒ EvalCommand
constructor
A new instance of EvalCommand.
-
#run(args) ⇒ Object
Main entry point for eval subcommands.
Methods included from MessageDisplay
#display_message, included, #message_display_prompt, #quiet_mode?
Constructor Details
#initialize(prompt: TTY::Prompt.new, storage: nil, project_dir: nil) ⇒ EvalCommand
Returns a new instance of EvalCommand.
29 30 31 32 33 34 35 |
# File 'lib/aidp/cli/eval_command.rb', line 29 def initialize(prompt: TTY::Prompt.new, storage: nil, project_dir: nil) @prompt = prompt @project_dir = project_dir || Dir.pwd @storage = storage || Aidp::Evaluations::EvaluationStorage.new(project_dir: @project_dir) Aidp.log_debug("eval_command", "initialize", project_dir: @project_dir) end |
Instance Method Details
#run(args) ⇒ Object
Main entry point for eval subcommands
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/aidp/cli/eval_command.rb', line 38 def run(args) sub = args.shift || "list" case sub when "list" run_list_command(args) when "view" run_view_command(args) when "stats" run_stats_command when "add" run_add_command(args) when "watch" run_watch_command(args) when "clear" run_clear_command(args) else display_usage end end |