* Produce a shallow-ish copy of a StreamedMessagePart. * * This is intentionally minimal: we only need isolation for the mutable * string fields that `mergeInPlace` mutates (text, think, arguments).
(part: StreamedMessagePart)
| 338 | * string fields that `mergeInPlace` mutates (text, think, arguments). |
| 339 | */ |
| 340 | function deepCopyPart(part: StreamedMessagePart): StreamedMessagePart { |
| 341 | return structuredClone(part); |
| 342 | } |