Class ThinkingContextItem
Represents a contextual metadata item that can be displayed inline within a thinking stage's content.
Inherited Members
Namespace: Syncfusion.Blazor.InteractiveChat
Assembly: Syncfusion.Blazor.InteractiveChat.dll
Syntax
public class ThinkingContextItem
Remarks
A thinking context item is a reference to an entity (file, variable, search result, tool, etc.) that was involved in the model's reasoning process. These items are displayed as inline elements within stage content and can include visual indicators (icons, badges) and interactive behaviors (clickability).
Context items are referenced in stage content using placeholder notation (e.g., {0}, {1}), enabling flexible text-to-reference mapping. Each item displays its type through semantic styling and icon indicators, and can show a badge indicating the outcome or status of the referenced operation.
Examples
Creating various types of context items for a thinking stage:
var contextItems = new List<ThinkingContextItem>
{
new ThinkingContextItem
{
Type = ThinkingContextType.File,
Name = "user-requirements.pdf",
Value = "/documents/requirements",
Badge = ThinkingContextBadge.Success,
Clickable = true,
TooltipText = "Click to view the requirements document"
},
new ThinkingContextItem
{
Type = ThinkingContextType.Tool,
Name = "DatabaseQuery",
Value = "SELECT * FROM users",
Badge = ThinkingContextBadge.Warning,
Clickable = false,
TooltipText = "Query executed with 50,000 results"
}
};
Constructors
ThinkingContextItem()
Declaration
public ThinkingContextItem()
Properties
Badge
Gets or sets the status badge displayed alongside this context item.
Declaration
public ThinkingContextBadge Badge { get; set; }
Property Value
| Type | Description |
|---|---|
| ThinkingContextBadge | A ThinkingContextBadge indicating the status or outcome. The default value is None. |
Remarks
The badge visually communicates the outcome or status of the operation associated with the context item:
Clickable
Gets or sets a value indicating whether this context item is interactive and can be clicked by the user.
Declaration
public bool Clickable { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating if the item is clickable. The default value is false. |
Remarks
When set to true, the context item is rendered as a clickable element with cursor pointer styling. Clicking triggers the EditableContextClicked event.
When set to false, the context item is displayed as plain text or read-only content without click handling.
Name
Gets or sets the display name of this context item.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the human-readable name. The default value is Empty. |
Remarks
This name is displayed inline in the stage content where the context item is referenced. It should be concise yet descriptive enough for users to understand the item's identity.
TooltipText
Gets or sets the tooltip text displayed when the user hovers over this context item.
Declaration
public string TooltipText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string containing the tooltip text. The default value is Empty. |
Remarks
Provide helpful, descriptive text that explains the context item's meaning, purpose, or associated operation. The tooltip is displayed when users hover over the item in browsers that support tooltips.
Type
Gets or sets the semantic type of this context item.
Declaration
public ThinkingContextType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| ThinkingContextType | A ThinkingContextType specifying the type of context. The default value is Context. |
Remarks
The type determines the icon displayed with the item and the semantic styling applied. For example, File displays a document icon, while Tool displays a settings/gear icon.
Value
Gets or sets the value or identifier associated with this context item.
Declaration
public string Value { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the context item's value. The default value is Empty. |
Remarks
The value can represent a file path, variable value, search query, tool identifier, result data, or any other relevant data associated with the context item. This value is often used when handling context item clicks to identify the specific item.