ChatMessageComponent

Provides role-specific message layout, projected controls, and citations for assistant messages.

import { ChatMessageComponent } from '@threadplane/angular/chat';

Declaration

export declare class ChatMessageComponent  {
  constructor();
  readonly bodyClass: import("@angular/core").Signal<"chat-message__bubble" | "chat-message__assistant-body" | "chat-message__plain">;
  readonly current: import("@angular/core").InputSignal<boolean>;
  readonly currentStr: import("@angular/core").Signal<string>;
  readonly message: import("@angular/core").InputSignal<Message | undefined>;
  readonly prevRole: import("@angular/core").InputSignal<ChatMessageRole | undefined>;
  readonly role: import("@angular/core").InputSignal<ChatMessageRole>;
  readonly speaker: import("@angular/core").InputSignal<string | undefined>;
  readonly streaming: import("@angular/core").InputSignal<boolean>;
  readonly streamingStr: import("@angular/core").Signal<string>;
}

Angular template API

Selector: chat-message

Inputs

current
boolean
message
Message | undefined
prevRole
ChatMessageRole | undefined
role · required
ChatMessageRole
speaker
string | undefined
streaming
boolean

Members

Constructor · overload 1

Constructs a new instance of the ChatMessageComponent class

constructor();

bodyClass

readonly bodyClass: import("@angular/core").Signal<"chat-message__bubble" | "chat-message__assistant-body" | "chat-message__plain">;

current

readonly current: import("@angular/core").InputSignal<boolean>;

currentStr

readonly currentStr: import("@angular/core").Signal<string>;

message

readonly message: import("@angular/core").InputSignal<Message | undefined>;

prevRole

readonly prevRole: import("@angular/core").InputSignal<ChatMessageRole | undefined>;

role

readonly role: import("@angular/core").InputSignal<ChatMessageRole>;

speaker

Speaker name read by assistive technology before the message, so a transcript says who said what. Visually hidden; the layout already shows it. Defaults to "You" for user and "Assistant" for assistant messages.

readonly speaker: import("@angular/core").InputSignal<string | undefined>;

streaming

readonly streaming: import("@angular/core").InputSignal<boolean>;

streamingStr

readonly streamingStr: import("@angular/core").Signal<string>;