ChatToolResultTemplateDirective
Registers an app-owned result or action template for default tool rows.
The template renders outside the technical Details, once per matching
call, with the resolved ToolActivityInfo. A literal "" matches any tool
name without a specific template; a name match wins over "". Tools that
have a chatToolCallTemplate keep that full replacement, and result
templates do not apply to them. Name the call in any control, because a
bare "Retry" below a collapsed group does not say which call it acts on.
<chat [agent]="agent">
<ng-template chatToolResultTemplate="read_reference" let-activity>
@if (activity.phase === 'error') {
<button type="button" (click)="retryRead(activity.id)">Retry reference read</button>
}
</ng-template>
</chat>import { ChatToolResultTemplateDirective } from '@threadplane/chat';Declaration
export declare class ChatToolResultTemplateDirective {
readonly name: import("@angular/core").InputSignal<string>;
static ngTemplateContextGuard(_directive: ChatToolResultTemplateDirective, _context: unknown): _context is ChatToolResultTemplateContext;
readonly templateRef: TemplateRef<ChatToolResultTemplateContext>;
}Angular template API
Selector: ng-template[chatToolResultTemplate]
Inputs
chatToolResultTemplate· requiredstringProperty:name
Members
name
The tool name this template handles, or "*" for the wildcard.
readonly name: import("@angular/core").InputSignal<string>;ngTemplateContextGuard · overload 1
static ngTemplateContextGuard(_directive: ChatToolResultTemplateDirective, _context: unknown): _context is ChatToolResultTemplateContext;Parameters
_directive· requiredChatToolResultTemplateDirective_context· requiredunknown
Returns
_context is ChatToolResultTemplateContexttemplateRef
readonly templateRef: TemplateRef<ChatToolResultTemplateContext>;