alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ThinkingBlock

    Represents a thinking block that encapsulates the model's reasoning process and can be rendered inside an AI response.

    Inheritance
    object
    ThinkingBlock
    Implements
    IResponseBlock
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.InteractiveChat
    Assembly: Syncfusion.Blazor.InteractiveChat.dll
    Syntax
    public class ThinkingBlock : IResponseBlock
    Remarks

    A thinking block is a response component that displays the model's internal reasoning, thought process, or intermediate steps. It contains a timeline of thinking stages showing the progression of reasoning, along with contextual metadata about files, variables, tools, and results referenced during the process.

    Thinking blocks support progressive disclosure with collapsible stages, animated progress indicators for in-progress stages, and custom templating for advanced UI customization.

    Use thinking blocks when you want to provide transparency into how the model arrived at its answer, build user trust, or enable debugging of complex reasoning tasks.

    Examples

    Creating a thinking block with multiple stages:

    var thinkingBlock = new ThinkingBlock
    {
        ID = "think-001",
        Title = "Analysis and Planning",
        IsActive = true,
        Collapsible = true,
        Collapsed = true,
        Content = "Breaking down the problem into steps...",
        Stages = new List<ThinkingStage>
        {
            new ThinkingStage
            { 
                ID = "stage-1",
                Status = ThinkingStageStatus.Completed,
                Content = "Analyzed the {0} for requirements",
                EditableContext = new List<ThinkingContextItem>
                {
                    new ThinkingContextItem
                    { 
                        Type = ThinkingContextType.File,
                        Name = "requirements.txt",
                        Badge = ThinkingContextBadge.Success,
                        Clickable = true
                    }
                }
            }
        }
    };

    Constructors

    ThinkingBlock()

    Declaration
    public ThinkingBlock()

    Properties

    BlockType

    Gets or sets the block type identifier.

    Declaration
    public BlockType BlockType { get; set; }
    Property Value
    Type Description
    BlockType

    A BlockType indicating this is a thinking block. The default value is Thinking.

    Remarks

    This property is automatically set to Thinking and identifies this block as a response component containing reasoning or thinking process information.

    Collapsed

    Gets or sets a value indicating whether this thinking block starts in a collapsed state.

    Declaration
    public bool Collapsed { get; set; }
    Property Value
    Type Description
    bool

    A bool indicating if the block is initially collapsed. The default value is true.

    Remarks

    When set to true, the thinking block's stages and content are initially hidden, and users must click to expand them.

    When set to false, the block is displayed expanded when first rendered, showing all stages and content immediately.

    This property only takes effect if Collapsible is true.

    Collapsible

    Gets or sets a value indicating whether this thinking block can be collapsed and expanded by the user.

    Declaration
    public bool Collapsible { get; set; }
    Property Value
    Type Description
    bool

    A bool indicating if the block is collapsible. The default value is true.

    Remarks

    When set to true, a toggle button (chevron icon) is displayed in the header, allowing users to collapse/expand the block.

    When set to false, the toggle button is hidden and the block cannot be collapsed by user interaction.

    Content

    Gets or sets the introductory or summary content displayed above the thinking stages timeline.

    Declaration
    public string Content { get; set; }
    Property Value
    Type Description
    string

    A string containing markdown or plain text content. The default value is Empty.

    Remarks

    This content provides context or a summary before the detailed stages are shown. It is displayed before the timeline/stages section and can contain markdown-formatted text.

    ID

    Gets or sets the unique identifier for this thinking block.

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    string

    A string representing a unique identifier for the block. The default value is Empty.

    Remarks

    The ID is used to uniquely identify this thinking block within a response, enabling references from UI elements, event handlers, or programmatic access to specific blocks.

    IsActive

    Gets or sets a value indicating whether this thinking block is currently active and its content is being populated.

    Declaration
    public bool IsActive { get; set; }
    Property Value
    Type Description
    bool

    A bool indicating if the block is active. The default value is true.

    Remarks

    When true, the block displays an animated spinner indicating active processing. When false, the block displays a completion checkmark.

    Set this to false when the thinking process is complete and stages have finished populating.

    Stages

    Gets or sets the collection of stages that comprise this thinking block's reasoning timeline.

    Declaration
    public List<ThinkingStage> Stages { get; set; }
    Property Value
    Type Description
    List<ThinkingStage>

    A List<T> of ThinkingStage objects representing the reasoning steps. The default value is an empty collection.

    Remarks

    Each stage represents a distinct step or phase in the model's reasoning process. Stages are rendered sequentially in a timeline view, with visual indicators showing their status (completed, in-progress, or failed).

    If only one stage is present, it is displayed in a simplified single-stage container. Multiple stages are rendered in a vertical timeline layout.

    Title

    Gets or sets the title displayed in the thinking block header.

    Declaration
    public string Title { get; set; }
    Property Value
    Type Description
    string

    A string representing the block title. The default value is Empty.

    Remarks

    When the title is empty, a default title "Thinking..." is displayed. Provide a custom title to give users context about what the thinking block represents (e.g., "Analysis and Planning", "Problem Decomposition").

    Implements

    IResponseBlock
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved