copyWith method

HistoryEntry copyWith({
  1. String? id,
  2. String? sessionId,
  3. HistoryEntryType? type,
  4. DateTime? timestamp,
  5. String? role,
  6. String? content,
  7. Map<String, dynamic>? metadata,
  8. String? toolName,
  9. String? toolId,
  10. int? tokenCount,
  11. double? cost,
  12. Duration? latency,
  13. String? parentId,
  14. 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,
);