Skip to content

Chat Tool Calls

@astryxdesign/core v0.7.1 · ChatToolCalls

Props ​

PropTypeDefaultDescription
callsChatToolCallItem[]—Tool calls from one assistant turn. An empty array renders nothing. Required. Each item takes name, status, target, duration, node, additions, deletions, stats, errorMessage, key, resultDetail, and data.
labelstringlocalized call countSummary shown while a group is expanded.
isExpandedboolean—Controlled expanded state of the group, bound with v-model:is-expanded.
defaultIsExpandedbooleanfalseExpanded state used while isExpanded is unbound.

Events ​

  • expandedChange(isExpanded: boolean): fires with the state the header is asking for. v-model:is-expanded also emits update:isExpanded.

Slots ​

  • detail: rich detail for one call, receiving { call }. Falls back to call.resultDetail when omitted.

Exposed ​

  • element: the root element.

Types ​

ChatToolCallItem:

FieldTypeDescription
namestringTool or function name, shown in monospace. Required.
status'pending' | 'running' | 'complete' | 'error'Execution status. Omit it and the call is treated as complete.
targetstringWhat the tool acted on, such as a file path, a command, or a query.
durationstringExecution time shown on the trailing edge, such as 1.2s.
nodestringSandbox or worker name, shown as a neutral badge.
additionsnumberAdded lines or characters, rendered as +12.
deletionsnumberRemoved lines or characters, rendered as -3.
statsstringExtra plain text after the label.
errorMessagestringError detail when status is error. Spoken to assistive tech and used as the status icon's tooltip.
keystringStable identity. Derived from the other fields when omitted.
resultDetailstringInline detail revealed when the row is expanded, such as a diff or command output. Its presence makes the row expandable. Use the detail slot instead for rich markup.
detailstringAlias of resultDetail. resultDetail wins when both are set.
dataunknownArbitrary caller data kept on the item. Never rendered.