class

Tui::ToolResult

Inherits Tui::Widget / Tui::Reactive / Reference / Object

Constructors

new(tool_name : String, key_arg : String | Nil = nil, id : String | Nil = nil)
Source

Instance methods

append_line(line : String) : Nil

Convenience: append line

Source
arguments
Source
arguments=(arguments : Hash(String, JSON::Any) | Nil)
Source
chevron_color
Source
chevron_color=(chevron_color : Color)
Source
collapse
Source
complete(success : Bool, duration_ms : Int64, result : String | Nil = nil) : Nil
Source
content_view
Source
content_view=(view : View) : Nil

Set the content view (any View subclass)

Source
duration_ms
Source
duration_ms=(duration_ms : Int64)
Source
error_color
Source
error_color=(error_color : Color)
Source
expand
Source
expanded
Source
expanded=(expanded : Bool)
Source
format_args_display

Format arguments for display based on tool type

Source
header_bg
Source
header_bg=(header_bg : Color | Nil)
Source
header_fg
Source
header_fg=(header_fg : Color)
Source
key_arg
Source
key_arg=(key_arg : String | Nil)
Source
line_count
Source
max_visible_lines
Source
max_visible_lines=(max_visible_lines : Int32)
Source
min_size
Source
on_event(event : Event) : Bool

Override to handle events for this widget (target/bubble phase) Called after children have had a chance to handle the event

Source
preferred_height
Source
render(buffer : Buffer, clip : Rect) : Nil

Override to render widget content

Source
result=(text : String) : Nil

Convenience: set content as string (creates CodeView if needed)

Source
running_color

Styling

Source
running_color=(running_color : Color)

Styling

Source
status
Source
status=(status : Status)
Source
success_color
Source
success_color=(success_color : Color)
Source
toggle
Source
tool_name
Source
tool_name=(tool_name : String)
Source
visible_content_lines
Source

Nested types