Class: RubyCode::Views::Formatter::ToolResult
- Inherits:
-
Object
- Object
- RubyCode::Views::Formatter::ToolResult
- Defined in:
- lib/rubycode/views/formatter/tool_result.rb
Overview
Builds tool result summary display
Class Method Summary collapse
Class Method Details
.build(result:) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/rubycode/views/formatter/tool_result.rb', line 10 def self.build(result:) pastel = Pastel.new first_line = result.lines.first&.strip || "(empty)" suffix = result.lines.count > 1 ? "... (#{result.lines.count} lines)" : "" " #{pastel.green("✓")} #{pastel.dim("Result:")} #{first_line}#{suffix}" end |