Struct ChatActivityRenderContext
What renderActivity is told about the activity group it is building.
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public readonly struct ChatActivityRenderContext
Constructors
ChatActivityRenderContext(ChatMessage, IReadOnlyList<ChatActivityPart>, IReadOnlyList<ChatMessagePart>, int, bool, bool, DateTime?)
Creates a context.
Declaration
public ChatActivityRenderContext(ChatMessage message, IReadOnlyList<ChatActivityPart> parts, IReadOnlyList<ChatMessagePart> messageParts, int groupIndex, bool isStreaming, bool isFollowedByText, DateTime? startTime)
Parameters
| Type | Name | Description |
|---|---|---|
| ChatMessage | message | The assistant message the group belongs to. |
| IReadOnlyList<ChatActivityPart> | parts | The group's timeline rows. |
| IReadOnlyList<ChatMessagePart> | messageParts | The message parts the group was folded from. |
| int | groupIndex | The group's place among the message's activity groups. |
| bool | isStreaming | Whether the group is still running. |
| bool | isFollowedByText | Whether a block follows the group. |
| DateTime? | startTime | When the group's work began. |
Properties
groupIndex
Which of the message's activity groups this is, counting from zero.
Declaration
public int groupIndex { get; }
Property Value
| Type | Description |
|---|---|
| int |
isFollowedByText
Whether a text or standalone block follows the group.
Declaration
public bool isFollowedByText { get; }
Property Value
| Type | Description |
|---|---|
| bool |
isStreaming
Whether the group is the message's last and the message is still streaming.
Declaration
public bool isStreaming { get; }
Property Value
| Type | Description |
|---|---|
| bool |
message
The assistant message the group belongs to.
Declaration
public ChatMessage message { get; }
Property Value
| Type | Description |
|---|---|
| ChatMessage |
messageParts
The message parts the group was folded from, in order, each tool call followed by its ToolResult once one has arrived. Carries the call id and result payload that parts leaves out.
Declaration
public IReadOnlyList<ChatMessagePart> messageParts { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ChatMessagePart> |
parts
The group's rows as the default timeline would draw them: thinking merged per mergeThinking, and a call no longer pending once its result arrived.
Declaration
public IReadOnlyList<ChatActivityPart> parts { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ChatActivityPart> |
startTime
When the group's work began, if known.
Declaration
public DateTime? startTime { get; }
Property Value
| Type | Description |
|---|---|
| DateTime? |