copyWith method

RawToolCall copyWith({
  1. String? toolCallId,
  2. String? toolName,
  3. String? input,
})

A copy with input (and optionally the id or name) replaced and every provider field kept — the usual shape of a repair.

Implementation

RawToolCall copyWith({String? toolCallId, String? toolName, String? input}) =>
    RawToolCall(
      toolCallId: toolCallId ?? this.toolCallId,
      toolName: toolName ?? this.toolName,
      input: input ?? this.input,
      providerExecuted: providerExecuted,
      isDynamic: isDynamic,
      thoughtSignature: thoughtSignature,
      providerMetadata: providerMetadata,
    );