ThinkingNode class
AST node representing AI thinking/reasoning content
Used to display AI's internal reasoning process, typically shown in a collapsible or distinctly styled container.
Supports two formats:
- XML-style:
<thinking>...</thinking>or<think>...</think> - Markdown-style:
<|thinking|>...<|/thinking|>
- Inheritance
-
- Object
- MarkdownNode
- ThinkingNode
Constructors
- ThinkingNode({required String content, bool isCollapsed = true})
-
Creates a new thinking node
const
Properties
- content → String
-
The thinking/reasoning content
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCollapsed → bool
-
Whether the thinking block should be collapsed by default
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
The type identifier for this node
no setteroverride
Methods
-
copyWith(
{String? content, bool? isCollapsed}) → ThinkingNode -
Creates a copy of this node
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this node to a JSON representation
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited