copyWith method
HistoryEntry
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,
})
Implementation
HistoryEntry 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(
id: id ?? this.id,
sessionId: sessionId ?? this.sessionId,
type: type ?? this.type,
timestamp: timestamp ?? this.timestamp,
role: role ?? this.role,
content: content ?? this.content,
metadata: metadata ?? this.metadata,
toolName: toolName ?? this.toolName,
toolId: toolId ?? this.toolId,
tokenCount: tokenCount ?? this.tokenCount,
cost: cost ?? this.cost,
latency: latency ?? this.latency,
parentId: parentId ?? this.parentId,
turnIndex: turnIndex ?? this.turnIndex,
);