Class: BruteCLI::BufferOutput::ModelLine
- Inherits:
-
Object
- Object
- BruteCLI::BufferOutput::ModelLine
- Defined in:
- lib/brute_cli/buffer_output/model_line.rb
Overview
Renderable provider / model / agent status line.
puts BufferOutput::ModelLine.new(
provider_name: "anthropic",
model_short: "3.5-sonnet",
current_agent: "build"
)
# => "anthropic 3.5-sonnet ยท agent build"
Instance Method Summary collapse
-
#initialize(provider_name:, model_short:, current_agent:) ⇒ ModelLine
constructor
A new instance of ModelLine.
- #to_s ⇒ Object
Constructor Details
#initialize(provider_name:, model_short:, current_agent:) ⇒ ModelLine
Returns a new instance of ModelLine.
17 18 19 20 21 |
# File 'lib/brute_cli/buffer_output/model_line.rb', line 17 def initialize(provider_name:, model_short:, current_agent:) @provider_name = provider_name @model_short = model_short @current_agent = current_agent end |
Instance Method Details
#to_s ⇒ Object
23 24 25 26 27 28 |
# File 'lib/brute_cli/buffer_output/model_line.rb', line 23 def to_s parts = [] parts << stat_span(@provider_name, @model_short) if @provider_name && @model_short parts << stat_span("agent", @current_agent) parts.join(" \u00b7 ".colorize(DIM)) end |