Class ThinkingBlockTemplateContext
Provides context data and references for custom thinking block templates in the SfAIAssistView component.
Inherited Members
Namespace: Syncfusion.Blazor.InteractiveChat
Assembly: Syncfusion.Blazor.InteractiveChat.dll
Syntax
public class ThinkingBlockTemplateContext
Remarks
This context class is passed to the ThinkingBlockTemplate render fragment, enabling custom rendering of thinking blocks with full access to block data and position information.
Use this context to access the thinking block's content, stages, and metadata when implementing custom thinking block templates.
Constructors
ThinkingBlockTemplateContext()
Declaration
public ThinkingBlockTemplateContext()
Properties
Block
Gets the thinking block being rendered.
Declaration
public ThinkingBlock Block { get; set; }
Property Value
| Type | Description |
|---|---|
| ThinkingBlock | The ThinkingBlock object containing all block data including ID, title, content, stages collection, and state properties (active, collapsible, collapsed). |
Remarks
This property provides access to the complete thinking block data structure, allowing you to customize rendering based on all available block properties.
BlockIndex
Gets the zero-based index of this thinking block within its response's blocks collection.
Declaration
public int BlockIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| int | An int representing the position of this block among all blocks in the response. The default value is |
Remarks
Use this index to identify which thinking block is being rendered or to create context-specific identifiers. The first block has index 0, the second block has index 1, etc.
This is useful for styling different blocks differently or generating unique IDs for tracking purposes.