Raxol.UI.Components.Harness.ToolResultBlock (Raxol v2.6.1)

View Source

Renders one tool result from the harness protocol stream.

Render-dual of item_completed{item_type: :tool_result, content}, folded with the owning event envelope's provenance.trust (docs/proposals/in-flight/harness-spec-protocol.md sec 3). Long output collapses behind a one-line summary; Enter/Space toggles it. Composes Raxol.UI.Components.Harness.TaintBadge for the provenance.trust: :tainted case -- the lethal-trifecta visibility marker described in harness-spec-frontend.md sec 6.

The output body reuses Raxol.UI.Components.CodeBlock's bordered/padded box convention (box style: %{border: :single, padding: 1}), but not its Makeup syntax highlighting: CodeBlock has no plaintext lexer and falls back to the Elixir lexer for any language it doesn't recognise, which would mis-highlight arbitrary tool output (JSON, logs, shell text) as pseudo-Elixir. Plain text keeps this honest for content of unknown shape.

Summary

Types

status()

t()

@type t() :: %{
  id: String.t() | atom(),
  output: String.t(),
  status: status(),
  taint: boolean(),
  collapsed: boolean(),
  collapse_lines: pos_integer(),
  style: map(),
  theme: map()
}

Functions

broadcast(msg)

command(cmd)

mount(state)

Callback implementation for Raxol.UI.Components.Base.Component.mount/1.

schedule(msg, delay)

unmount(state)

Callback implementation for Raxol.UI.Components.Base.Component.unmount/1.

update(props, state)

Callback implementation for Raxol.UI.Components.Base.Component.update/2.