ChatComponent
Composes an agent conversation with message input, streaming content, tool views, and customizable activity templates.
Project [chatInputFooter] for composer help in both presentations, and
[chatFooterStatus] for application-owned status below the transcript composer.
import { ChatComponent } from '@threadplane/angular/chat';Declaration
export declare class ChatComponent {
constructor();
readonly a2ui: import("@angular/core").InputSignal<ChatA2uiRenderer | undefined>;
readonly activeThreadId: import("@angular/core").InputSignal<string>;
readonly activityTemplate: import("@angular/core").Signal<ChatActivityTemplateDirective | undefined>;
readonly agent: import("@angular/core").InputSignal<Agent>;
classifyMessage(content: string, message: Pick<Message, 'id' | 'delivery'>): ContentClassifier;
clearClassifiers(): void;
clearDraft(): void;
clearThread(): void;
readonly clientToolContinuationLimit: import("@angular/core").OutputEmitterRef<ClientToolContinuationLimitEvent>;
readonly clientToolContinuationPolicy: import("@angular/core").InputSignal<ClientToolContinuationPolicy | undefined>;
readonly clientToolExecutionGuard: import("@angular/core").InputSignal<ClientToolExecutionGuard | undefined>;
readonly clientTools: import("@angular/core").InputSignal<Readonly<Record<string, import("../../client-tools/tool-def").ClientToolDef>> | undefined>;
readonly excludedToolNames: import("@angular/core").Signal<readonly string[]>;
readonly genuiToolNames: import("@angular/core").InputSignal<readonly string[]>;
readonly groupRelatedTools: import("@angular/core").InputSignal<boolean>;
readonly handlers: import("@angular/core").InputSignal<Record<string, (params: Record<string, unknown>) => unknown | Promise<unknown>>>;
readonly interruptTemplate: import("@angular/core").Signal<ChatInterruptTemplateDirective | undefined>;
readonly messageContent: typeof messageContent;
readonly messageCopy: import("@angular/core").OutputEmitterRef<{
messageIndex: number;
content: string;
}>;
readonly modelOptions: import("@angular/core").InputSignal<readonly ChatSelectOption[]>;
readonly modelPickerPlaceholder: import("@angular/core").InputSignal<string>;
onA2uiAction(message: object): void;
onA2uiEvent(event: RenderEvent, messageIndex: number, surfaceId: string): void;
onCopy(message: unknown, content: string): void;
onRate(message: unknown, value: 'up' | 'down'): void;
onRegenerate(messageIndex: number): void;
onSpecEvent(event: RenderEvent, messageIndex: number): void;
readonly placeholder: import("@angular/core").InputSignal<string>;
prevRole(index: number): ChatMessageRole | undefined;
readonly rate: import("@angular/core").OutputEmitterRef<{
messageIndex: number;
rating: "up" | "down";
}>;
readonly regenerate: import("@angular/core").OutputEmitterRef<void>;
readonly renderEvent: import("@angular/core").OutputEmitterRef<ChatRenderEvent>;
readonly renderRegistry: import("@angular/core").Signal<import("@threadplane/angular/render").AngularRegistry | undefined>;
readonly resolvedStore: import("@angular/core").Signal<StateStore | undefined>;
readonly runActivityTemplate: import("@angular/core").Signal<ChatRunActivityTemplateDirective | undefined>;
scrollToBottom(): void;
readonly selectedModel: import("@angular/core").ModelSignal<string>;
readonly showModelPicker: import("@angular/core").InputSignal<boolean>;
readonly showWelcome: import("@angular/core").Signal<boolean>;
readonly store: import("@angular/core").InputSignal<StateStore | undefined>;
submitMessage(text: string): void;
readonly threads: import("@angular/core").InputSignal<Thread[]>;
readonly threadSelected: import("@angular/core").OutputEmitterRef<string>;
readonly toolCallTemplates: import("@angular/core").Signal<readonly ChatToolCallTemplateDirective[]>;
readonly toolLabel: import("@angular/core").InputSignal<((name: string, args?: unknown) => string | undefined) | undefined>;
readonly toolOutcome: import("@angular/core").InputSignal<((activity: ToolActivityInfo) => ToolActivityOutcome | undefined) | undefined>;
readonly toolResultTemplates: import("@angular/core").Signal<readonly ChatToolResultTemplateDirective[]>;
readonly toolRetry: import("@angular/core").OutputEmitterRef<ToolActivityInfo>;
readonly views: import("@angular/core").InputSignal<Readonly<Record<string, import("@angular/core").Type<unknown> | import("@threadplane/angular/render").RenderViewEntry>> | undefined>;
readonly viewToolNames: import("@angular/core").Signal<readonly string[]>;
readonly welcomeDisabled: import("@angular/core").InputSignal<boolean>;
}Angular template API
Selector: chat
Inputs
a2uiChatA2uiRenderer | undefinedactiveThreadIdstringagent· requiredAgentclientToolContinuationPolicyClientToolContinuationPolicy | undefinedclientToolExecutionGuardClientToolExecutionGuard | undefinedclientToolsReadonly<Record<string, ClientToolDef>> | undefinedgenuiToolNamesreadonly string[]groupRelatedToolsbooleanhandlersRecord<string, (params: Record<string, unknown>) => unknown>modelOptionsreadonly ChatSelectOption[]modelPickerPlaceholderstringplaceholderstringselectedModelstringshowModelPickerbooleanstoreStateStore | undefinedthreadsThread[]toolLabel((name: string, args?: unknown) => string | undefined) | undefinedtoolOutcome((activity: ToolActivityInfo) => ToolActivityOutcome | undefined) | undefinedviewsReadonly<Record<string, Type<unknown> | RenderViewEntry>> | undefinedwelcomeDisabledboolean
Outputs
clientToolContinuationLimitClientToolContinuationLimitEventmessageCopy{ messageIndex: number; content: string; }rate{ messageIndex: number; rating: "up" | "down"; }regeneratevoidrenderEventChatRenderEventselectedModelChangestringthreadSelectedstringtoolRetryToolActivityInfo
Members
Constructor · overload 1
Constructs a new instance of the ChatComponent class
constructor();a2ui
Renders A2UI content: a message that starts with ---a2ui_JSON---. Pass
a2uiRenderer() from @threadplane/angular/a2ui. Without it, that content
shows as text, and the chat UI bundles none of the A2UI code.
readonly a2ui: import("@angular/core").InputSignal<ChatA2uiRenderer | undefined>;activeThreadId
readonly activeThreadId: import("@angular/core").InputSignal<string>;activityTemplate
Optional per-message activity renderer projected as
<ng-template chatActivityTemplate>. When present it replaces the
reasoning pill and the tool-call region of every assistant message, and
takes precedence over any projected chatToolCallTemplate.
readonly activityTemplate: import("@angular/core").Signal<ChatActivityTemplateDirective | undefined>;agent
readonly agent: import("@angular/core").InputSignal<Agent>;classifyMessage · overload 1
classifyMessage(content: string, message: Pick<Message, 'id' | 'delivery'>): ContentClassifier;Parameters
content· requiredstringmessage· requiredPick<Message, 'id' | 'delivery'>
Returns
ContentClassifierclearClassifiers · overload 1
clearClassifiers(): void;Returns
voidclearDraft · overload 1
Clears the local composer after an application-owned conversation reset.
clearDraft(): void;Returns
voidclearThread · overload 1
Clears local view state (classifiers, surface store, lifecycle counters) for a new thread.
Resets messageCount to 0 and inputSubmittedAt to null. componentReady and firstMessageSent are NOT reset (sticky for the chat instance lifetime).
clearThread(): void;Returns
voidclientToolContinuationLimit
readonly clientToolContinuationLimit: import("@angular/core").OutputEmitterRef<ClientToolContinuationLimitEvent>;clientToolContinuationPolicy
readonly clientToolContinuationPolicy: import("@angular/core").InputSignal<ClientToolContinuationPolicy | undefined>;clientToolExecutionGuard
readonly clientToolExecutionGuard: import("@angular/core").InputSignal<ClientToolExecutionGuard | undefined>;clientTools
Client-declared tools (view/ask/function) the model may call. When
provided, a coordinator ships their catalog to the agent, runs function
tools in the browser, and renders/resolves view/ask tools through the
same tool-views pipeline as views. Additive — leave undefined for the
classic server-tools-only experience.
readonly clientTools: import("@angular/core").InputSignal<Readonly<Record<string, import("../../client-tools/tool-def").ClientToolDef>> | undefined>;excludedToolNames
Union of GenUI dispatcher tool names and registered view tool names.
readonly excludedToolNames: import("@angular/core").Signal<readonly string[]>;genuiToolNames
Tool names whose calls produce a rendered GenUI surface rather than visible text. Used to (a) filter <chat-tool-calls> so internal dispatchers don't render args JSON as cards, and (b) detect "this is a GenUI turn" for the building-UI skeleton. Default covers the canonical A2UI + json-render schema tools.
readonly genuiToolNames: import("@angular/core").InputSignal<readonly string[]>;groupRelatedTools
Group built-in tool rows across names per assistant message; false retains adjacent same-name grouping.
readonly groupRelatedTools: import("@angular/core").InputSignal<boolean>;handlers
readonly handlers: import("@angular/core").InputSignal<Record<string, (params: Record<string, unknown>) => unknown | Promise<unknown>>>;interruptTemplate
Optional interrupt renderer projected as
<ng-template chatInterruptTemplate>. Rendered at the end of the
transcript while agent.interrupts() lists a pending interrupt.
readonly interruptTemplate: import("@angular/core").Signal<ChatInterruptTemplateDirective | undefined>;messageContent
readonly messageContent: typeof messageContent;messageCopy
Emitted when the user copies an assistant message.
readonly messageCopy: import("@angular/core").OutputEmitterRef<{
messageIndex: number;
content: string;
}>;modelOptions
High-level model-picker API. When modelOptions is non-empty, the chat
composition renders a <chat-select> inside the input pill (in BOTH
welcome and conversation modes), wired to the two-way selectedModel
model. Consumers who want full control should leave modelOptions
empty and project a <chat-select chatInputModelSelect> themselves.
readonly modelOptions: import("@angular/core").InputSignal<readonly ChatSelectOption[]>;modelPickerPlaceholder
readonly modelPickerPlaceholder: import("@angular/core").InputSignal<string>;onA2uiAction · overload 1
onA2uiAction(message: object): void;Parameters
message· requiredobject
Returns
voidonA2uiEvent · overload 1
onA2uiEvent(event: RenderEvent, messageIndex: number, surfaceId: string): void;Parameters
event· requiredRenderEventmessageIndex· requirednumbersurfaceId· requiredstring
Returns
voidonCopy · overload 1
onCopy(message: unknown, content: string): void;Parameters
message· requiredunknowncontent· requiredstring
Returns
voidonRate · overload 1
onRate(message: unknown, value: 'up' | 'down'): void;Parameters
message· requiredunknownvalue· required'up' | 'down'
Returns
voidonRegenerate · overload 1
Regenerate the assistant response at the given message index, through
agent.regenerate(messageId). The control is offered only while the agent
has that command.
onRegenerate(messageIndex: number): void;Parameters
messageIndex· requirednumber
Returns
voidonSpecEvent · overload 1
onSpecEvent(event: RenderEvent, messageIndex: number): void;Parameters
event· requiredRenderEventmessageIndex· requirednumber
Returns
voidplaceholder
Placeholder shared by welcome and transcript composers.
readonly placeholder: import("@angular/core").InputSignal<string>;prevRole · overload 1
prevRole(index: number): ChatMessageRole | undefined;Parameters
index· requirednumber
Returns
ChatMessageRole | undefinedrate
Emitted when the user rates an assistant message.
readonly rate: import("@angular/core").OutputEmitterRef<{
messageIndex: number;
rating: "up" | "down";
}>;regenerate
Emitted when the user clicks the regenerate button on an assistant message.
readonly regenerate: import("@angular/core").OutputEmitterRef<void>;renderEvent
readonly renderEvent: import("@angular/core").OutputEmitterRef<ChatRenderEvent>;renderRegistry
readonly renderRegistry: import("@angular/core").Signal<import("@threadplane/angular/render").AngularRegistry | undefined>;resolvedStore
readonly resolvedStore: import("@angular/core").Signal<StateStore | undefined>;runActivityTemplate
Optional turn-level run renderer projected as
<ng-template chatRunActivityTemplate>. Rendered after the last message
while a run is active and has no assistant message yet, in place of the
typing indicator.
readonly runActivityTemplate: import("@angular/core").Signal<ChatRunActivityTemplateDirective | undefined>;scrollToBottom · overload 1
Scrolls the transcript to its newest content and re-pins it, exactly as the scroll-to-bottom bubble does. Hosts that apply many messages in one pass (a replay seeking to a recorded time, a restored thread rendered after tool views mount) call this once their layout has settled: the chat's own pin runs when messages change, which can be before the views that follow them have rendered. The write is counted as programmatic so the scroll event it raises does not read as the user unpinning.
scrollToBottom(): void;Returns
voidselectedModel
readonly selectedModel: import("@angular/core").ModelSignal<string>;showModelPicker
When false, hide the auto-rendered model picker even when
modelOptions is non-empty. Useful in cramped surfaces (popup,
sidebar) where the picker crowds the input. Defaults to true.
Has no effect when consumers project their own
<chat-select chatInputModelSelect> via content projection.
readonly showModelPicker: import("@angular/core").InputSignal<boolean>;showWelcome
readonly showWelcome: import("@angular/core").Signal<boolean>;store
readonly store: import("@angular/core").InputSignal<StateStore | undefined>;submitMessage · overload 1
Programmatic submit. Calls agent.submit({ message: text }) and updates
the CHAT_LIFECYCLE signals. Trimmed-empty text is a no-op.
submitMessage(text: string): void;Parameters
text· requiredstring
Returns
voidthreads
readonly threads: import("@angular/core").InputSignal<Thread[]>;threadSelected
readonly threadSelected: import("@angular/core").OutputEmitterRef<string>;toolCallTemplates
Per-tool-name templates projected as <ng-template chatToolCallTemplate>.
Collected here and passed to each message's <chat-tool-calls>, which
cannot query templates re-projected through <chat>. Unused while an
activityTemplate is present.
readonly toolCallTemplates: import("@angular/core").Signal<readonly ChatToolCallTemplateDirective[]>;toolLabel
App-authored readable labels; technical names remain in Details.
readonly toolLabel: import("@angular/core").InputSignal<((name: string, args?: unknown) => string | undefined) | undefined>;toolOutcome
App-authored confirmed outcome previews for default tool rendering; return status: 'failed' to show a completed call as failed.
readonly toolOutcome: import("@angular/core").InputSignal<((activity: ToolActivityInfo) => ToolActivityOutcome | undefined) | undefined>;toolResultTemplates
Per-tool-name result or action templates projected as
<ng-template chatToolResultTemplate>, forwarded like toolCallTemplates.
Unused while an activityTemplate is present.
readonly toolResultTemplates: import("@angular/core").Signal<readonly ChatToolResultTemplateDirective[]>;toolRetry
Emits the failed activity when a retry declared by toolOutcome is activated. The application owns what a retry does.
While one is offered, the error banner drops its generic Retry, which would re-send the whole request.
readonly toolRetry: import("@angular/core").OutputEmitterRef<ToolActivityInfo>;views
readonly views: import("@angular/core").InputSignal<Readonly<Record<string, import("@angular/core").Type<unknown> | import("@threadplane/angular/render").RenderViewEntry>> | undefined>;viewToolNames
Tool names that have a registered view (keys of the effective view registry, including client-declared view/ask tools). These render as inline tool-views and are excluded from the default tool-call card so they don't render twice.
readonly viewToolNames: import("@angular/core").Signal<readonly string[]>;welcomeDisabled
readonly welcomeDisabled: import("@angular/core").InputSignal<boolean>;