Class: Aidp::Harness::UI::WorkflowControllerFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/aidp/harness/ui/workflow_controller.rb

Overview

Formats workflow controller display

Instance Method Summary collapse

Constructor Details

#initializeWorkflowControllerFormatter

Returns a new instance of WorkflowControllerFormatter.



285
286
287
# File 'lib/aidp/harness/ui/workflow_controller.rb', line 285

def initialize
  @pastel = Pastel.new
end

Instance Method Details

#format_control_action(action) ⇒ Object



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/aidp/harness/ui/workflow_controller.rb', line 310

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_helpObject



327
328
329
# File 'lib/aidp/harness/ui/workflow_controller.rb', line 327

def format_control_help
  @pastel.bold(@pastel.blue("⌨️ Workflow Control Help"))
end

#format_state(state) ⇒ Object



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/aidp/harness/ui/workflow_controller.rb', line 289

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



306
307
308
# File 'lib/aidp/harness/ui/workflow_controller.rb', line 306

def format_state_transition(from_state, to_state)
  @pastel.bold(@pastel.blue("🔄 #{from_state.to_s.capitalize} → #{to_state.to_s.capitalize}"))
end