ThinkingPlugin class

Plugin for parsing AI thinking/reasoning blocks

Parses the following syntaxes:

<thinking>
AI's internal reasoning process...
</thinking>

<think>
Shorter alias for thinking blocks...
</think>

<|thinking|>
Alternative markdown-style syntax...
<|/thinking|>

Example usage:

final registry = ParserPluginRegistry();
registry.register(ThinkingPlugin());

final parser = MarkdownParser(plugins: registry);
final nodes = parser.parse('''
<thinking>
Let me analyze this problem step by step...
</thinking>
''');
Inheritance

Constructors

ThinkingPlugin()
Creates a new thinking plugin
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique identifier for this plugin
no setteroverride
name → String
Human-readable name for this plugin
no setteroverride
priority → int
Priority of this plugin (higher = checked first)
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

canParse(String line, List<String> lines, int index) → bool
Checks if this plugin can parse the given line
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(List<String> lines, int startIndex) → BlockParseResult?
Parses a block starting at the given index
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited