Chat Tool Calls
@astryxdesign/core v0.7.1 · ChatToolCalls
Props
| Prop | Type | Default | Description |
|---|---|---|---|
calls | ChatToolCallItem[] | — | 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. |
label | string | localized call count | Summary shown while a group is expanded. |
isExpanded | boolean | — | Controlled expanded state of the group, bound with v-model:is-expanded. |
defaultIsExpanded | boolean | false | Expanded state used while isExpanded is unbound. |
Events
expandedChange(isExpanded: boolean): fires with the state the header is asking for.v-model:is-expandedalso emitsupdate:isExpanded.
Slots
detail: rich detail for one call, receiving{ call }. Falls back tocall.resultDetailwhen omitted.
Exposed
element: the root element.
Types
ChatToolCallItem:
| Field | Type | Description |
|---|---|---|
name | string | Tool or function name, shown in monospace. Required. |
status | 'pending' | 'running' | 'complete' | 'error' | Execution status. Omit it and the call is treated as complete. |
target | string | What the tool acted on, such as a file path, a command, or a query. |
duration | string | Execution time shown on the trailing edge, such as 1.2s. |
node | string | Sandbox or worker name, shown as a neutral badge. |
additions | number | Added lines or characters, rendered as +12. |
deletions | number | Removed lines or characters, rendered as -3. |
stats | string | Extra plain text after the label. |
errorMessage | string | Error detail when status is error. Spoken to assistive tech and used as the status icon's tooltip. |
key | string | Stable identity. Derived from the other fields when omitted. |
resultDetail | string | Inline 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. |
detail | string | Alias of resultDetail. resultDetail wins when both are set. |
data | unknown | Arbitrary caller data kept on the item. Never rendered. |