copyWith method

AgentToolCall copyWith({
  1. String? name,
  2. int? turn,
  3. Object? outcome = _sentinel,
  4. Object? summary = _sentinel,
})

Implementation

AgentToolCall copyWith({
  String? name,
  int? turn,
  Object? outcome = _sentinel,
  Object? summary = _sentinel,
}) {
  return AgentToolCall.fromTrusted(
    name: name ?? this.name,
    turn: turn ?? this.turn,
    outcome: identical(outcome, _sentinel)
        ? this.outcome
        : outcome as ToolCallOutcome?,
    summary: identical(summary, _sentinel)
        ? this.summary
        : summary as String?,
  );
}