ChatConfig
ChatConfig is the configuration interface accepted by provideChat(). It defines global settings for chat composition components including the generative UI registry, avatar styling, and assistant naming.
Import:
Interface Definition
Properties
avatarLabel
A short string (typically one or two characters) displayed in the AI avatar badge that appears next to assistant messages in composition components.
Default: "A"
Example:
The avatar badge is a small square element styled with --chat-avatar-bg and --chat-avatar-text CSS variables.
assistantName
The display name for the AI assistant. Used in labels, ARIA attributes, and any place where the assistant needs a human-readable name.
Default: "Assistant"
Example:
Accessing ChatConfig at Runtime
Inject CHAT_CONFIG to read configuration values in your own components:
Type Location
The ChatConfig interface is defined in two files within the library:
libs/chat/src/lib/provide-chat.ts-- The canonical definition with JSDoc comments, alongside theprovideChat()function andCHAT_CONFIGtokenlibs/chat/src/lib/chat.types.ts-- A simplified re-export for internal use
The public API exports ChatConfig as a type-only export: