Trace message¶
Note: The trace message component is currently experimental and may undergo changes in future releases.
The trace message represents a meaningful step or phase in an AI activity trace. It communicates whether an activity is running, completed, or failed and can reveal additional details on demand.
Usage¶
Use trace 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 trace header.
- Use
expandedto control the initial disclosure state or to synchronize it with application state.
Avoid using trace messages for low-level implementation details that do not help users understand the AI's progress or result.
Code¶
<si-trace-message label="Searched the knowledge base" state="completed" icon="element-search">
<p>Found 12 relevant documents in the product knowledge base.</p>
</si-trace-message>
SiTraceMessageComponent API Documentation¶
si-trace-messageDisplays a meaningful step or phase in an AI activity trace.
The marker communicates whether the activity is running, completed, or failed. The message can be expanded to reveal additional projected content such as markdown, metadata, or tool output.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| expanded ¶ | boolean | false | Whether the trace details are expanded. |
| icon ¶ | string | 'element-record-filled' | Icon displayed for the activity when it is completed. |
| label | TranslatableString | Label describing the activity. | |
| state ¶ | TraceMessageState | 'completed' | Current execution state of the activity. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| expandedChange ¶ | boolean | Whether the trace details are expanded. |
Types Documentation¶
| 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. |
|---|
| State of a trace message. |
|---|
Except where otherwise noted, content on this site is licensed under MIT License.