Class: TUI::Decorators::BashDecorator

Inherits:
BaseDecorator show all
Defined in:
lib/tui/decorators/bash_decorator.rb

Overview

Renders bash tool calls and responses. Calls show the shell command with a terminal icon in the unified tool color. Responses use green for success, red for failure — immediate actionable feedback.

Constant Summary collapse

ICON =

laptop / terminal

"\u{1F4BB}"

Constants inherited from BaseDecorator

TUI::Decorators::BaseDecorator::CHECKMARK, TUI::Decorators::BaseDecorator::ERROR_ICON, TUI::Decorators::BaseDecorator::RETURN_ARROW

Instance Attribute Summary

Attributes inherited from BaseDecorator

#data

Instance Method Summary collapse

Methods inherited from BaseDecorator

#color, for, #initialize, #render, #render_call, #render_response, #render_think

Methods included from Formatting

#format_ns_timestamp, #format_token_label, #token_count_color

Constructor Details

This class inherits a constructor from TUI::Decorators::BaseDecorator

Instance Method Details

#iconObject



11
12
13
# File 'lib/tui/decorators/bash_decorator.rb', line 11

def icon
  ICON
end

#response_colorObject



15
16
17
# File 'lib/tui/decorators/bash_decorator.rb', line 15

def response_color
  (data["success"] == false) ? "red" : "green"
end