HistoryEntry class

A single history entry with full metadata.

Constructors

HistoryEntry({required String id, required String sessionId, required HistoryEntryType type, required DateTime timestamp, required String role, required String content, Map<String, dynamic>? metadata, String? toolName, String? toolId, int? tokenCount, double? cost, Duration? latency, String? parentId, required int turnIndex})
const
HistoryEntry.fromJson(Map<String, dynamic> json)
factory

Properties

content String
final
cost double?
final
hashCode int
The hash code for this object.
no setterinherited
id String
final
latency Duration?
final
metadata Map<String, dynamic>?
final
parentId String?
final
role String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionId String
final
timestamp DateTime
final
tokenCount int?
final
toolId String?
final
toolName String?
final
turnIndex int
final
type HistoryEntryType
final

Methods

copyWith({String? id, String? sessionId, HistoryEntryType? type, DateTime? timestamp, String? role, String? content, Map<String, dynamic>? metadata, String? toolName, String? toolId, int? tokenCount, double? cost, Duration? latency, String? parentId, int? turnIndex}) HistoryEntry
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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