Class: Aidp::Harness::UI::WorkflowControllerFormatter
- Inherits:
-
Object
- Object
- Aidp::Harness::UI::WorkflowControllerFormatter
- Defined in:
- lib/aidp/harness/ui/workflow_controller.rb
Overview
Formats workflow controller display
Instance Method Summary collapse
- #format_control_action(action) ⇒ Object
- #format_control_help ⇒ Object
- #format_state(state) ⇒ Object
- #format_state_transition(from_state, to_state) ⇒ Object
-
#initialize ⇒ WorkflowControllerFormatter
constructor
A new instance of WorkflowControllerFormatter.
Constructor Details
#initialize ⇒ WorkflowControllerFormatter
Returns a new instance of WorkflowControllerFormatter.
282 283 284 |
# File 'lib/aidp/harness/ui/workflow_controller.rb', line 282 def initialize @pastel = Pastel.new end |
Instance Method Details
#format_control_action(action) ⇒ Object
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/aidp/harness/ui/workflow_controller.rb', line 307 def format_control_action(action) case action when :pause @pastel.yellow("⏸️ Pause") when :resume @pastel.green("▶️ Resume") when :cancel @pastel.red("❌ Cancel") when :stop @pastel.red("⏹️ Stop") when :complete @pastel.green("✅ Complete") else @pastel.dim("❓ #{action.to_s.capitalize}") end end |
#format_control_help ⇒ Object
324 325 326 |
# File 'lib/aidp/harness/ui/workflow_controller.rb', line 324 def format_control_help @pastel.bold(@pastel.blue("⌨️ Workflow Control Help")) end |
#format_state(state) ⇒ Object
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/aidp/harness/ui/workflow_controller.rb', line 286 def format_state(state) case state when :running @pastel.green("🟢 Running") when :paused @pastel.yellow("🟡 Paused") when :cancelled @pastel.red("🔴 Cancelled") when :stopped @pastel.red("⏹️ Stopped") when :completed @pastel.green("✅ Completed") else @pastel.dim("❓ #{state.to_s.capitalize}") end end |
#format_state_transition(from_state, to_state) ⇒ Object
303 304 305 |
# File 'lib/aidp/harness/ui/workflow_controller.rb', line 303 def format_state_transition(from_state, to_state) @pastel.bold(@pastel.blue("🔄 #{from_state.to_s.capitalize} → #{to_state.to_s.capitalize}")) end |