Class: Aidp::Harness::UI::ProgressFormatter
- Inherits:
-
Object
- Object
- Aidp::Harness::UI::ProgressFormatter
- Defined in:
- lib/aidp/harness/ui/progress_display.rb
Overview
Formats progress display text
Instance Method Summary collapse
- #format_eta(remaining_steps, average_time_per_step) ⇒ Object
- #format_percentage(current, total) ⇒ Object
- #format_step_title(step_name) ⇒ Object
- #format_substep_title(step_title, current, total) ⇒ Object
Instance Method Details
#format_eta(remaining_steps, average_time_per_step) ⇒ Object
290 291 292 293 294 295 |
# File 'lib/aidp/harness/ui/progress_display.rb', line 290 def format_eta(remaining_steps, average_time_per_step) return "Unknown" unless average_time_per_step > 0 eta_seconds = remaining_steps * average_time_per_step format_duration(eta_seconds) end |
#format_percentage(current, total) ⇒ Object
285 286 287 288 |
# File 'lib/aidp/harness/ui/progress_display.rb', line 285 def format_percentage(current, total) percentage = (current.to_f / total * 100).round(1) "#{percentage}%" end |
#format_step_title(step_name) ⇒ Object
277 278 279 |
# File 'lib/aidp/harness/ui/progress_display.rb', line 277 def format_step_title(step_name) "Step: #{step_name}" end |
#format_substep_title(step_title, current, total) ⇒ Object
281 282 283 |
# File 'lib/aidp/harness/ui/progress_display.rb', line 281 def format_substep_title(step_title, current, total) "#{step_title} (#{current}/#{total})" end |