import * as _angular_core from '@angular/core'; import { TemplateRef, Signal, AfterContentInit, OnDestroy, AfterViewInit, ElementRef, InjectionToken, isSignal } from '@angular/core'; import * as _siemens_element_ng_menu from '@siemens/element-ng/menu'; import { MenuItemAction } from '@siemens/element-ng/menu'; import { TranslatableString } from '@siemens/element-translate-ng/translate-types'; import * as _siemens_element_translate_ng_translate from '@siemens/element-translate-ng/translate'; import { TranslatableString as TranslatableString$1 } from '@siemens/element-translate-ng/translate'; import { SiModalService } from '@siemens/element-ng/modal'; import { SourceReference } from '@siemens/element-ng/source-chip'; import { FileUploadError, UploadFile } from '@siemens/element-ng/file-uploader'; import * as i1 from '@siemens/element-ng/resize-observer'; import { BackgroundColorVariant } from '@siemens/element-ng/common'; import { SiMarkdownOptions } from '@siemens/element-ng/markdown'; /** * Attachment item interface for file attachments in chat messages, used by {@link SiAttachmentListComponent} and inside {@link SiUserMessageComponent} as well as {@link SiChatInputComponent}. * * @see {@link SiAttachmentListComponent} for the attachment list component * @see {@link SiUserMessageComponent} for the user message * @see {@link SiChatInputComponent} for the chat input component * * @experimental */ interface Attachment { /** File name */ name: string; /** Optionally show a preview of the attachment by providing a template that is shown in a modal when clicked (optional) */ previewTemplate?: TemplateRef | (() => TemplateRef); } /** * Attachment list component for displaying file attachments in chat messages. * * This component renders a list of file attachments with icons, names, and optional * preview and remove functionality. It's designed to work with chat message components * to show files that have been uploaded or shared in conversations. * * This component provides: * - A list of pills showing each attachment's name and an icon * - Optional preview modal for attachments * - Optional remove functionality for editable messages * * The component is included within {@link SiUserMessageComponent}, {@link SiAiMessageComponent} and {@link SiChatInputComponent} but can also be used inside custom chat messages with {@link SiChatMessageComponent} * * @see {@link SiUserMessageComponent} for user message display * @see {@link SiAiMessageComponent} for AI message display * @see {@link SiChatMessageComponent} for custom chat message display * @see {@link SiChatInputComponent} for chat input with attachment support * @see {@link Attachment} for attachment data structure * * @experimental */ declare class SiAttachmentListComponent { protected modalService: SiModalService; protected readonly icons: Record<"elementStateClose" | "elementDocument", string>; /** * List of attachments to display * @defaultValue [] */ readonly attachments: _angular_core.InputSignal; /** * Whether to align attachments to the end (right) or start (left) * @defaultValue 'start' */ readonly alignment: _angular_core.InputSignal<"start" | "end">; /** * Whether to show remove buttons on attachments * @defaultValue false */ readonly removable: _angular_core.InputSignalWithTransform; /** * Label for remove attachment button. * The attachment name is available with `{{attachment}}`. * * @defaultValue * ``` * t(() => $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove {{attachment}}`) * ``` */ readonly removeLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** * Emitted when an attachment should be removed */ readonly remove: _angular_core.OutputEmitterRef; private getPreviewTemplate; protected openPreview(event: Event, attachment: Attachment): void; protected getFileIcon(name: string): string; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Copyright (c) Siemens 2016 - 2026 * SPDX-License-Identifier: MIT */ type ActivityDetailsDisplay = 'auto' | 'inputs' | 'outputs' | 'both'; /** * Base interface for all chat messages. Messages can be rendered either with content * or with a custom template for advanced styling and functionality. * * @see {@link ChatMessage} for the chat message type union * @see {@link UserChatMessage} for user messages * @see {@link AiChatMessage} for AI messages * @see {@link TemplateChatMessage} for template-based messages * * @experimental */ interface BaseChatMessage { /** Type of message */ type: 'user' | 'ai'; /** Message content - can be a string or a Signal, empty string shows loading state */ content?: string | Signal; /** Whether the message is currently loading/being generated - can be a boolean or Signal */ loading?: boolean | Signal; } /** * User chat message for AI chats * * @see {@link SiAiChatComponent} for the AI chat container where this is used * * @experimental */ interface UserChatMessage extends BaseChatMessage { /** Type of message */ type: 'user'; /** Message content, should be a string, empty string shows loading state */ content: string; /** Attachments (for user messages) */ attachments?: Attachment[]; /** Actions available for this message */ actions?: MenuItemAction[]; } /** * AI chat message * * @see {@link SiAiChatComponent} for the AI chat container where this is used * * @experimental */ interface AiChatMessage extends BaseChatMessage { /** Type of message */ type: 'ai'; /** Message content - can be a string or a Signal, empty string shows loading state, set signal back to string to end "streaming" state */ content: string | Signal; /** Actions available for this message */ actions?: MenuItemAction[]; } /** Progress or intermediate activity shown between chat messages. */ interface ActivityChatMessage { type: 'activity'; /** Activity name. Defaults to the reasoning label for content-only activities. */ name?: TranslatableString; /** Activity inputs. Record entries are rendered as individual message parts. */ input?: string | string[] | Record; /** Label for the input arguments section. */ inputArgumentsLabel?: TranslatableString; /** Output from the activity. */ output?: string; /** Label for the output section. */ outputLabel?: TranslatableString; /** Reasoning content rendered directly in the activity. */ content?: string | Signal; /** Whether the activity is still running. */ loading?: boolean | Signal; /** Alternative icon. Set to false to show the generic activity marker. */ icon?: string | false; /** Nested activities. */ messages?: ActivityChatMessage[]; /** Overrides automatic expansion for this activity. */ autoExpand?: boolean; /** Overrides automatic input expansion. Record keys can be selected individually. */ autoExpandInputs?: boolean | string[]; /** Overrides automatic output expansion. */ autoExpandOutputs?: boolean; } /** * Related activities grouped under a shared collapsible heading. * The latest trace stays expanded until a user message follows it. */ interface ActivityTraceChatMessage { type: 'activity-trace'; /** Activity trace name. */ name: TranslatableString; /** Activities in execution order. */ messages: ActivityChatMessage[]; /** Overrides automatic expansion for this trace. */ autoExpand?: boolean; } /** * Render custom chat message via template, consider using {@link SiChatMessageComponent} inside the template for consistent styling * * @see {@link SiAiChatComponent} for the AI chat container where this is used * @see {@link SiChatMessageComponent} for the chat message wrapper component which can be used inside the template * * @experimental */ interface TemplateChatMessage { /** * Template to render the message */ template: TemplateRef; /** Context data to pass to the template */ templateContext?: any; } /** * Chat message type union of all supported message types in the AI chat container. * * @see {@link UserChatMessage} for user messages * @see {@link AiChatMessage} for AI messages * @see {@link ActivityChatMessage} for individual activities * @see {@link ActivityTraceChatMessage} for grouped activities * @see {@link TemplateChatMessage} for template-based messages * @see {@link BaseChatMessage} for the base chat message interface * @see {@link SiAiChatComponent} for the AI chat container where this is used * * @experimental */ type ChatMessage = UserChatMessage | AiChatMessage | ActivityChatMessage | ActivityTraceChatMessage | TemplateChatMessage; /** * AI message component for displaying AI-generated responses in conversational interfaces. * * The AI message component renders AI-generated content in chat interfaces, * supporting text, loading states, and contextual actions. * It appears as text (no bubble) aligned to the left side without any avatar/icon slot. * Can be used within {@link SiChatContainerComponent}. * * The component automatically handles: * - Styling for AI messages distinct from user or generic chat messages * - Showing loading states with skeleton UI during generation * - Displaying primary and secondary actions * * @see {@link SiChatMessageComponent} for the base message wrapper component * @see {@link SiUserMessageComponent} for the user message component * @see {@link SiChatContainerComponent} for the chat container to use this within * * @experimental */ declare class SiAiMessageComponent { /** * The AI-generated message content * @defaultValue '' */ readonly content: _angular_core.InputSignal; /** * Whether the message is currently being generated (shows skeleton) * @defaultValue false */ readonly loading: _angular_core.InputSignalWithTransform; /** * Primary actions available for this message (thumbs up/down, copy, retry, etc.) * All actions displayed inline * @defaultValue [] */ readonly actions: _angular_core.InputSignal; /** * Secondary actions available in dropdown menu, first use primary actions and only add secondary actions additionally * @defaultValue [] */ readonly secondaryActions: _angular_core.InputSignal; /** Parameter to pass to action handlers */ readonly actionParam: _angular_core.InputSignal; /** Source references */ readonly sources: _angular_core.InputSignal; /** * More actions button aria label * * @defaultValue * ``` * t(() => $localize`:@@SI_AI_MESSAGE.SECONDARY_ACTIONS:Additional actions`) * ``` */ readonly secondaryActionsLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; /** Emitted when a source has been clicked. */ readonly sourceClicked: _angular_core.OutputEmitterRef; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Collapsible activity message for displaying progress and intermediate steps in a chat. * * @experimental */ declare class SiActivityMessageComponent { /** Activity heading. */ readonly heading: _angular_core.InputSignal; /** Activity icon. */ readonly icon: _angular_core.InputSignal; /** Current state of the activity. */ readonly state: _angular_core.InputSignal<"running" | "failed" | undefined>; /** * Whether the activity details are expanded. * * @defaultValue false */ readonly expanded: _angular_core.ModelSignal; protected readonly icons: Record<"elementRight2" | "elementCircleFilled" | "elementIssue", string>; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Titled content part for use inside an activity message. * * @experimental */ declare class SiActivityMessagePartComponent { /** Part heading. */ readonly heading: _angular_core.InputSignal; /** * Whether the part can be collapsed and expanded. * * @defaultValue false */ readonly collapsible: _angular_core.InputSignalWithTransform; /** * Whether collapsible content is expanded. * * @defaultValue true */ readonly expanded: _angular_core.ModelSignal; protected readonly icons: Record<"elementRight2" | "elementCircleFilled", string>; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Collapsible container for grouping multiple activity messages. * * @experimental */ declare class SiActivityTraceComponent { /** Trace heading. */ readonly heading: _angular_core.InputSignal; /** * Whether the trace content is expanded. * * @defaultValue false */ readonly expanded: _angular_core.ModelSignal; protected readonly icons: Record<"elementRight2", string>; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * A declarative container component for displaying a chat interface with automatic scroll-to-bottom behavior. * * This component provides the layout and styling for a chat interface, managing scrolling behavior * to keep the newest messages visible while respecting user scrolling actions. It automatically * scrolls to the bottom when new content is added, unless the user has scrolled up to view older messages. * * Use via content projection: * - Default content: Chat messages displayed in the scrollable messages container or a welcome screen (empty state). * - `si-inline-notification` selector: Notification component displayed above the input area * - `si-chat-input` or `[siChatContainerInput]` selector: Input controls for composing messages * * @see {@link SiChatInputComponent} for the chat input wrapper component * @see {@link SiChatContainerInputDirective} for other input controls to slot in * @see {@link SiAiMessageComponent} for AI messages to slot in * @see {@link SiUserMessageComponent} for user messages (in AI chats) to slot in * @see {@link SiChatMessageComponent} for the chat message wrapper component to slot in other messages * * @experimental */ declare class SiChatContainerComponent implements AfterContentInit, OnDestroy { private readonly messagesContainer; private readonly platformId; private isUserAtBottom; private scrollTimeout; private lastScrollTime; private pendingScroll; private scrollDebounceMs; private resizeObserver; private contentObserver; /** * The color variant to apply to the container. * @defaultValue 'base-0' */ readonly colorVariant: _angular_core.InputSignal; /** * Disables automatic scrolling to the bottom when new content is added. * @defaultValue false */ readonly noAutoScroll: _angular_core.InputSignalWithTransform; constructor(); ngAfterContentInit(): void; ngOnDestroy(): void; private scrollToBottomDuringStreaming; private debouncedScrollToBottom; private setupResizeObserver; private setupContentObserver; private checkIfUserAtBottom; protected onScroll(): void; /** * Scrolls to the bottom of the messages container immediately. * This method forces a scroll even if the user has scrolled up. */ scrollToBottom(): void; /** * Scrolls to the top of the messages container immediately. */ scrollToTop(): void; /** * Focuses the messages container element. */ focus(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * A directive to mark elements as input controls within a {@link SiChatContainerComponent}. * * This directive is used to identify and style input elements that belong to * the chat container component, typically applied to form inputs or textareas * used for composing chat messages. * * @example * ```html * * Hello! * How are you? * * * * ``` * * @see {@link SiChatContainerComponent} for the chat container wrapper component * * @experimental */ declare class SiChatContainerInputDirective { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Attachment item interface for file attachments in chat messages, extension of {@link Attachment} for {@link SiAttachmentListComponent} to use within {@link SiChatInputComponent}. * Adds the action file information. * Can be used within {@link SiChatContainerComponent}. * * @see {@link Attachment} for base attachment interface * @see {@link SiAttachmentListComponent} for the attachment list component * @see {@link SiChatInputComponent} for the chat input component * @see {@link SiChatContainerComponent} for the base chat container component where this can be used * @see {@link SiAiChatComponent} for the AI chat container where this needs to be used * * @experimental */ interface ChatInputAttachment extends Attachment { /** File object */ file: File; /** File size in bytes */ size: number; /** MIME type */ type: string; } /** * Chat input component for composing and sending messages in conversational interfaces. * * The chat input component provides a text area for users to compose messages, * supporting text, attachments, and contextual actions. It appears as a textarea * with buttons for adding attachments and sending messages, as well as an optional disclaimer. * * The component automatically handles: * - Styling for chat input and actions. * - Dynamic resizing of the textarea based on content. * - Uploading of and displaying of attachments above the input area. * - Displaying primary and secondary actions. * * Additionally to the inputs and outputs documented here, the component supports content projection via the following slots: * * - Default content: Custom action buttons to display inline, prefer using the `actions` input for buttons, can be used in addition. * - `siChatInputDisclaimer` selector: Custom disclaimer content to display below the input area, prefer using the `disclaimer` input for simple text disclaimers. * * @see {@link SiAttachmentListComponent} for the base attachment component * @see {@link SiChatInputDisclaimerDirective} to slot in custom disclaimer content * * @experimental */ declare class SiChatInputComponent implements AfterViewInit { private static idCounter; private readonly textInput; private readonly fileUploadDirective; protected readonly fileInput: _angular_core.Signal | undefined>; protected readonly icons: Record<"elementAttachment" | "elementPlus" | "elementSendFilled" | "elementStopFilled", string>; private readonly parent; constructor(); /** * Current input value * @defaultValue '' */ readonly value: _angular_core.ModelSignal; /** * Placeholder text for the input * * @defaultValue * ``` * t(() => $localize`:@@SI_CHAT_INPUT.PLACEHOLDER:Enter a message…`) * ``` */ readonly placeholder: _angular_core.InputSignal; /** * Whether the input is disabled * @defaultValue false */ readonly disabled: _angular_core.InputSignalWithTransform; /** * Whether a message is currently being sent, also prevent the sending of new ones while still allowing the user to type * @defaultValue false */ readonly sending: _angular_core.ModelSignal; /** * Whether the input supports interrupting ongoing operations. When active, * the send button transforms into an interrupt button (with element-stop-filled icon). * If sending is true, the interrupt button will be disabled. * @defaultValue false */ readonly interruptible: _angular_core.ModelSignal; /** * Maximum number of characters allowed */ readonly maxLength: _angular_core.InputSignal; /** * A disclaimer to display. * * If not provided, the component will look for projected content with the `siChatInputDisclaimer` directive. * If both are empty, no disclaimer section will be shown (handled via CSS :empty). */ readonly disclaimer: _angular_core.InputSignal; /** * Primary actions available in the input. Provide at most one action. * @defaultValue [] */ readonly actions: _angular_core.InputSignal; /** * Secondary actions available in dropdown menu * @defaultValue [] */ readonly secondaryActions: _angular_core.InputSignal; /** * Whether file attachments are supported * @defaultValue false */ readonly allowAttachments: _angular_core.InputSignal; /** * Accepted file types for attachments (as accept string) * @defaultValue undefined */ readonly accept: _angular_core.InputSignal; /** * Maximum file size in bytes * @defaultValue 10485760 (10MB) */ readonly maxFileSize: _angular_core.InputSignal; /** * Current attachments * @defaultValue [] */ readonly attachments: _angular_core.ModelSignal; /** * The label for the input, used for accessibility * @defaultValue * ``` * t(() => $localize`:@@SI_CHAT_INPUT.LABEL:Chat input`) * ``` */ readonly label: _angular_core.InputSignal; /** Parameter to pass to action handlers */ readonly actionParam: _angular_core.InputSignal; /** * Send button label * * @defaultValue * ``` * t(() => $localize`:@@SI_CHAT_INPUT.SEND:Send`) * ``` */ readonly sendButtonLabel: _angular_core.InputSignal; /** * Send button icon * * @defaultValue this.icons.elementSendFilled */ readonly sendButtonIcon: _angular_core.InputSignal; /** * Interrupt button label * * @defaultValue * ``` * t(() => $localize`:@@SI_CHAT_INPUT.INTERRUPT:Stop processing`) * ``` */ readonly interruptButtonLabel: _angular_core.InputSignal; /** * Auto-focus the input on component initialization * @defaultValue false */ readonly autoFocus: _angular_core.InputSignalWithTransform; /** * Attach file button aria label * * @defaultValue * ``` * t(() => $localize`:@@SI_CHAT_INPUT.ATTACH_FILE:Attach file`) * ``` */ readonly attachFileLabel: _angular_core.InputSignal; /** * Remove attachment aria label. * The attachment name is available with `{{attachment}}`. * * @defaultValue * ``` * t(() => $localize`:@@SI_ATTACHMENT_LIST.REMOVE_ATTACHMENT:Remove {{attachment}}`) * ``` */ readonly removeAttachmentLabel: _angular_core.InputSignal; /** * More actions button aria label * * @defaultValue * ``` * t(() => $localize`:@@SI_CHAT_INPUT.SECONDARY_ACTIONS:Additional actions`) * ``` */ readonly secondaryActionsLabel: _angular_core.InputSignal; /** * Suggested follow-up prompts to display as pill buttons above the chat input. * Use `followUpPromptSelected` to handle selection and update the input value. * Typically populated from AI response data and cleared after selection or on send. * @defaultValue [] */ readonly followUpPrompts: _angular_core.InputSignal; /** * Emitted when the user selects a follow-up prompt. * The emitted value is the text of the selected prompt. */ readonly followUpPromptSelected: _angular_core.OutputEmitterRef; /** * Emitted when the user wants to send a message */ readonly send: _angular_core.OutputEmitterRef<{ content: string; attachments: ChatInputAttachment[]; }>; /** * Emitted when the user wants to interrupt the current operation */ readonly interrupt: _angular_core.OutputEmitterRef; /** * Emitted when file upload errors occur */ readonly fileError: _angular_core.OutputEmitterRef; protected readonly id: string; protected readonly hasContent: _angular_core.Signal; protected readonly hasAttachments: _angular_core.Signal; protected readonly hasActions: _angular_core.Signal; protected readonly hasSecondaryActions: _angular_core.Signal; protected readonly combinedMenuActions: _angular_core.Signal; protected readonly hasMenuActions: _angular_core.Signal; protected triggerFileInput(): void; protected readonly canSend: _angular_core.Signal; protected readonly showInterruptButton: _angular_core.Signal; protected readonly buttonDisabled: _angular_core.Signal; protected readonly buttonIcon: _angular_core.Signal; protected readonly buttonLabel: _angular_core.Signal; protected readonly dragOver: _angular_core.WritableSignal; private readonly menuActionService; protected runAction(action: MenuItemAction): void; protected selectFollowUpPrompt(prompt: string): void; protected onSend(): void; protected onButtonClick(): void; protected onKeyDown(event: KeyboardEvent): void; protected onInput(event: Event): void; protected onFilesAdded(uploadFiles: UploadFile[]): void; protected onFileError(error: FileUploadError): void; protected removeAttachment(attachment: Attachment): void; protected onContainerClick(event: Event): void; ngAfterViewInit(): void; /** * Focus the textarea input */ focus(): void; protected dropHandler(event: DragEvent): void; protected dragOverHandler(event: DragEvent): void; private setTextareaHeight; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Copyright (c) Siemens 2016 - 2026 * SPDX-License-Identifier: MIT */ /** * Parent contract used by {@link SiChatInputComponent} when it is projected into a chat container. */ interface SiChatInputParent { readonly inputSending: Signal; readonly inputInterruptible: Signal; onInputSend(): void; } /** * Optional parent contract for {@link SiChatInputComponent}. */ declare const SI_CHAT_INPUT_PARENT: InjectionToken; /** * Directive to mark content as chat input disclaimer into {@link SiChatInputComponent}. * Apply this directive to content that should be slotted into the disclaimer area. * * @example * ```html * *
* Custom disclaimer content *
*
* ``` * * @see {@link SiChatInputComponent} for the chat input wrapper component * * @experimental */ declare class SiChatInputDisclaimerDirective { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Directive to mark content as chat message actions into {@link SiChatMessageComponent}. * Apply this directive to e.g. buttons that should be slotted into the message actions area. * * @example * ```html * * Message content * * * * ``` * * @see {@link SiChatMessageComponent} for the chat message wrapper component * * @experimental */ declare class SiChatMessageActionDirective { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Shared action controls for user and AI messages. * * Pass the pre-split primary and secondary actions to this component. * * @experimental */ declare class SiChatMessageActionsComponent { private readonly menuActionService; protected readonly icons: Record<"elementOptionsVertical", string>; /** Primary message actions displayed inline. * @defaultValue [] */ readonly actions: _angular_core.InputSignal; /** Secondary actions displayed in the menu. * @defaultValue [] */ readonly secondaryActions: _angular_core.InputSignal; /** Parameter passed to action handlers. */ readonly actionParam: _angular_core.InputSignal; /** More actions button aria label. * @defaultValue * ``` * t(() => $localize`:@@SI_CHAT_MESSAGE_ACTIONS.SECONDARY_ACTIONS:Additional actions`) * ``` */ readonly secondaryActionsLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; protected runAction(action: MenuItemAction): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Base declarative chat message component that provides the layout structure for chat messages. * * This component handles the core message layout including avatar positioning, loading states, * and action button as well as attachment list placement. It serves as the foundation for more specialized message components * like {@link SiUserMessageComponent} and {@link SiAiMessageComponent}. * Can be used within {@link SiChatContainerComponent}. * * The component provides: * - Flexible alignment (start/end) for different message types * - Avatar/icon slot for message attribution * - Loading state with skeleton UI * - Action buttons positioned on the side or bottom * - Attachment list display slot * - Responsive behavior that adapts to container size * * This is a low-level component designed for slotting in custom content, it provides slots via content projection: * - Default content: Main message content area (consider using `si-markdown` for markdown support) * - `si-avatar/si-icon/img` selector: Avatar or icon representing the message sender * - `si-chat-message-action` selector: Action buttons related to the message * - `si-attachment-list` selector: Attachment list component for displaying file attachments * * @see {@link SiUserMessageComponent} for user message display * @see {@link SiAiMessageComponent} for AI message display * @see {@link SiAttachmentListComponent} for attachment list to slot in * @see {@link SiChatMessageActionDirective} for action buttons to slot in * @see {@link SiChatContainerComponent} for the chat container to use this within * * @experimental */ declare class SiChatMessageComponent { /** * Whether the message is currently loading * @defaultValue false */ readonly loading: _angular_core.InputSignal; /** * Alignment of the message * @defaultValue 'start' */ readonly alignment: _angular_core.InputSignal<"start" | "end">; /** * Where to display action buttons (if any) * @defaultValue 'side' */ readonly actionsPosition: _angular_core.InputSignal<"bottom" | "side">; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * User message component for displaying the user's messages in conversational interfaces. * * The user message component renders user-submitted content in (AI) chat interfaces, * supporting text, attachments, and contextual actions. It appears as a text bubble * aligned to the right side. * Can be used within {@link SiChatContainerComponent}. * * The component automatically handles: * - Styling for user messages distinct from AI or generic chat messages * - Displaying attachments above the message bubble * - Displaying primary and secondary actions * * @see {@link SiChatMessageComponent} for the base message wrapper component * @see {@link SiAiMessageComponent} for the AI message component * @see {@link SiAttachmentListComponent} for the base attachment component * @see {@link SiChatContainerComponent} for the chat container to use this within * * @experimental */ declare class SiUserMessageComponent { /** * The user message content * @defaultValue '' */ readonly content: _angular_core.InputSignal; /** * Primary message actions (edit, delete, copy, etc.). * All actions displayed inline * @defaultValue [] */ readonly actions: _angular_core.InputSignal; /** * Secondary actions available in dropdown menu, first use primary actions and only add secondary actions additionally * @defaultValue [] */ readonly secondaryActions: _angular_core.InputSignal; /** * List of attachments included with this message * @defaultValue [] */ readonly attachments: _angular_core.InputSignal; /** Parameter to pass to action handlers */ readonly actionParam: _angular_core.InputSignal; /** * More actions button aria label * * @defaultValue * ``` * t(() => $localize`:@@SI_USER_MESSAGE.SECONDARY_ACTIONS:Additional actions`) * ``` */ readonly secondaryActionsLabel: _angular_core.InputSignal<_siemens_element_translate_ng_translate.TranslatableString>; protected readonly hasAttachments: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface PromptCategory { label: TranslatableString$1; } interface PromptSuggestion { text: TranslatableString$1; } /** * AI welcome screen component for displaying initial state in AI chat interfaces. * * The AI welcome screen component provides an engaging initial state for AI chat interfaces, * featuring a welcome message, optional prompt categories for filtering, and suggested prompts * that users can click to start conversations. * * The component includes: * - Welcome header with AI branding and customizable greeting * - Optional category pills for filtering prompt suggestions * - Clickable prompt suggestion cards * - Optional refresh button to regenerate suggestions * * @see {@link SiAiChatComponent} for the AI chat container which uses this component * @see {@link SiChatContainerComponent} for the base chat container * * @experimental */ declare class SiAiWelcomeScreenComponent { /** * The list of prompt categories * @defaultValue [] */ readonly categories: _angular_core.InputSignal; /** * The currently selected category ID * @defaultValue undefined */ readonly selectedCategory: _angular_core.ModelSignal; /** * The list of prompt suggestions as an array, update this when the selected category changes. * @defaultValue [] */ readonly promptSuggestions: _angular_core.InputSignal; /** * Emitted when a prompt suggestion is clicked */ readonly promptSelected: _angular_core.OutputEmitterRef; protected onCategoryClick(categoryLabel: string): void; protected onPromptClick(suggestion: PromptSuggestion): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface ActivityInputPart { content?: string; heading: TranslatableString$1; key?: string; } /** * A model-driven chat container component for displaying an AI chat interface with automatic scroll-to-bottom behavior. * * This component provides an AI chat interface, managing scrolling behavior * to keep the newest messages visible while respecting user scrolling actions. It automatically * scrolls to the bottom when new content is added, unless the user has scrolled up to view older messages. * * Required content projection: * - `si-chat-input`: Input controls for composing messages * * @see {@link ChatMessage} for the chat message model * @see {@link AiChatMessage} for the AI chat message model * @see {@link UserChatMessage} for the user chat message model * @see {@link TemplateChatMessage} for the template chat message model * @see {@link SiChatInputComponent} for the chat input component * @see {@link SiChatContainerComponent} for the base chat container component * @see {@link SiAiMessageComponent} for the used AI message component * @see {@link SiUserMessageComponent} for the used user message component * @see {@link SiChatMessageComponent} for the base wrapper chat message component used by AI and user message components * * @experimental */ declare class SiAiChatComponent implements SiChatInputParent { private readonly chatInput; private readonly chatContainer; constructor(); /** * List of chat messages to display. Messages can contain either content (string) * or a template (TemplateRef) for custom rendering. When both content and template * are provided, the template takes precedence. */ readonly messages: _angular_core.InputSignal; /** * Whether the latest activity details are expanded automatically. * @defaultValue true */ readonly autoExpand: _angular_core.InputSignalWithTransform; /** * Which activity input and output parts are shown. * @defaultValue 'auto' */ readonly show: _angular_core.InputSignal; /** * Whether a message is currently being sent, disables input and shows a loading state in the input area. * If you want to show a loading state for the latest AI message, set {@link loading} to true instead. * @defaultValue false */ readonly sending: _angular_core.InputSignalWithTransform; /** * Whether a pending loading AI message should be shown (e.g. while waiting for response). * If you also want to prevent the user from sending new messages, set {@link sending} to true as well. * @defaultValue false */ readonly loading: _angular_core.InputSignalWithTransform; /** * Whether to disable the interrupt functionality * @defaultValue false */ readonly disableInterrupt: _angular_core.InputSignalWithTransform; /** * Whether the system is currently interrupting an operation. When true, * forces interruptible mode and shows sending state on the input. * @defaultValue false */ readonly interrupting: _angular_core.InputSignalWithTransform; /** * Disable auto-scroll to bottom when new messages are added * @defaultValue false */ readonly noAutoScroll: _angular_core.InputSignalWithTransform; /** * Custom AI icon name, used for empty state * @defaultValue 'element-ai' */ readonly aiIcon: _angular_core.InputSignal; /** * Color to use for component background. * @defaultValue 'base-0' */ readonly colorVariant: _angular_core.InputSignal; /** * Options used to render chat message markdown. * @defaultValue * ``` * makeSiMarkdownOptions() * ``` */ readonly markdownOptions: _angular_core.InputSignal; /** * The greeting text for the welcome screen * @defaultValue * ``` * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.WELCOME_GREETING:Hello,`) * ``` */ readonly greeting: _angular_core.InputSignal; /** * The welcome message text for the welcome screen * @defaultValue * ``` * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.WELCOME_MESSAGE:how can I help you today?`) * ``` */ readonly welcomeMessage: _angular_core.InputSignal; /** * The list of prompt suggestions for the welcome screen, either as an array or a record mapping category labels to suggestion arrays * @defaultValue [] */ readonly promptSuggestions: _angular_core.InputSignal>; /** * More actions button aria label * * @defaultValue * ``` * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.SECONDARY_ACTIONS:More actions`) * ``` */ readonly secondaryActionsLabel: _angular_core.InputSignal; /** * Status notification severity */ readonly statusSeverity: _angular_core.InputSignal<"info" | "success" | "warning" | "danger" | "caution" | "critical" | undefined>; /** * Status notification heading */ readonly statusHeading: _angular_core.InputSignal; /** * Status notification message */ readonly statusMessage: _angular_core.InputSignal; /** * Status notification action link */ readonly statusAction: _angular_core.InputSignal<{ title: string; href: string; target?: string; } | undefined>; /** * Label for activity input arguments. * @defaultValue * ``` * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.INPUT_ARGUMENTS:Input arguments`) * ``` */ readonly activityInputArgumentsLabel: _angular_core.InputSignal; /** * Label for activity output. * @defaultValue * ``` * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.OUTPUT:Output`) * ``` */ readonly activityOutputLabel: _angular_core.InputSignal; /** * Default name for reasoning activities. * @defaultValue * ``` * t(() => $localize`:@@SI_AI_CHAT_CONTAINER.REASONING:Reasoning`) * ``` */ readonly activityReasoningLabel: _angular_core.InputSignal; /** * Emitted when a new message is sent */ readonly messageSent: _angular_core.OutputEmitterRef<{ content: string; attachments: ChatInputAttachment[]; }>; /** * Internal selected category state */ protected readonly selectedCategory: _angular_core.WritableSignal; /** * Computed list of categories derived from promptSuggestions */ protected readonly promptCategories: Signal<{ label: string; }[]>; /** * Resolved prompt suggestions based on selected category. */ protected readonly resolvedPromptSuggestions: Signal; protected readonly isEmpty: Signal; readonly inputInterruptible: Signal; readonly inputSending: Signal; protected readonly displayMessages: Signal; protected readonly renderedMessages: Signal<{ message: ChatMessage; primaryActions: _siemens_element_ng_menu.MenuItemAction[]; secondaryActions: _siemens_element_ng_menu.MenuItemAction[]; }[]>; protected isTemplateMessage(message: ChatMessage): message is TemplateChatMessage; /** * Scrolls to the bottom of the messages container immediately. * This method forces a scroll even if the user has scrolled up. */ scrollToBottom(): void; onInputSend(): void; /** * Focuses the chat input component if it exists. */ focus(): void; protected getContentValue(content: string | Signal | undefined): string; protected getMarkdownContent(content: string | object | Signal | undefined): string; private isEmptyContent; protected getLoadingValue(loading: boolean | Signal | undefined): boolean; private isStreamingContent; protected getLoadingState(messageLoading: boolean | Signal | undefined, content: string | Signal | undefined, isLatest: boolean, globalLoading?: boolean): boolean; protected isLatestMessage(message: ChatMessage): boolean; protected isLatestActivityMessage(message: ActivityChatMessage | ActivityTraceChatMessage): boolean; protected shouldAutoExpandTrace(message: ActivityTraceChatMessage): boolean; protected shouldAutoExpandActivity(message: ActivityChatMessage, active: boolean, inheritedAutoExpand: boolean): boolean; private hasExplicitAutoExpand; protected hasActivityDetails(message: ActivityChatMessage): boolean; protected getActivityInputs(message: ActivityChatMessage): ActivityInputPart[]; protected hasActivityOutput(message: ActivityChatMessage): boolean; protected getDirectActivityDetail(message: ActivityChatMessage): string | undefined; private getDirectActivityDetailType; protected shouldShowActivityInputs(message: ActivityChatMessage): boolean; protected shouldShowActivityOutput(message: ActivityChatMessage): boolean; protected shouldAutoExpandInput(message: ActivityChatMessage, inputPart: ActivityInputPart, active: boolean, inheritedAutoExpand: boolean): boolean; protected shouldAutoExpandOutput(message: ActivityChatMessage, active: boolean, inheritedAutoExpand: boolean): boolean; protected readonly isSignal: typeof isSignal; protected onPromptSelected(suggestion: PromptSuggestion): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { SI_CHAT_INPUT_PARENT, SiActivityMessageComponent, SiActivityMessagePartComponent, SiActivityTraceComponent, SiAiChatComponent, SiAiMessageComponent, SiAiWelcomeScreenComponent, SiAttachmentListComponent, SiChatContainerComponent, SiChatContainerInputDirective, SiChatInputComponent, SiChatInputDisclaimerDirective, SiChatMessageActionDirective, SiChatMessageActionsComponent, SiChatMessageComponent, SiUserMessageComponent }; export type { ActivityChatMessage, ActivityDetailsDisplay, ActivityTraceChatMessage, AiChatMessage, Attachment, BaseChatMessage, ChatInputAttachment, ChatMessage, PromptCategory, PromptSuggestion, SiChatInputParent, TemplateChatMessage, UserChatMessage };