Class: Aireview::DryRunReport

Inherits:
Object
  • Object
show all
Defined in:
lib/aireview/dry_run_report.rb

Overview

The --dry-run output: settings, the context summary and the prompts of both stages.

Instance Method Summary collapse

Constructor Details

#initialize(out) ⇒ DryRunReport

Returns a new instance of DryRunReport.



7
8
9
# File 'lib/aireview/dry_run_report.rb', line 7

def initialize(out)
  @out = out
end

Instance Method Details

#render(dry_run) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/aireview/dry_run_report.rb', line 11

def render(dry_run)
  render_settings(dry_run)
  @out.puts
  @out.puts('=== CONTEXT ===')
  render_context_sizes(dry_run[:sizes])
  render_coverage(dry_run[:coverage])
  @out.puts
  @out.puts('=== GENERATE SYSTEM PROMPT ===')
  @out.puts(dry_run.dig(:generate_prompt, :system_prompt))
  @out.puts
  @out.puts('=== GENERATE USER PROMPT ===')
  @out.puts(dry_run.dig(:generate_prompt, :user_prompt))
  render_critique_prompt(dry_run[:critique_prompt]) if dry_run[:critique_prompt]
  render_jev_request(dry_run[:jev_critique]) if dry_run[:jev_critique]
end