Class: Ralph::Output::StruggleWarning

Inherits:
Object
  • Object
show all
Defined in:
lib/ralph/output/struggle_warning.rb

Class Method Summary collapse

Class Method Details

.call(loop_context) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/ralph/output/struggle_warning.rb', line 6

def self.call(loop_context)
  puts "\n⚠️  Potential struggle detected:"
  if loop_context.struggle_indicators[:no_progress_iterations] >= 3
    puts "   - No file changes in #{loop_context.struggle_indicators[:no_progress_iterations]} iterations"
  end
  if loop_context.struggle_indicators[:short_iterations] >= 3
    puts "   - #{loop_context.struggle_indicators[:short_iterations]} very short iterations"
  end
  puts "   💡 Tip: Use 'ralph --add-context \"hint\"' in another terminal to guide the agent"
end