Raxol. UI. Components. Harness. ToolCallBlock
(Raxol v2.6.1)
View Source
Renders one tool invocation from the harness protocol stream.
Render-dual of the event pair item_started{item_id, item_type: :tool_use}
followed by item_completed{item_type: :tool_use, content: %{name, args}}
(see docs/proposals/in-flight/harness-spec-protocol.md sec 3, family
:loop). It is a pure projection of name + args + status -- it holds
no protocol state of its own; the caller re-inits or updates props as the
envelope's events arrive (:pending on item_started, then :running,
landing on :done/:failed when item_completed closes the item).
Renders as one row: a status glyph, the tool name (bold), and a compact,
width-bounded rendering of args.
Summary
Functions
Formats args (a map or a preformatted string) into a compact,
width-bounded single-line summary suitable for an inline row.
Callback implementation for Raxol.UI.Components.Base.Component.handle_event/3.
Callback implementation for Raxol.UI.Components.Base.Component.mount/1.
Glyph and colour for a tool-call/tool-result status.
Callback implementation for Raxol.UI.Components.Base.Component.unmount/1.
Callback implementation for Raxol.UI.Components.Base.Component.update/2.
Types
Functions
Formats args (a map or a preformatted string) into a compact,
width-bounded single-line summary suitable for an inline row.
Callback implementation for Raxol.UI.Components.Base.Component.handle_event/3.
Callback implementation for Raxol.UI.Components.Base.Component.mount/1.
@spec status_glyph(status(), non_neg_integer()) :: {String.t(), atom()}
Glyph and colour for a tool-call/tool-result status.
:running returns a spinner-frame character (reuses
Raxol.UI.Components.Progress.Spinner's frame table so a caller driving
frame from a tick subscription gets real animation); :done is a green
check, :failed a red cross; anything else (including :pending) falls
back to a neutral marker.
Callback implementation for Raxol.UI.Components.Base.Component.unmount/1.
Callback implementation for Raxol.UI.Components.Base.Component.update/2.