ChatA2uiRenderer

What <chat [a2ui]> takes: the component that renders the A2UI content of one assistant message. Build one with a2uiRenderer() from @threadplane/angular/a2ui.

The chat UI only recognizes A2UI content (a message that starts with ---a2ui_JSON---) and hands its source to this component, so an application that renders no A2UI bundles none of it. Without a renderer, A2UI content shows as its source text.

import type { ChatA2uiRenderer } from '@threadplane/angular/chat';

Declaration

export interface ChatA2uiRenderer  {
  readonly component: Type<unknown>;
  readonly options?: unknown;
}

Examples

import { a2uiRenderer } from '@threadplane/angular/a2ui';

protected readonly a2ui = a2uiRenderer();
// <chat [agent]="agent" [a2ui]="a2ui" />

Members

component

A standalone component that takes the ChatA2uiInputs inputs.

readonly component: Type<unknown>;

options

Passed unchanged to the component's options input.

readonly options?: unknown;