Activity message¶
Note: The activity message component is currently experimental and may undergo changes in future releases.
The activity message represents a meaningful step or phase in an AI activity. It communicates whether an activity is running, completed, or failed and can reveal additional details on demand.
Usage¶
Use activity messages to make multi-step AI activity transparent without exposing every internal event. Show one message for each user-relevant step or phase and arrange related messages in execution order.
- Use a concise
labelthat describes the activity. - Set
statetorunning,completed, orfailedto communicate its current status. - Set
iconto customize the completed activity marker. It defaults toelement-record-filled. - Project optional details such as Markdown, metadata, or tool output into the component. Users can expand and collapse this content from the activity header.
- Use
expandedto control the initial disclosure state or to synchronize it with application state.
Avoid using activity messages for low-level implementation details that do not help users understand the AI's progress or result.
Activity trace¶
Use si-activity-trace to group multiple related activity messages under a shared, collapsible heading.
Activity message¶
Use si-activity-message for an individual activity. It has a heading, an optional icon, and collapsible content, and can communicate running and failed states. Content can be added directly or organized into parts.
Activity messages can be used without a trace. They can also contain other activity messages when a step has its own intermediate activities.
Activity message part¶
Use si-activity-message-part to divide an activity into multiple titled parts, such as input and output. Parts are optional and can be made collapsible independently.
When parts are used, provide at least two so that the subdivision adds meaningful structure.
Code¶
SiActivityTraceComponent API Documentation¶
si-activity-traceCollapsible container for grouping multiple activity messages.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| expanded ¶ | boolean | false | Whether the trace content is expanded. |
| heading | TranslatableString | Trace heading. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| expandedChange ¶ | boolean | Whether the trace content is expanded. |
SiActivityMessageComponent API Documentation¶
si-activity-messageCollapsible activity message for displaying progress and intermediate steps in a chat.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| expanded ¶ | boolean | false | Whether the activity details are expanded. |
| heading | TranslatableString | Activity heading. | |
| icon ¶ | string | Activity icon. | |
| state ¶ | ("failed" | "running") | Current state of the activity. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| expandedChange ¶ | boolean | Whether the activity details are expanded. |
SiActivityMessagePartComponent API Documentation¶
si-activity-message-partTitled content part for use inside an activity message.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| collapsible ¶ | boolean | false | Whether the part can be collapsed and expanded. |
| expanded ¶ | boolean | true | Whether collapsible content is expanded. |
| heading | TranslatableString | Part heading. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| expandedChange ¶ | boolean | Whether collapsible content is expanded. |
Except where otherwise noted, content on this site is licensed under MIT License.