Skip to content

ToolRenderer

Defined in: react/components/agent/tool-render.tsx:32

How to render a particular tool’s request and result. Every field is optional — supply only what your tool needs. The header (name + args) comes from the ToolCall card; a renderer fills the icon, collapsed summary, and the expandable body.

optional accent?: Partial<MessageAccent>

Defined in: react/components/agent/tool-render.tsx:36

Optional one-sided accent bar around the card.


optional icon?: ReactNode

Defined in: react/components/agent/tool-render.tsx:34

Leading icon for the card header.


optional renderBody?: (ctx) => ReactNode

Defined in: react/components/agent/tool-render.tsx:40

The expandable result body.

ToolRenderContext

ReactNode


optional summary?: (ctx) => string | undefined

Defined in: react/components/agent/tool-render.tsx:38

One-line collapsed summary (e.g. "exit 0", "+42 −3").

ToolRenderContext

string | undefined