ChatInterruptTemplateDirective
Registers an interrupt renderer on <chat>. While the agent has a pending
interrupt (agent.interrupts() lists one), the template renders at the
end of the transcript, inside the scroll region and after any run
activity, so approval cards and other human-in-the-loop UI sit in the
conversation. With no pending interrupt, or no template, nothing renders:
<chat> has no default interrupt UI.
Usage:
<chat [agent]="agent">
<ng-template chatInterruptTemplate let-agent let-interrupt="interrupt">
<my-approval-card
[interrupt]="interrupt"
(decide)="agent.resume?.([{ interruptId: interrupt.id, status: 'resolved', value: $event }])"
/>
</ng-template>
</chat>import { ChatInterruptTemplateDirective } from '@threadplane/angular/chat';Declaration
export declare class ChatInterruptTemplateDirective {
static ngTemplateContextGuard(_directive: ChatInterruptTemplateDirective, context: unknown): context is ChatInterruptTemplateContext;
readonly templateRef: TemplateRef<ChatInterruptTemplateContext>;
}Angular template API
Selector: ng-template[chatInterruptTemplate]
Members
ngTemplateContextGuard · overload 1
static ngTemplateContextGuard(_directive: ChatInterruptTemplateDirective, context: unknown): context is ChatInterruptTemplateContext;Parameters
_directive· requiredChatInterruptTemplateDirectivecontext· requiredunknown
Returns
context is ChatInterruptTemplateContexttemplateRef
readonly templateRef: TemplateRef<ChatInterruptTemplateContext>;