# SiAiMessageComponent documentation

**Kind:** component

**Selector:** `si-ai-message`

```
import { SiAiMessageComponent } from '@siemens/element-ng/chat-messages';
```

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 [SiChatContainerComponent](<../SiChatContainerComponent/index.html#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: [SiChatMessageComponent](<../SiChatMessageComponent/index.html#SiChatMessageComponent>) for the base message wrapper component

See: [SiUserMessageComponent](<../SiUserMessageComponent/index.html#SiUserMessageComponent>) for the user message component

See: [SiChatContainerComponent](<../SiChatContainerComponent/index.html#SiChatContainerComponent>) for the chat container to use this within

```
component SiAiMessageComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [actionParam](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-ai-message.component.ts#L71-L71>) | `unknown` |  | Parameter to pass to action handlers |
| [actions](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-ai-message.component.ts#L62-L62>) | `MenuItemAction[]` | `[]` | Primary actions available for this message (thumbs up/down, copy, retry, etc.) All actions displayed inline |
| [content](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-ai-message.component.ts#L49-L49>) | `string` | `''` | The AI-generated message content |
| [loading](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-ai-message.component.ts#L55-L55>) | `boolean` | `false` | Whether the message is currently being generated (shows skeleton) |
| [secondaryActions](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-ai-message.component.ts#L68-L68>) | `MenuItemAction[]` | `[]` | Secondary actions available in dropdown menu, first use primary actions and only add secondary actions additionally |
| [secondaryActionsLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-ai-message.component.ts#L84-L86>) | `TranslatableString` | `` $localize`:@@SI_AI_MESSAGE.SECONDARY_ACTIONS:Additional actions` `` | More actions button aria label |
| [sources](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-ai-message.component.ts#L74-L74>) | `SourceReference[] \| undefined` |  | Source references |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [sourceClicked](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/si-ai-message.component.ts#L89-L89>) | `SourceReference` | Emitted when a source has been clicked. |

### Types Documentation

### [MenuItemAction](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L34-L41>)

**Kind:** interface

```
import type { MenuItemAction } from '@siemens/element-ng/menu';
```

```
interface MenuItemAction extends MenuItemBase
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [action](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L40-L40>) | `string \| ((actionParam: any, source: MenuItemAction) => void)` | Action that called when the item is triggered. A function will be called, a string will be dispatched to the [SiMenuActionService](<../../types/SiMenuActionService/index.html#t:SiMenuActionService>). |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L21-L21>) (optional, inherited) | `string \| number` | Badge that is rendered after the label.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [badgeColor](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L23-L23>) (optional, inherited) | `string` | Color of the badge (not iconBadge).<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L25-L25>) (optional, inherited) | `boolean` | Whether the menu item id disabled.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L14-L14>) (optional, inherited) | `string` | Optional icon that will be rendered before the label.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [iconBadge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L19-L19>) (optional, inherited) | `string \| number \| boolean` | Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L10-L10>) (optional, inherited) | `string` | ID that will be attached to the DOM node.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L12-L12>) (inherited) | `TranslatableString` | Label that is shown to the user.<br><br>Inherited from [MenuItemBase](<index.html#t:MenuItemBase>) |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L35-L35>) | `"action"` |  |

### [SourceReference](<https://github.com/siemens/element/blob/main/projects/element-ng/source-chip/si-source-chip.model.ts#L7-L16>)

**Kind:** interface

```
import type { SourceReference } from '@siemens/element-ng/source-chip';
```

Definition of a single source

```
interface SourceReference
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [description](<https://github.com/siemens/element/blob/main/projects/element-ng/source-chip/si-source-chip.model.ts#L13-L13>) (optional) | `string` | Optional source description. |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/source-chip/si-source-chip.model.ts#L9-L9>) | `string` | Source name displayed to the user. |
| [quote](<https://github.com/siemens/element/blob/main/projects/element-ng/source-chip/si-source-chip.model.ts#L15-L15>) (optional) | `string` | Optional source quote. Takes precedence over [description](<index.html#t:SourceReference.description>). |
| [url](<https://github.com/siemens/element/blob/main/projects/element-ng/source-chip/si-source-chip.model.ts#L11-L11>) | `string` | Source URL. |

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```

### [MenuItemBase](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L8-L26>)

**Kind:** interface

```
import type { MenuItemBase } from '@siemens/element-ng/menu';
```

```
interface MenuItemBase
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [badge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L21-L21>) (optional) | `string \| number` | Badge that is rendered after the label. |
| [badgeColor](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L23-L23>) (optional) | `string` | Color of the badge (not iconBadge). |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L25-L25>) (optional) | `boolean` | Whether the menu item id disabled. |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L14-L14>) (optional) | `string` | Optional icon that will be rendered before the label. |
| [iconBadge](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L19-L19>) (optional) | `string \| number \| boolean` | Badge (always red) that is attached to the icon. If value===true, an empty red dot will be rendered. |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L10-L10>) (optional) | `string` | ID that will be attached to the DOM node. |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/menu/si-menu-model.ts#L12-L12>) | `TranslatableString` | Label that is shown to the user. |
