ChatToolCallTemplateDirective
ChatToolCallTemplateDirective registers a per-tool-name template inside <chat-tool-calls>. The primitive collects all directive instances and dispatches each tool call to the template matching its name. A literal "*" registers a wildcard catch-all for any unmapped name.
Selector: [chatToolCallTemplate]
Import:
#Template context
Each registered template receives:
| Variable | Type | Description |
|---|---|---|
let-call ($implicit) | ToolCall | The full tool call: {id, name, args, status, result?, error?} |
let-status="status" | ToolCallStatus | 'pending' | 'running' | 'complete' | 'error' |
#Examples
#Custom search-result card
#Wildcard catch-all
#Project through <chat> directly
<chat> re-projects any chatToolCallTemplate directive inside it down to the inner <chat-tool-calls>:
#Dispatch order
- Per-tool template whose
nameexactly matchestc.name. - Wildcard template with
name === "*". - Default
<chat-tool-call-card>(no template registered for either).